Definition in file dns.c.
Go to the source code of this file.
Functions | |
void | dns_init (void) |
Initialize resources needed for the DNS client. | |
void | dns_retransmit (void) |
Retransmits requests towards the DNS server. | |
void | dns_run (void) |
DNS client main loop. | |
INT32 | dns_eventlistener (INT8 cbhandle, UINT8 event, UINT32 ipaddr, UINT16 port, UINT16 buffindex, UINT16 datalen) |
DNS client event listener. | |
UINT8 | get_host_by_name (UINT8 *host_name_ptr, void(*listener)(UINT8, UINT32)) |
Invokes DNS resolver. | |
Variables | |
UINT8 | dns_state |
UINT8 | dns_socket |
UINT8 | dns_timer |
UINT8 | dns_retries |
UINT32 | dns_tmp_ip |
UINT8 * | dns_hostptr |
|
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 142 of file dns.c. References DNS_ERROR_TIMEOUT, DNS_EVENT_ERROR, dns_hostptr, DNS_RESEND_PERIOD, dns_retries, dns_state, dns_timer, get_host_by_name(), init_timer(), and TIMERTIC. Referenced by dns_eventlistener(), and dns_run(). |
|
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(). |
|
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(). |
|
Current DNS state. Used to prevent multiple requests, issue retransmissions,... See DNS_STATE_* for possible values. Definition at line 88 of file dns.c. Referenced by dns_eventlistener(), dns_init(), dns_retransmit(), dns_run(), and get_host_by_name(). |
|
UDP socket used by the DNS resolver Definition at line 89 of file dns.c. Referenced by dns_eventlistener(), dns_init(), and get_host_by_name(). |
|
DNS timer handle used for retransmissions Definition at line 90 of file dns.c. Referenced by dns_init(), dns_retransmit(), dns_run(), and get_host_by_name(). |
|
DNS retry counter used for detecting timeouts Definition at line 91 of file dns.c. Referenced by dns_retransmit(), and get_host_by_name(). |
|
Used in many ways: as an IP address holder, for issuing requests to authorative name servers,.. Definition at line 93 of file dns.c. Referenced by dns_eventlistener(), and get_host_by_name(). |
|
Pointer to hostname that is beeing resolved. Needed for retransmissions. Definition at line 95 of file dns.c. Referenced by dns_eventlistener(), dns_retransmit(), and get_host_by_name(). |