apps/resolv/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 "resolv.h"
#include "uip.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

Functions

void resolv_appcall (void)
void resolv_query (char *name)
 Queues a name so that a question for the name will be sent out.
u16_tresolv_lookup (char *name)
 Look up a hostname in the array of known hostnames.
u16_tresolv_getserver (void)
 Obtain the currently configured DNS server.
void resolv_conf (u16_t *dnsserver)
 Configure which DNS server to use for queries.
void resolv_init (void)
 Initalize the resolver.


Generated on Mon Jun 12 10:23:01 2006 for uIP 1.0 by  doxygen 1.4.6