![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
Minimal DNS message helpers implementation. More...
Include dependency graph for n_dns.c:Go to the source code of this file.
Macros | |
| #define | N_DNS_HEADER_LEN 12 |
| DNS header size in bytes (id, flags, and the four section counts). | |
Functions | |
| int | n_dns_build_a_response (const unsigned char *query, size_t qlen, uint32_t ipv4_be, uint32_t ttl, unsigned char *out, size_t outsz) |
| Build a DNS response answering a query's first question with one A record. | |
| int | n_dns_parse_query (const unsigned char *msg, size_t len, uint16_t *id_out, char *qname_out, size_t qname_sz, uint16_t *qtype_out) |
| Parse the header id and the first question (QNAME + QTYPE) of a DNS message. | |
| static uint16_t | n_dns_u16 (const unsigned char *msg, size_t off) |
| #define N_DNS_HEADER_LEN 12 |
|
static |
Definition at line 35 of file n_dns.c.
Referenced by n_dns_build_a_response(), and n_dns_parse_query().
Here is the caller graph for this function: