Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Examples

resolv.c File Reference


Detailed Description

DNS host name to IP address resolver.

Author:
Adam Dunkels <adam@dunkels.com>
This file implements a DNS host name to IP address resolver.

Definition in file resolv.c.

#include "net/tcpip.h"
#include "net/resolv.h"
#include <string.h>

Go to the source code of this file.

Defines

#define NULL   (void *)0
#define MAX_RETRIES   8
#define DNS_FLAG1_RESPONSE   0x80
#define DNS_FLAG1_OPCODE_STATUS   0x10
#define DNS_FLAG1_OPCODE_INVERSE   0x08
#define DNS_FLAG1_OPCODE_STANDARD   0x00
#define DNS_FLAG1_AUTHORATIVE   0x04
#define DNS_FLAG1_TRUNC   0x02
#define DNS_FLAG1_RD   0x01
#define DNS_FLAG2_RA   0x80
#define DNS_FLAG2_ERR_MASK   0x0f
#define DNS_FLAG2_ERR_NONE   0x00
#define DNS_FLAG2_ERR_NAME   0x03
#define STATE_UNUSED   0
#define STATE_NEW   1
#define STATE_ASKING   2
#define STATE_DONE   3
#define STATE_ERROR   4
#define RESOLV_ENTRIES   4

Enumerations

enum  

Functions

 PROCESS_THREAD (resolv_process, ev, data)
void resolv_query (char *name)
 Queues a name so that a question for the name will be sent out.
u16_t * resolv_lookup (char *name)
 Look up a hostname in the array of known hostnames.
u16_t * resolv_getserver (void)
 Obtain the currently configured DNS server.
void resolv_conf (u16_t *dnsserver)
 Configure a DNS server.
void resolv_found (char *name, u16_t *ipaddr)

Variables

process_event_t resolv_event_found
 Event that is broadcasted when a DNS name has been resolved.


Generated on Thu Jun 22 17:45:43 2006 for Contiki 2.x by  doxygen 1.4.4