24#ifndef PROTOCORE_DNS_SERVER_H
25#define PROTOCORE_DNS_SERVER_H
size_t pc_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 pc_dns_server_begin()
Start answering DNS queries on UDP/53 from the built-in table.
bool pc_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).
uint32_t(* DnsResolveFn)(const char *name)
Resolve a queried name to an IPv4 address.
void pc_dns_server_clear()
Remove every record from the built-in table.
uint32_t pc_dns_server_lookup(const char *name)
Look name up in the built-in table.