std1.0.0-beta-7 SafeC docs

std :: net::dns

Function std::dns_parse_reply

#include <std/net/dns.h> source ยท definition

int dns_parse_reply(
    &PacketBuf pkt,
    unsigned long udp_payload_offset,
    unsigned short expected_txid,
    &unsigned int ip4_out,
)

Parse 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.