VirtualBox

Changeset 22451 in vbox


Ignore:
Timestamp:
Aug 26, 2009 7:53:31 AM (15 years ago)
Author:
vboxsync
Message:

NAT/libalias: no-static

Location:
trunk/src/VBox/Devices/Network/slirp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c

    r21864 r22451  
    143143};
    144144#else /* !VBOX */
    145 static struct proto_handler handlers[2];
     145#define handlers pData->ftp_module
    146146#endif /* VBOX */
    147147
     
    169169    int error;
    170170#ifdef VBOX
     171    handlers = RTMemAllocZ(2 * sizeof(struct proto_handler));
    171172    handlers[0].pri = 80;
    172173    handlers[0].dir = OUT;
     
    190191#ifdef VBOX
    191192        LibAliasDetachHandlers(pData, handlers);
     193        RTMemFree(handlers);
     194        handlers = NULL;
    192195#else
    193196        LibAliasDetachHandlers(handlers);
  • trunk/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c

    r21864 r22451  
    162162};
    163163#else /* !VBOX */
    164 static struct proto_handler handlers[4];
     164#define handlers pData->nbt_module
    165165#endif /*VBOX*/
    166166
     
    188188    int error;
    189189#ifdef VBOX
    190    
     190    handlers = RTMemAllocZ(4 * sizeof(struct proto_handler));
    191191    handlers[0].pri = 130;
    192192    handlers[0].dir = IN|OUT;
     
    225225#ifdef VBOX
    226226        LibAliasDetachHandlers(pData, handlers);
     227        RTMemFree(handlers);
     228        handlers = NULL;
    227229#else
    228230        LibAliasDetachHandlers(handlers);
  • trunk/src/VBox/Devices/Network/slirp/slirp_state.h

    r22449 r22451  
    9090};
    9191LIST_HEAD(port_forward_rule_list, port_forward_rule);
     92
     93/* forward declaration */
     94struct proto_handler;
    9295
    9396/** Main state/configuration structure for slirp NAT. */
     
    249252    struct port_forward_rule_list port_forward_rule_head;
    250253    int port_forwarding_activated;
     254    /*libalis modules' handlers*/
     255    struct proto_handler *ftp_module;
     256    struct proto_handler *nbt_module;
    251257
    252258#define PROFILE_COUNTER(name, dsc)     STAMPROFILE Stat ## name
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette