![]() |
CSniffingSocket::AnalyzeTCP() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
Private Function (Not Declared) |
Declared in: TCPPortScannerStealth.h |
Declaration
void CSniffingSocket::AnalyzeTCP(
const char* pTCPBuffer);
Function Body
try
{
//Read the ICMP header
TCPHeader aHeader;
memcpy(&aHeader,
pTCPBuffer,
TCPHeaderLength);
//Our port
unsigned short usPort;
usPort=htons(aHeader.usSourcePort);
//Is it connection
int iConnection;
iConnection=-1;
//Check the flag
if (aHeader.ucFlags==(TCPFlag_SYN | TCPFlag_ACK))
//Connected
iConnection=1;
else if (aHeader.ucFlags==(TCPFlag_RST | TCPFlag_ACK))
//Not connected
iConnection=0;
//Are we connected
if (iConnection!=-1)
{
//Remove from list
m_pFather->RemovePort(usPort);
//Indicate status
m_pFather->SocketDone(usPort,
iConnection);
}
}
ERROR_HANDLER("AnalyzeTCP")
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. |