![]() |
CSniffingSocket::OnSocketReceive() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
Private Function (Not Declared) |
Declared in: UDPScanner.h |
Declaration
BOOL CSniffingSocket::OnSocketReceive(
int iErrorCode);
DescriptionCSniffingSocket end
Function Body
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)
See Also
This web site was generated
using Surveyor V4.50.811.1. Click
here
for more information. |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |