std1.0.0-beta-7 SafeC docs

Module net::dns

#include <std/net/dns.h> source

DNS (minimal stub resolver) Builds a DNS A-record query packet; parses the first A-record from the reply. Freestanding-safe.

Functions

dns_query
dns_parse_replyParse a DNS reply in pkt (starting at UDP payload offset). On success fills ip4_out with the first A record and returns 1. Returns 0 on parse error / no A record.

Macros

DNS_PORT
DNS_MAX_NAME
DNS_MAX_MSG