![]() |
Send() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Private Function |
Declared in: ICMPSocket.h |
BOOL Send( IP aDestinationAddress, unsigned char ucICMP, unsigned char ucType);
Send the data
try { //Generic ICMP send LPICMPHeader lpHead; lpHead=ConstructICMP(); if (!lpHead) { //Report it ReportError("Send","Failed to construct ICMP header!"); //Exit return FALSE; } //Protect it std::auto_ptr<ICMPHeader> pProtection(lpHead); //Set the values lpHead->ucICMPType=ucICMP; lpHead->ucICMPCode=ucType; //And the checksum lpHead->usICMPChecksum=CalculateChecksum((unsigned short*)lpHead,ICMPHeaderLength); //Send it BOOL bSend; bSend=SendICMP(lpHead, aDestinationAddress); //Exit return bSend; } ERROR_HANDLER_RETURN("Send",FALSE)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |