Changeset 14623 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Nov 26, 2008 9:36:18 AM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
r14470 r14623 66 66 }; 67 67 68 #ifdef VBOX_WITH_SLIRP_ICMP 69 static int 70 icmp_attach(PNATState pData, struct socket *so) { 71 AssertRelease(so != NULL); 72 if (pData->icmp_socket == 0) 73 pData->icmp_socket = socket(PF_INET, SOCK_RAW, IPPROTO_ICMP); 74 AssertRelease(pData->icmp_socket != -1); 75 so->s = pData->icmp_socket; 76 return (so->s); 77 } 78 #endif /* VBOX_WITH_SLIRP_ICMP */ 79 68 80 /* 69 81 * Process a received ICMP message. … … 118 130 struct sockaddr_in addr; 119 131 if ((so = socreate()) == NULL) goto freeit; 132 #ifndef VBOX_WITH_SLIRP_ICMP 120 133 if(udp_attach(pData, so) == -1) { 134 #else 135 if(icmp_attach(pData, so) == -1) { 136 #endif 121 137 DEBUG_MISC((dfd,"icmp_input udp_attach errno = %d-%s\n", 122 138 errno,strerror(errno))); -
trunk/src/VBox/Devices/Network/slirp/slirp_state.h
r14522 r14623 129 129 struct socket udb; 130 130 struct socket *udp_last_so; 131 #ifdef VBOX_WITH_SLIRP_ICMP 132 int icmp_socket; 133 #endif 131 134 #if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS) 132 135 # define VBOX_SOCKET_EVENT (pData->phEvents[VBOX_SOCKET_EVENT_INDEX])
Note:
See TracChangeset
for help on using the changeset viewer.