Changeset 15220 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Dec 10, 2008 2:45:14 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r15210 r15220 26 26 UPD_NFDS((so)->s); \ 27 27 } while(0) 28 29 # define DO_POLL_EVENTS(rc, error, so, events, label) do {} while (0) 28 30 29 31 # ifdef VBOX_WITH_SLIRP_ICMP … … 60 62 DO_ENGAGE_EVENT1((so), (fdset1), label) 61 63 64 # define DO_POLL_EVENTS(rc, error, so, events, label) \ 65 (rc) = WSAEnumNetworkEvents((so)->s, VBOX_SOCKET_EVENT, (events)); \ 66 if ((rc) == SOCKET_ERROR) \ 67 { \ 68 (error) = WSAGetLastError(); \ 69 LogRel(("WSAEnumNetworkEvents " #label " error %d\n", (error))); \ 70 continue; \ 71 } 72 62 73 #endif /* defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS) */ 63 74 … … 70 81 #define UDP_ENGAGE_EVENT(so, fdset) \ 71 82 DO_ENGAGE_EVENT1((so), (fdset), UDP) 83 84 #define POLL_TCP_EVENTS(rc, error, so, events) \ 85 DO_POLL_EVENTS((rc), (error), (so), (events), TCP) 86 87 #define POLL_UDP_EVENTS(rc, error, so, events) \ 88 DO_POLL_EVENTS((rc), (error), (so), (events), UDP) 72 89 73 90 static const uint8_t special_ethaddr[6] = … … 687 704 continue; 688 705 689 #if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS) 690 rc = WSAEnumNetworkEvents(so->s, VBOX_SOCKET_EVENT, &NetworkEvents); 691 if (rc == SOCKET_ERROR) 692 { 693 error = WSAGetLastError(); 694 LogRel(("WSAEnumNetworkEvents TCP error %d\n", error)); 695 continue; 696 } 697 #endif 706 POLL_TCP_EVENTS(rc, error, so, NetworkEvents); 698 707 699 708 /* … … 873 882 so_next = so->so_next; 874 883 875 #if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS) 876 rc = WSAEnumNetworkEvents(so->s, VBOX_SOCKET_EVENT, &NetworkEvents); 877 if (rc == SOCKET_ERROR) 878 { 879 error = WSAGetLastError(); 880 LogRel(("WSAEnumNetworkEvents TCP error %d\n", error)); 881 continue; 882 } 883 #endif 884 POLL_UDP_EVENTS(rc, error, so, NetworkEvents); 885 884 886 #if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS) 885 887 if (so->s != -1 && FD_ISSET(so->s, readfds))
Note:
See TracChangeset
for help on using the changeset viewer.