![]() |
SendICMP() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Protected Function |
Declared in: ICMPSocket.h |
BOOL SendICMP( LPICMPHeader lpHead, LPCSTR lpDestinationAddress);
Send all ICMP data with headers
try { //Our buffer to send char* pSendBuffer; //Size of the buffer to send int iSendSize; iSendSize=ICMPHeaderLength; //Do we have an external buffer ? if (!m_pSendBuffer) pSendBuffer=(char*)lpHead; else { iSendSize+=m_iBufferSendSize; pSendBuffer=new char[m_iBufferSendSize]; //Copy the data memcpy(pSendBuffer,(char*)lpHead,ICMPHeaderLength); memcpy(pSendBuffer+ICMPHeaderLength,m_pSendBuffer,m_iBufferSendSize); } //Send it BOOL bSend; bSend=CSpoofSocket::Send(lpDestinationAddress,pSendBuffer,iSendSize); if (m_pSendBuffer) delete [] pSendBuffer; return bSend; } ERROR_HANDLER_RETURN("SendICMP",FALSE)
![]() |
Site content copyright © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001. |