![]() |
GetRedirect() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Public Function |
Declared in: ICMPCrafter.h |
char * GetRedirect( unsigned char cType, IP aGatewayAddress, unsigned short& usTotalSize) const;
try { //Construct the header LPICMPHeader lpHead; lpHead=ConstructICMP(); if (!lpHead) { ReportError("GetRedirect","Failed to construct ICMP header!"); return FALSE; } //Protect it std::auto_ptr<ICMPHeader> pProtection(lpHead); //Set the values lpHead->ucICMPType=ICMP_Redirect; lpHead->ucICMPCode=cType; lpHead->sICMP.sUL=aGatewayAddress; //And the checksum lpHead->usICMPChecksum=CalculateChecksum((unsigned short*)lpHead,ICMPHeaderLength); //Create the packet return CreateFinal(lpHead, usTotalSize); } ERROR_HANDLER_RETURN("GetRedirect",NULL)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |