DnsServer Class Reference
DNS server class. More...
#include <DnsServer.h>
Inheritance diagram for DnsServer:
Collaboration diagram for DnsServer:
Public Member Functions | |
| DnsServer () | |
| void | setErrorReplyCode (DnsReplyCode replyCode) |
| Set error reply code. More... | |
| void | setTTL (uint32_t ttl) |
| Set message Time-To-Live in seconds. More... | |
| bool | start (uint16_t port, const String &domainName, const IpAddress &resolvedIP) |
| Start the DNS server. More... | |
| void | stop () |
| Stop the DNS server. More... | |
Public Member Functions inherited from UdpConnection | |
| UdpConnection () | |
| UdpConnection (UdpConnectionDataDelegate dataHandler) | |
| virtual | ~UdpConnection () |
| virtual bool | listen (int port) |
| virtual bool | connect (IpAddress ip, uint16_t port) |
| virtual void | close () |
| virtual bool | send (const char *data, int length) |
| bool | sendString (const char *data) |
| bool | sendString (const String &data) |
| virtual bool | sendTo (IpAddress remoteIP, uint16_t remotePort, const char *data, int length) |
| bool | sendStringTo (IpAddress remoteIP, uint16_t remotePort, const char *data) |
| bool | sendStringTo (IpAddress remoteIP, uint16_t remotePort, const String &data) |
| bool | setMulticast (IpAddress ip) |
| Sets the UDP multicast IP. More... | |
| bool | setMulticastTtl (size_t ttl) |
| Sets the UDP multicast Time-To-Live(TTL). More... | |
Public Member Functions inherited from IpConnection | |
| bool | joinMulticastGroup (IpAddress localIp, IpAddress multicastIp) |
| Uses IGMP to add a local network interface to multicast group. More... | |
| bool | joinMulticastGroup (IpAddress multicastIp) |
| Uses IGMP to add all local network interfaces to multicast group. More... | |
| bool | leaveMulticastGroup (IpAddress localIp, IpAddress multicastIp) |
| Uses IGMP to remove a local network interface from multicast group. More... | |
| bool | leaveMulticastGroup (IpAddress multicastIp) |
| Uses IGMP to remove all local network interfaces from multicast group. More... | |
Protected Member Functions | |
| void | onReceive (pbuf *buf, IpAddress remoteIP, uint16_t remotePort) override |
Protected Member Functions inherited from UdpConnection | |
| bool | initialize (udp_pcb *pcb=nullptr) |
Additional Inherited Members | |
Static Protected Member Functions inherited from UdpConnection | |
| static void | staticOnReceive (void *arg, struct udp_pcb *pcb, struct pbuf *p, LWIP_IP_ADDR_T *addr, u16_t port) |
Protected Attributes inherited from UdpConnection | |
| udp_pcb * | udp = nullptr |
| UdpConnectionDataDelegate | onDataCallback = nullptr |
Detailed Description
DNS server class.
Constructor & Destructor Documentation
◆ DnsServer()
|
inline |
Member Function Documentation
◆ onReceive()
|
overrideprotectedvirtual |
Reimplemented from UdpConnection.
◆ setErrorReplyCode()
|
inline |
Set error reply code.
◆ setTTL()
|
inline |
Set message Time-To-Live in seconds.
◆ start()
Start the DNS server.
- Parameters
-
port domainName resolvedIP
- Return values
-
bool true if successful, false if there are no sockets available.
◆ stop()
| void DnsServer::stop | ( | ) |
Stop the DNS server.
The documentation for this class was generated from the following file:
Public Member Functions inherited from
1.8.17