Class CTCPPortScannerStealth::
CSniffingSocket::AnalyzeTCP()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: CreateSnifferNext page: CSniffingSocket::CSniffingSocket    Show member index
Private Function
(Not Declared)
Declared in:
TCPPortScannerStealth.h

'Declaration' icon -- Shortcut to top of page. Declaration

void CSniffingSocket::AnalyzeTCP(
    const char* pTCPBuffer);

'Function Body' icon -- Shortcut to top of page. 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' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Public base class CTCPPortScanner  |  Hierarchy Chart Hierarchy Chart


Get Surveyor!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.