Changeset 15095 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Dec 8, 2008 8:12:52 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r15094 r15095 12 12 13 13 #if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS) 14 # define DO_ENGAGE_EVENT1(so, fdset, label) 15 16 FD_SET((so)->s, (fdset));\17 UPD_NFDS((so)->s);\18 19 20 21 # define DO_ENGAGE_EVENT2(so, fdset0, fdset1, label) 22 do {\23 FD_SET((so)->s, (fdset0));\24 FD_SET((so)->s, (fdset1));\25 UPD_NFDS((so)->s);\26 14 # define DO_ENGAGE_EVENT1(so, fdset, label) \ 15 do { \ 16 FD_SET((so)->s, (fdset)); \ 17 UPD_NFDS((so)->s); \ 18 } while(0) 19 20 21 # define DO_ENGAGE_EVENT2(so, fdset0, fdset1, label) \ 22 do { \ 23 FD_SET((so)->s, (fdset0)); \ 24 FD_SET((so)->s, (fdset1)); \ 25 UPD_NFDS((so)->s); \ 26 } while(0) 27 27 #else /* defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS) */ 28 # define DO_ENGAGE_EVENT1(so, fdset0, label) 29 do {\30 31 32 33 34 35 36 error, (so), (so)->s, VBOX_SOCKET_EVENT));\37 38 } while(0); \28 # define DO_ENGAGE_EVENT1(so, fdset0, label) \ 29 do { \ 30 rc = WSAEventSelect((so)->s, VBOX_SOCKET_EVENT, FD_ALL_EVENTS); \ 31 if (rc == SOCKET_ERROR) \ 32 { \ 33 /* This should not happen */ \ 34 error = WSAGetLastError(); \ 35 LogRel(("WSAEventSelector (" #label ") error %d (so=%x, socket=%s, event=%x)\n", \ 36 error, (so), (so)->s, VBOX_SOCKET_EVENT)); \ 37 } \ 38 } while(0) 39 39 40 40 # define DO_ENGAGE_EVENT2(so, fdset0, fdset1, label) DO_ENGAGE_EVENT1((so), (fdset0), label) 41 41 #endif /* defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS) */ 42 42 43 # define TCP_ENGAGE_EVENT1(so, fdset0) 44 45 46 # define TCP_ENGAGE_EVENT2(so, fdset0, fdset1) 47 48 49 #define UDP_ENGAGE_EVENT(so, fdset) \50 43 # define TCP_ENGAGE_EVENT1(so, fdset0) \ 44 DO_ENGAGE_EVENT1((so), (fdset0), TCP) 45 46 # define TCP_ENGAGE_EVENT2(so, fdset0, fdset1) \ 47 DO_ENGAGE_EVENT2((so), (fdset0), (fdset1), TCP) 48 49 #define UDP_ENGAGE_EVENT(so, fdset) \ 50 DO_ENGAGE_EVENT1((so), (fdset), UDP) 51 51 52 52 static const uint8_t special_ethaddr[6] = {
Note:
See TracChangeset
for help on using the changeset viewer.