Class CSpoofSocket::
InternalResolveDNS()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: InitializeIPNext page: IsCreated    Show member index
Private Function Declared in:
SpoofSocket.h

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

static sockaddr_in InternalResolveDNS(
    const std::string& rAddress);

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

Reseolve DNS

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

//Convert it to the address
sockaddr_in aAddr;
memset(&aAddr,0,sizeof(aAddr));

try
{
    //Resolve the DNS
    hostent* pData;
    pData=gethostbyname(rAddress.c_str());

    //Check if this address exists
    if (pData)
        //Copy the data
        memcpy(&aAddr.sin_addr,
               pData->h_addr,
               pData->h_length);

    return aAddr;
}
ERROR_HANDLER_STATIC_RETURN(CSpoofSocket_LOGNAME,"InternalResolveDNS",aAddr)

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

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