Class CRealTimeTraceRouteSocket::
PingDoneData()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: OnSocketTimeoutNext page: ResolveData    Show member index
Private Function Declared in:
RealTimeTraceRouteSocket.h

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

virtual void PingDoneData(
    IP aReplyingAddress,
    unsigned char ucTTL,
    DWORD dwTimeElapsed,
    int iDataSize,
    unsigned short usID,
    BOOL bTTLExpired);

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

Our ping data

'Function Body' icon -- Shortcut to top of page. Function Body

try
{
    //Are we done
    if (m_bTraceDone ||
        m_bPartialDone)
        return;

    if (usID>mhMaxHops)
        return;

    //Do we got it already
    if (m_aData[usID].aReplyingAddress)
        return;

    if (!bTTLExpired)
    {
        //Did we resolve target ?
        if (!m_aData[mhMaxHops].aReplyingAddress)
        {
            {
                //Lock the data
                CCriticalAutoRelease aRelease(m_aData[mhMaxHops].pCSection.get(),TRUE);

                //Put the data
                m_aData[mhMaxHops].aReplyingAddress=aReplyingAddress;
                m_aData[mhMaxHops].dwElapsedTime=dwTimeElapsed;
                m_aData[mhMaxHops].ucTTL=usID;
            }

            //Do we need to send it ?
            if (m_bResolveIPs)
            {
                //Set the resolvers
                AdjustResolvers(1);

                //Create the data
                ResolveThreadData* pThreadData;
                pThreadData=new ResolveThreadData;

                //Populate it
                pThreadData->pClass=this;
                pThreadData->pData=&m_aData[mhMaxHops];

                //Add the reverse DNS
                m_pManager->GetThreadManager()->SubmitJob(ResolveData,(LPVOID)pThreadData);
            }

            //Call it for modify
            TraceDataForModify(&m_aData[mhMaxHops],
                               FALSE);

            //Call user routing
            TraceData(&m_aData[mhMaxHops],
                      FALSE);
        }
    }
    else
    {
        {
            //Lock the data
            CCriticalAutoRelease aRelease(m_pCSection,TRUE);

            //Are we the lowest
            if (usID<m_ucMinHOP)
                m_ucMinHOP=usID;

            //Are we the lowest
            if (usID>m_ucMaxHOP)
                m_ucMaxHOP=usID;
        }

        {
            //Lock the data
            CCriticalAutoRelease aRelease(m_aData[usID].pCSection.get(),TRUE);

            //Populate the data
            m_aData[usID].aReplyingAddress=aReplyingAddress;
            m_aData[usID].dwElapsedTime=dwTimeElapsed;
            m_aData[usID].ucTTL=usID;
            m_aData[usID].pDNS=m_pManager;
        }

        //Do we need to resolve
        if (m_bResolveIPs)
        {
            //Set the resolvers
            AdjustResolvers(1);

            //Create the data
            ResolveThreadData* pThreadData;
            pThreadData=new ResolveThreadData;

            //Populate it
            pThreadData->pClass=this;
            pThreadData->pData=&m_aData[usID];

            //Add the reverse DNS
            m_pManager->GetThreadManager()->SubmitJob(ResolveData,(LPVOID)pThreadData);
        }

        //Call for modify
        TraceDataForModify(&m_aData[usID],
                           FALSE);

        //Call user routing
        TraceData(&m_aData[usID],
                  FALSE);
    }
}
ERROR_HANDLER("PingDoneData")

'See Also' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Public base class CPingSocket  |  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.