Definition in file dns.h.
Go to the source code of this file.
Defines | |
#define | DNS_UDP_PORT 53 |
#define | DNS_SERVER_IP 0xac100201 |
#define | DNS_RESEND_PERIOD 2 |
#define | DNS_NUM_RETRIES 5 |
#define | DNS_EVENT_ERROR 0 |
#define | DNS_EVENT_SUCCESS 1 |
#define | DNS_ERROR_FORMAT 1 |
#define | DNS_ERROR_SERVER_FAILURE 2 |
#define | DNS_ERROR_NAME_ERROR 3 |
#define | DNS_ERROR_NOT_IMPLEMENTED 4 |
#define | DNS_ERROR_REFUSED 5 |
#define | DNS_ERROR_TIMEOUT 16 |
#define | DNS_ERROR_GENERAL 17 |
#define | DNS_ERROR_BUSY -4 |
#define | DNS_ERROR_LABEL -5 |
#define | DNS_ERROR_NAME -6 |
#define | DNS_ERROR_OVERFLOW -7 |
Functions | |
UINT8 | get_host_by_name (UINT8 *host_name_ptr, void(*listener)(UINT8, UINT32)) |
Invokes DNS resolver. | |
void | dns_init (void) |
Initialize resources needed for the DNS client. | |
void | dns_run (void) |
DNS client main loop. | |
INT32 | dns_eventlistener (INT8, UINT8, UINT32, UINT16, UINT16, UINT16) |
DNS client event listener. |
|
DNS client will use this port for sending and receiving of DNS packets Definition at line 69 of file dns.h. Referenced by dns_init(), and get_host_by_name(). |
|
DNS server's IP address Definition at line 73 of file dns.h. Referenced by get_host_by_name(). |
|
Period in seconds for resending DNS requests Definition at line 75 of file dns.h. Referenced by dns_retransmit(), and get_host_by_name(). |
|
Number of retries that DNS client will perform before aborting name resolving Definition at line 78 of file dns.h. Referenced by get_host_by_name(). |
|
Error event reported by DNS client to event_listener Definition at line 84 of file dns.h. Referenced by dns_eventlistener(), and dns_retransmit(). |
|
Resolving successfull event reported by DNS client to event_listener Definition at line 87 of file dns.h. Referenced by dns_eventlistener(). |
|
The name server was unable to interpret the query (RFC1035) |
|
The name server was unable to process this query due to a problem with the name server (RFC1035) |
|
Meaningful only for responses from an authoritative name server, this code signifies that the domain name referenced in the query does not exist (RFC1035) |
|
The name server does not support the requested kind of query (RFC1035) |
|
The name server refuses to perform the specified operation for policy reasons. (RFC 1035) |
|
Timeout occured while DNS was trying to resolve the host name. New request should be issued if the address is needed Definition at line 119 of file dns.h. Referenced by dns_retransmit(). |
|
General (not specific) error occured while resolving host name. Definition at line 124 of file dns.h. Referenced by dns_eventlistener(). |
|
Returned from get_host_by_name(): DNS client is currently busy with another request and is unable the process a new one Definition at line 135 of file dns.h. Referenced by get_host_by_name(). |
|
Returned from get_host_by_name(): Part of the host name (label) consists of more than 63 characters. |
|
Returned from get_host_by_name(): Host name too long (more than 263 bytes) |
|
net_buf too small for the entire DNS request to be stored in it. |
|
Definition at line 445 of file dns.c. References DNS_ERROR_BUSY, dns_hostptr, DNS_NUM_RETRIES, DNS_RESEND_PERIOD, dns_retries, DNS_SERVER_IP, dns_socket, dns_state, dns_timer, dns_tmp_ip, DNS_UDP_PORT, init_timer(), NETWORK_TX_BUFFER_SIZE, RESET_SYSTEM, TIMERTIC, UDP_APP_OFFSET, and udp_send(). Referenced by dns_retransmit(). |
|
Definition at line 108 of file dns.c. References dns_eventlistener(), dns_socket, dns_state, dns_timer, DNS_UDP_PORT, get_timer(), udp_getsocket(), udp_open(), UDP_OPT_CHECK_CS, and UDP_OPT_SEND_CS. |
|
Definition at line 168 of file dns.c. References check_timer(), dns_retransmit(), dns_state, and dns_timer. |
|
If we received the IP address we requested, DNS_EVENT_SUCCESS is reported to application DNS event listener. Otherwise DNS_EVENT_ERROR is reported. Definition at line 205 of file dns.c. References DNS_ERROR_GENERAL, DNS_EVENT_ERROR, DNS_EVENT_SUCCESS, dns_hostptr, dns_retransmit(), dns_socket, dns_state, dns_tmp_ip, RECEIVE_NETWORK_B, and UDP_EVENT_DATA. Referenced by dns_init(). |