- Timestamp:
- Oct 22, 2007 8:22:51 AM (17 years ago)
- Location:
- trunk/src/VBox/Devices/Network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r5332 r5436 56 56 /** Boot file name to provide in the DHCP server response. */ 57 57 char *pszBootFile; 58 /** Flag whether a NAT ping warning has been shown. */59 bool fSuppressPingWarning;60 58 } DRVNAT, *PDRVNAT; 61 59 … … 244 242 LogFlow(("slirp_output END %x %d\n", pu8Buf, cb)); 245 243 } 246 247 248 /**249 * Function called by slirp to signal that a ping had to be dropped.250 */251 void slirp_cannot_ping(void *pvUser)252 {253 PDRVNAT pData = (PDRVNAT)pvUser;254 255 Assert(pData);256 257 /** Happens during termination */258 if (!RTCritSectIsOwner(&pData->CritSect))259 return;260 261 if (!pData->fSuppressPingWarning)262 {263 pData->fSuppressPingWarning = true;264 PDMDRV_SET_RUNTIME_ERROR(pData->pDrvIns, false, "NAT_PING", N_("The guest OS sent out a ping request which cannot be handled by NAT"));265 }266 }267 268 244 269 245 /** -
trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
r5291 r5436 115 115 icmp_reflect(pData, m); 116 116 } else { 117 #if 1118 slirp_cannot_ping(pData->pvUser);119 m_freem(pData, m);120 #else121 117 struct socket *so; 122 118 struct sockaddr_in addr; … … 162 158 udp_detach(pData, so); 163 159 } 164 #endif165 160 } /* if ip->ip_dst.s_addr == alias_addr.s_addr */ 166 161 break; -
trunk/src/VBox/Devices/Network/slirp/libslirp.h
r5332 r5436 42 42 int slirp_can_output(void * pvUser); 43 43 void slirp_output(void * pvUser, const uint8_t *pkt, int pkt_len); 44 void slirp_cannot_ping(void * pvUser);45 44 46 45 int slirp_redir(PNATState pData, int is_udp, int host_port,
Note:
See TracChangeset
for help on using the changeset viewer.