VirtualBox

Changeset 38043 in vbox for trunk/src


Ignore:
Timestamp:
Jul 19, 2011 4:36:48 AM (14 years ago)
Author:
vboxsync
Message:

NAT: experiment with FD_CONNECT processing on Windows host (disabled by default).

File:
1 edited

Legend:

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

    r37935 r38043  
    183183# define closefds_win     FD_CLOSE
    184184# define closefds_win_bit FD_CLOSE_BIT
     185# define connectfds_win     FD_CONNECT
     186# define connectfds_win_bit FD_CONNECT_BIT
    185187
    186188# define closefds_win FD_CLOSE
     
    200202#define TCP_ENGAGE_EVENT2(so, fdset1, fdset2) \
    201203    DO_ENGAGE_EVENT2((so), fdset1, fdset2, tcp)
     204
     205#ifdef RT_OS_WINDOWS
     206# define WIN_TCP_ENGAGE_EVENT2(so, fdset, fdset2) TCP_ENGAGE_EVENT2(so, fdset1, fdset2)
     207#else
     208# define WIN_TCP_ENGAGE_EVENT2(so, fdset, fdset2) do{}while(0)
     209#endif
    202210
    203211#define UDP_ENGAGE_EVENT(so, fdset) \
     
    933941            Log2(("connecting %R[natsock] engaged\n",so));
    934942            STAM_COUNTER_INC(&pData->StatTCPHot);
     943#ifndef NAT_CONNECT_EXPERIMENT
    935944            TCP_ENGAGE_EVENT1(so, writefds);
     945#else
     946# ifdef RT_OS_WINDOWS
     947            WIN_TCP_ENGAGE_EVENT2(so, writefds, connectfds);
     948# else
     949            TCP_ENGAGE_EVENT1(so, writefds);
     950# endif
     951#endif
    936952        }
    937953
     
    11591175                 || WIN_CHECK_FD_SET(so, NetworkEvents, acceptds))
    11601176        {
     1177#ifdef DEBUG_vvl
     1178            Assert(((so->so_state & SS_ISFCONNECTING) == 0));
     1179#endif
    11611180            /*
    11621181             * Check for incoming connections
     
    12101229         * Check sockets for writing
    12111230         */
    1212         if (CHECK_FD_SET(so, NetworkEvents, writefds))
     1231        if (    CHECK_FD_SET(so, NetworkEvents, writefds)
     1232#if defined(NAT_CONNECT_EXPERIMENT)
     1233            ||  WIN_CHECK_FD_SET(so, NetworkEvents, connectfds)
     1234#endif
     1235            )
    12131236        {
    12141237            /*
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