Main Page Data Structures File List Data Fields Globals Related Pages

# clib/dns.h

Go to the documentation of this file.

    00001 /*
    00002
    00003  dns.h
    00004
    00005  header file for DNS routines.
    00006
    00007  Created by Ernest Schloesser, Beck IPC GmbH on january 31st 2001
    00008
    00009
    00010 */
    00011
    00012 /*
    00013     gethostbyname
    00014     This is the function it is all about.
    00015     It prepares the request
    00016     Opens the socket
    00017     Sends the request
    00018     Receives the answer
    00019     Interprets the answer
    00020     Closes the socket
    00021
    00022     return 1 on succes
    00023 */
    00024 int gethostbyname(  const char *dnsServerIP, // where to ask for the dns resolution
    00025         const char *domainName,  // The domain name "www.beck-ipc.com"
    00026         unsigned long *ttl,      // Time to live in seconds
    00027         unsigned long *IP,       // The 32 bit IP
    00028         char *dest);             // The IP as text (make sure it is long enough)
    00029