24#ifndef DETERMINISTICESPASYNCWEBSERVER_DNS_SERVER_H
25#define DETERMINISTICESPASYNCWEBSERVER_DNS_SERVER_H
60bool dns_server_add(
const char *name, uint8_t a, uint8_t b, uint8_t c, uint8_t d);
uint32_t(* DnsResolveFn)(const char *name)
Resolve a queried name to an IPv4 address.
size_t dns_server_build_response(const uint8_t *query, size_t qlen, uint32_t ttl, DnsResolveFn resolve, uint8_t *out, size_t out_cap)
Build a DNS reply to query. Pure - no clock, no I/O.
bool dns_server_add(const char *name, uint8_t a, uint8_t b, uint8_t c, uint8_t d)
Add an A record to the built-in table (case-insensitive name).
bool dns_server_begin()
Start answering DNS queries on UDP/53 from the built-in table.
uint32_t dns_server_lookup(const char *name)
Look name up in the built-in table.
void dns_server_clear()
Remove every record from the built-in table.