![]() |
pResolveDNS() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Private Function |
Declared in: SpoofSocket.h |
Declaration
sockaddr_in pResolveDNS(
LPCSTR lpAddress);
DescriptionReseolve DNS
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
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. |