DNS
[User Protocols]

Collaboration diagram for DNS:

Detailed Description

Domain name service protocol.


Functions

void DumpDnsHeader (FILE *stream, DNSHEADER *doh)
void DumpDnsQuestion (FILE *stream, DNSQUESTION *doq)
void DumpDnsResource (FILE *stream, DNSRESOURCE *dor)
void NutDnsConfig2 (u_char *hostname, u_char *domain, u_long pdnsip, u_long sdnsip)
 Set DNS configuration.
void NutDnsConfig (u_char *hostname, u_char *domain, u_long dnsip)
 Sets DNS configuration.
void NutDnsGetConfig2 (char **hostname, char **domain, u_long *pdnsip, u_long *sdnsip)
u_long NutDnsGetResource (CONST u_char *hostname, CONST u_short type)
 Retrieves IP-address corresponding to a host name.
u_long NutDnsGetHostByName (CONST u_char *hostname)
u_long NutDnsGetMxByDomain (CONST u_char *hostname)


Function Documentation

void DumpDnsHeader ( FILE stream,
DNSHEADER *  doh 
)

Definition at line 142 of file resolv.c.

References fprintf().

void DumpDnsQuestion ( FILE stream,
DNSQUESTION *  doq 
)

Definition at line 149 of file resolv.c.

References fprintf().

void DumpDnsResource ( FILE stream,
DNSRESOURCE *  dor 
)

Definition at line 154 of file resolv.c.

References fprintf(), and fputc().

void NutDnsConfig2 ( u_char hostname,
u_char domain,
u_long  pdnsip,
u_long  sdnsip 
)

Set DNS configuration.

Parameters:
hostname DNS name of the local host.
domain Name of the domain of the local host.
pdnsip IP address of the primary DNS server.
sdnsip IP address of the secondary DNS server.

Definition at line 387 of file resolv.c.

References NutHeapAlloc(), NutHeapFree(), strcpy(), and strlen().

void NutDnsConfig ( u_char hostname,
u_char domain,
u_long  dnsip 
)

Sets DNS configuration.

Deprecated:
New applications should use NutDnsConfig2().
Parameters:
hostname DNS name of the local host.
domain Name of the domain of the local host.
dnsip IP address of the DNS server.

Definition at line 418 of file resolv.c.

References NutDnsConfig2().

void NutDnsGetConfig2 ( char **  hostname,
char **  domain,
u_long pdnsip,
u_long sdnsip 
)

Definition at line 423 of file resolv.c.

u_long NutDnsGetResource ( CONST u_char hostname,
CONST u_short  type 
)

Retrieves IP-address corresponding to a host name.

This is a very simple implementation, which will not return any other resource information than the IP address.

Parameters:
hostname Fully qualified domain name of the host.
type Request type.
Returns:
IP address, which is zero, if the name could not be resolved.

Definition at line 463 of file resolv.c.

References NutHeapAlloc(), NutHeapFree(), NutUdpCreateSocket(), NutUdpDestroySocket(), NutUdpReceiveFrom(), and NutUdpSendTo().

Referenced by NutDnsGetHostByName(), and NutDnsGetMxByDomain().

u_long NutDnsGetHostByName ( CONST u_char hostname  ) 

Definition at line 453 of file resolv.c.

References NutDnsGetResource().

u_long NutDnsGetMxByDomain ( CONST u_char hostname  ) 

Definition at line 458 of file resolv.c.

References NutDnsGetResource().


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/