Changeset 30415 in vbox for trunk/src/VBox
- Timestamp:
- Jun 24, 2010 9:02:31 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 63044
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
r30404 r30415 61 61 #endif 62 62 63 #ifdef RT_OS_WINDOWS64 # define ICMP_SEND_ECHO(event, routine, addr, data, datasize, ipopt) \65 IcmpSendEcho2(pData->icmp_socket.sh, (event), NULL, NULL, (addr), (data), (datasize), \66 (ipopt), pData->pvIcmpBuffer, pData->szIcmpBuffer, 1)67 #endif /* RT_OS_WINDOWS */68 69 63 /* The message sent when emulating PING */ 70 64 /* Be nice and tell them it's just a psuedo-ping packet */ … … 355 349 /* min 8 bytes payload */ 356 350 icmpstat.icps_tooshort++; 357 goto end_error ;351 goto end_error_free_m; 358 352 } 359 353 … … 364 358 { 365 359 icmpstat.icps_checksum++; 366 goto end_error ;360 goto end_error_free_m; 367 361 } 368 362 … … 373 367 { 374 368 LogRel(("NAT: not enought memory to allocate the buffer\n")); 375 goto end_error ;369 goto end_error_free_m; 376 370 } 377 371 m_copydata(m, 0, icmplen, icp_buf); … … 443 437 goto done; 444 438 } 445 439 446 440 LogRel((dfd,"icmp_input udp sendto tx errno = %d-%s\n", 447 441 errno, strerror(errno))); … … 454 448 memset(&ipopt, 0, sizeof(IP_OPTION_INFORMATION)); 455 449 ipopt.Ttl = ip->ip_ttl; 456 status = ICMP_SEND_ECHO(pData->phEvents[VBOX_ICMP_EVENT_INDEX], notify_slirp, addr.sin_addr.s_addr, 457 icp->icmp_data, icmplen - ICMP_MINLEN, &ipopt); 450 status = IcmpSendEcho2(pData->icmp_socket.sh /*=handle*/, 451 pData->phEvents[VBOX_ICMP_EVENT_INDEX] /*=Event*/, 452 NULL /*=ApcRoutine*/, 453 NULL /*=ApcContext*/, 454 addr.sin_addr.s_addr /*=DestinationAddress*/, 455 icp->icmp_data /*=RequestData*/, 456 icmplen - ICMP_MINLEN /*=RequestSize*/, 457 &ipopt /*=RequestOptions*/, 458 pData->pvIcmpBuffer /*=ReplyBuffer*/, 459 pData->szIcmpBuffer /*=ReplySize*/, 460 1 /*=Timeout in ms*/); 458 461 error = GetLastError(); 459 if ( status != 0 462 if ( status != 0 460 463 || error == ERROR_IO_PENDING) 461 464 { 465 /* no error! */ 462 466 m->m_so = &pData->icmp_socket; 463 467 icmp_attach(pData, m); … … 489 493 case ICMP_UNREACH: 490 494 case ICMP_TIMXCEED: 491 /* @todo(vvl): both up cases comes from guest, 492 * indeed right solution would be find the socket 493 * corresponding to ICMP data and close it. 495 /* @todo(vvl): both up cases comes from guest, 496 * indeed right solution would be find the socket 497 * corresponding to ICMP data and close it. 494 498 */ 495 499 case ICMP_PARAMPROB: … … 504 508 icmpstat.icps_badtype++; 505 509 } /* switch */ 506 507 end_error :510 511 end_error_free_m: 508 512 m_freem(pData, m); 509 513
Note:
See TracChangeset
for help on using the changeset viewer.