Domain name service protocol. More...
|
Data Structures | |
| struct | DNSHEADER |
| struct | DNSQUESTION |
| struct | DNSRESOURCE |
Functions | |
| void | NutDnsConfig2 (CONST uint8_t *hostname, CONST uint8_t *domain, uint32_t pdnsip, uint32_t sdnsip) |
| Set DNS configuration. | |
| void | DumpDnsHeader (FILE *stream, DNSHEADER *doh) |
| void | DumpDnsQuestion (FILE *stream, DNSQUESTION *doq) |
| void | DumpDnsResource (FILE *stream, DNSRESOURCE *dor) |
| void | NutDnsConfig (CONST uint8_t *hostname, CONST uint8_t *domain, uint32_t dnsip) |
| Sets DNS configuration. | |
| void | NutDnsGetConfig2 (char **hostname, char **domain, uint32_t *pdnsip, uint32_t *sdnsip) |
| uint32_t | NutDnsGetResource (CONST uint8_t *hostname, CONST uint16_t type) |
| Retrieves IP-address corresponding to a host name. | |
| uint32_t | NutDnsGetHostByName (CONST uint8_t *hostname) |
| uint8_t | NutDnsGetResourceAll (CONST uint8_t *hostname, CONST uint16_t type, uint32_t *ip_all) |
| Retrieves all IP-address corresponding to a host name. | |
| uint8_t | NutDnsGetHostsByName (CONST uint8_t *hostname, uint32_t *ip_all) |
| uint32_t | NutDnsGetMxByDomain (CONST uint8_t *hostname) |
Variables | |
| DNSCONFIG | confdns |
| DNSCONFIG | confdns |
Domain name service protocol.
| void NutDnsConfig2 | ( | CONST uint8_t * | hostname, |
| CONST uint8_t * | domain, | ||
| uint32_t | pdnsip, | ||
| uint32_t | sdnsip | ||
| ) |
Set DNS configuration.
| hostname | DNS name of the local host. |
| domain | Name of the domain of the local host. |
| pdnsip | IP address of the primary DNS server. |
| sdnsip | IP address of the secondary DNS server. |
Definition at line 75 of file confdns.c.
References DNSCONFIG::doc_domain, DNSCONFIG::doc_hostname, DNSCONFIG::doc_ip1, DNSCONFIG::doc_ip2, free(), and strdup().
Referenced by main(), NutDhcpIfConfig(), and NutDnsConfig().

Definition at line 92 of file resolv.c.
References DNSHEADER::doh_addrr, DNSHEADER::doh_answers, DNSHEADER::doh_authrr, DNSHEADER::doh_flags, DNSHEADER::doh_id, DNSHEADER::doh_quests, and fprintf().

| void DumpDnsQuestion | ( | FILE * | stream, |
| DNSQUESTION * | doq | ||
| ) |
Definition at line 99 of file resolv.c.
References DNSQUESTION::doq_class, DNSQUESTION::doq_name, DNSQUESTION::doq_type, and fprintf().

| void DumpDnsResource | ( | FILE * | stream, |
| DNSRESOURCE * | dor | ||
| ) |
Definition at line 105 of file resolv.c.
References DNSRESOURCE::dor_class, DNSRESOURCE::dor_data, DNSRESOURCE::dor_len, DNSRESOURCE::dor_name, DNSRESOURCE::dor_ttl, DNSRESOURCE::dor_type, fprintf(), and fputc().

Sets DNS configuration.
| hostname | DNS name of the local host. |
| domain | Name of the domain of the local host. |
| dnsip | IP address of the DNS server. |
Definition at line 338 of file resolv.c.
References NutDnsConfig2().

Definition at line 343 of file resolv.c.
References DNSCONFIG::doc_domain, DNSCONFIG::doc_hostname, DNSCONFIG::doc_ip1, and DNSCONFIG::doc_ip2.
Retrieves IP-address corresponding to a host name.
This is a very simple implementation, which will not return any other resource information than the IP address.
| hostname | Fully qualified domain name of the host. |
| type | Request type. |
Definition at line 403 of file resolv.c.
References DNSCONFIG::doc_ip1, DNSCONFIG::doc_ip2, DNSHEADER::doh_answers, DNSHEADER::doh_id, DNSHEADER::doh_quests, DNSRESOURCE::dor_data, DNSRESOURCE::dor_len, DNSRESOURCE::dor_type, free(), malloc(), NutUdpCreateSocket(), NutUdpDestroySocket(), NutUdpReceiveFrom(), and NutUdpSendTo().
Referenced by NutDnsGetHostByName(), and NutDnsGetMxByDomain().

Definition at line 373 of file resolv.c.
References NutDnsGetResource().
Referenced by main().

Retrieves all IP-address corresponding to a host name.
This is a very simple implementation, which will not return any other resource information than the IP address.
| hostname | Fully qualified domain name of the host. |
| type | Request type. |
| ip_all | Array of IP Addresses. |
Definition at line 524 of file resolv.c.
References DNSCONFIG::doc_ip1, DNSCONFIG::doc_ip2, DNSHEADER::doh_answers, DNSHEADER::doh_id, DNSHEADER::doh_quests, DNSRESOURCE::dor_data, DNSRESOURCE::dor_len, DNSRESOURCE::dor_type, NutHeapAlloc, NutHeapFree, NutUdpCreateSocket(), NutUdpDestroySocket(), NutUdpReceiveFrom(), and NutUdpSendTo().
Referenced by NutDnsGetHostsByName().

Definition at line 393 of file resolv.c.
References NutDnsGetResourceAll().

Definition at line 398 of file resolv.c.
References NutDnsGetResource().
