![]() |
CSniffingSocket::OnSocketReceive() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Private Function (Not Declared) |
Declared in: TCPPortScannerStealth.h |
BOOL CSniffingSocket::OnSocketReceive( int iErrorCode);
try { char cBuffer[2000]; //First receive the packet int iReceive; iReceive=Receive(cBuffer, sizeof(cBuffer)); //Are we stopped if (m_bStop) return FALSE; if (iReceive==GetErrorCode()) return FALSE; //Copy the header IpHeader aHeader; memcpy(&aHeader, cBuffer, IpHeaderLength); //Check the data is not from us (altough someone may want to save this data) if (aHeader.ucProtocol==IPPROTO_TCP && aHeader.ulDestinationAddress==m_pFather->GetBindInterface() && aHeader.ulSourceAddress==m_pFather->GetTarget()) { //Find the size of IP header (may have options) unsigned long ulHeaderSize; ulHeaderSize=(aHeader.ucHeaderLength_Version & 0x0f) << 2; //And check is it the scan ? AnalyzeTCP(cBuffer+ulHeaderSize); } //Done return TRUE; } ERROR_HANDLER_RETURN("OnSocketReceive",TRUE)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |