add some code

This commit is contained in:
2025-09-05 13:25:11 +08:00
parent 9ff0a99e7a
commit 3cf1229a85
8911 changed files with 2535396 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#ifndef _DNS_SERVER_H_
#define _DNS_SERVER_H_
#include <string>
#include <esp_netif_ip_addr.h>
class DnsServer {
public:
DnsServer();
~DnsServer();
void Start(esp_ip4_addr_t gateway);
void Stop();
private:
int port_ = 53;
int fd_ = -1;
esp_ip4_addr_t gateway_;
void Run();
};
#endif // _DNS_SERVER_H_