Contiki-NG
Macros | Enumerations | Functions | Variables
resolv.h File Reference

uIP DNS resolver code header file. More...

#include "contiki.h"
#include "uip.h"

Go to the source code of this file.

Macros

#define RESOLV_CONF_SUPPORTS_MDNS   (1)
 If RESOLV_CONF_SUPPORTS_MDNS is set, then queries for domain names in the local TLD will use MDNS and will respond to MDNS queries for this device's hostname, as described by draft-cheshire-dnsext-multicastdns.
 

Enumerations

enum  {
  RESOLV_STATUS_CACHED = 0, RESOLV_STATUS_UNCACHED, RESOLV_STATUS_EXPIRED, RESOLV_STATUS_NOT_FOUND,
  RESOLV_STATUS_RESOLVING, RESOLV_STATUS_ERROR
}
 

Functions

resolv_status_t resolv_lookup (const char *name, uip_ipaddr_t **ipaddr)
 Look up a hostname in the array of known hostnames. More...
 
void resolv_query (const char *name)
 Queues a name so that a question for the name will be sent out. More...
 
void resolv_set_hostname (const char *hostname)
 Changes the local hostname advertised by MDNS. More...
 
const char * resolv_get_hostname (void)
 Returns the local hostname being advertised via MDNS. More...
 

Variables

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

Detailed Description

uIP DNS resolver code header file.

Author
Adam Dunkels adam@.nosp@m.dunk.nosp@m.els.c.nosp@m.om

Definition in file resolv.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RESOLV_STATUS_CACHED 

Hostname is fresh and usable.

This response is cached and will eventually expire to RESOLV_STATUS_EXPIRED.

RESOLV_STATUS_UNCACHED 

Hostname was not found in the cache.

Use resolv_query() to look it up.

RESOLV_STATUS_EXPIRED 

Hostname was found, but it's status has expired.

The address returned should not be used. Use resolv_query() to freshen it up.

RESOLV_STATUS_NOT_FOUND 

The server has returned a not-found response for this domain name.

This response is cached for the period described in the server. You may issue a new query at any time using resolv_query(), but you will generally want to wait until this domain's status becomes RESOLV_STATUS_EXPIRED.

RESOLV_STATUS_RESOLVING 

This hostname is in the process of being resolved.

Try again soon.

RESOLV_STATUS_ERROR 

Some sort of server error was encountered while trying to look up this record.

This response is cached and will eventually expire to RESOLV_STATUS_EXPIRED.

Definition at line 60 of file resolv.h.