net/dns.h File Reference

DNS Client Module Header. More...

#include "net\compiler.h"
#include "net\stacktsk.h"

Functions

BOOL DNSIsResolved (IP_ADDR *HostIP)
void DNSResolve (BYTE *HostName)


Detailed Description

DNS Client Module Header.

Author:
Modtronix Engineering
Dependencies:
stacktsk.h, tcp.h
Compiler:
MPLAB C18 v2.10 or higher
Microchip C30 v2.01 or higher HITECH PICC-18 V8.35PL3 or higher

Description

DNS Client module.


For a detailed description, see the DNS section of this document - in [Modules] [TCP/IP Stack] [TCP/IP User Protocols].

Configuration

The following defines are used to configure this module, and should be placed in the projdefs.h (or similar) file. For details, see Project Configuration. To configure the module, the required defines should be uncommended, and the rest commented out.
 //*********************************************************************
 //-------------------- DNS  Configuration --------------------
 //*********************************************************************
 // DNS Port. If not defined in "projdefs.h" file, defaults to 53
 #define DNS_PORT        53

 // DNS Timeout. If not defined in "projdefs.h" file, defaults to 500ms
 #define DNS_TIMEOUT        ((TICK)TICK_SECOND * (TICK)2)

Function Documentation

BOOL DNSIsResolved ( IP_ADDR HostIP  ) 

Call DNSIsResolved() until the host is resolved. You cannot start two DNS resolution proceedures concurrently. You must not modify *Hostname until DNSIsResolved() returns TRUE.

Pre-Condition:
DNSResolve() was called.
Parameters:
HostIP 4 byte IP address

void DNSResolve ( BYTE HostName  ) 

Call DNSIsResolved() until the host is resolved. A UDP socket must be available before this function is called. It is freed at the end of the resolution. MAX_UDP_SOCKETS may need to be increased if other modules use UDP sockets. You must not modify Hostname until DNSIsResolved() returns TRUE.

Pre-Condition:
Stack is initialized()
Parameters:
HostName Null terminated string specifying the host address to resolve to an IP address.


Generated on Wed Feb 3 12:45:34 2010 for SBC65EC Web Server by  doxygen 1.5.8