VirtualBox

Ignore:
Timestamp:
Jun 26, 2009 1:52:10 PM (16 years ago)
Author:
vboxsync
Message:

NAT/libalias: disabling libalias socket managment

File:
1 edited

Legend:

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

    r20958 r20974  
    332332    int     expire_time;    /* Expire time for link                */
    333333#ifndef NO_USE_SOCKETS
     334# ifndef VBOX
     335    /*
     336     * in VBox we do not use host's sockets here, which are managed
     337     * inside slirp. yes we have to create new sockets here but latter
     338     * managment and deletion are in repsponsible of Slirp.
     339     */
    334340    int     sockfd; /* socket descriptor                   */
     341# endif
    335342#endif
    336343            LIST_ENTRY    (alias_link) list_out;    /* Linked list of
     
    671678                && ((lnk->link_type == LINK_TCP) ||
    672679                (lnk->link_type == LINK_UDP))) {
     680#ifndef VBOX
    673681                if (GetSocket(la, port_net, &lnk->sockfd, lnk->link_type)) {
     682#else
     683                if (GetSocket(la, port_net, NULL, lnk->link_type)) {
     684#endif
    674685                    lnk->alias_port = port_net;
    675686                    return (0);
     
    754765    if (err == 0) {
    755766        la->sockCount++;
    756         *sockfd = sock;
    757767#ifdef VBOX
    758768            so->so_expire = la->curtime + SO_EXPIRE;
     
    782792            }
    783793       
     794#else
     795        *sockfd = sock;
    784796#endif
    785797        return (1);
     
    954966#ifndef NO_USE_SOCKETS
    955967/* Close socket, if one has been allocated */
     968# ifndef VBOX
    956969    if (lnk->sockfd != -1) {
    957970        la->sockCount--;
    958971        close(lnk->sockfd);
    959972    }
     973# else
     974    /* Slirp will close the socket in its own way */
     975# endif
    960976#endif
    961977/* Link-type dependent cleanup */
     
    10271043        lnk->link_type = link_type;
    10281044#ifndef NO_USE_SOCKETS
     1045# ifndef VBOX
    10291046        lnk->sockfd = -1;
     1047# endif
    10301048#endif
    10311049        lnk->flags = 0;
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