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

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

sockaddr_in pResolveDNS(
    LPCSTR lpAddress);

'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 adr;
memset(&adr,0,sizeof(adr));

try
{
    //Resolve the DNS
    hostent* hp;
    hp=gethostbyname(lpAddress);

    //Check if this address exists
    if (!hp)
        //Error
        SetLastError("pResolveDNS");
    else
        //Copy the data
        memcpy(&adr.sin_addr,hp->h_addr,hp->h_length);

    return adr;
}
ERROR_HANDLER_RETURN("pResolveDNS",adr)

'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 © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001.