![]() |
CSniffingSocket::OnSocketReceive() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Private Function (Not Declared) |
Declared in: UDPScanner.h |
BOOL CSniffingSocket::OnSocketReceive( int iErrorCode);
CSniffingSocket end
try { //First check if no error code if (iErrorCode) return TRUE; //Let parent proccess if (CICMPSocketAsync::OnSocketReceive(iErrorCode)) //Check that this is the correct responce if (GetLastICMPHeader()->ucICMPType==ICMP_Unreachable && GetLastIPHeader()->ulSourceAddress==m_pFather->GetTarget()) { //Get the destination port UDPHeader aHeader; memcpy(&aHeader, GetLastData(), ICMP_DATA_SIZE); //Get the port unsigned short usPort; usPort=htons(aHeader.usDestinationPort); //Remove from list m_pFather->RemovePort(usPort); //Indicate status m_pFather->SocketDone(usPort, FALSE); //Done return TRUE; } //Done return TRUE; } ERROR_HANDLER_RETURN("OnSocketReceive",FALSE)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |