#include <Dns.h>
|
| void | begin (const IPAddress &aDNSServer) |
| | Sets the DNS server used for host name lookups.
|
| |
| int | inet_aton (const char *address, IPAddress &result) |
| | Converts a dotted-decimal IP address string to an IP address.
|
| |
| int | getHostByName (const char *aHostname, IPAddress &aResult) |
| | Resolves a host name to an IP address.
|
| |
|
| uint16_t | BuildRequest (const char *aName) |
| | Deprecated. Does nothing.
|
| |
| uint16_t | ProcessResponse (uint16_t aTimeout, IPAddress &aAddress) |
| | Deprecated. Does nothing.
|
| |
◆ begin()
| void DNSClient::begin |
( |
const IPAddress & |
aDNSServer | ) |
|
Sets the DNS server used for host name lookups.
Passes the server to the LwIP DNS resolver. Has no effect if DHCP has already started.
- Parameters
-
| aDNSServer | DNS server address. |
◆ BuildRequest()
| uint16_t DNSClient::BuildRequest |
( |
const char * |
aName | ) |
|
|
protected |
Deprecated. Does nothing.
- Deprecated:
- Do not use.
- Parameters
-
- Returns
- Always 0.
◆ getHostByName()
| int DNSClient::getHostByName |
( |
const char * |
aHostname, |
|
|
IPAddress & |
aResult |
|
) |
| |
Resolves a host name to an IP address.
A numeric address string is converted directly. Otherwise the name is resolved through the DNS server set with begin().
- Parameters
-
| aHostname | Host name or numeric address to resolve. |
| aResult | IPAddress that receives the resolved address. |
- Returns
- 1 on success. -2 if no valid DNS server is set. Otherwise the error code of the resolver: -1 on timeout, -2 if no address was found, or -4 on an LwIP error.
◆ inet_aton()
| int DNSClient::inet_aton |
( |
const char * |
address, |
|
|
IPAddress & |
result |
|
) |
| |
Converts a dotted-decimal IP address string to an IP address.
- Parameters
-
| address | IP address string to convert, in the form "a.b.c.d" with each part in the range 0 to 255. |
| result | IPAddress that receives the converted address. It may be partly written even if the conversion fails. |
- Returns
- 1 if the string was converted, 0 otherwise.
◆ ProcessResponse()
| uint16_t DNSClient::ProcessResponse |
( |
uint16_t |
aTimeout, |
|
|
IPAddress & |
aAddress |
|
) |
| |
|
protected |
Deprecated. Does nothing.
- Deprecated:
- Do not use.
- Parameters
-
| aTimeout | Unused. |
| aAddress | Unused. |
- Returns
- Always -10, cast to uint16_t.
◆ iDNSServer
| IPAddress DNSClient::iDNSServer |
|
protected |
The documentation for this class was generated from the following files: