|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
The DNS name on the wire (RFC 1035 sec 3.1, sec 4.1.4): labels in, dotted string out. More...
#include "protocore_config.h"Go to the source code of this file.
Classes | |
| struct | DnsWireMsgArgs |
| The message a name is read out of, and where its dotted text lands (RFC 1035 sec 4.1). More... | |
| struct | DnsWireTextArgs |
| The dotted name to write, and where its label sequence lands (RFC 1035 sec 3.1). More... | |
| struct | DnsWireCmpArgs |
| The pair a case-insensitive compare judges (RFC 1035 sec 2.3.3). More... | |
| struct | DnsWireVars |
| struct | DnsWireNs |
| The entries. More... | |
Macros | |
| #define | PROTOCORE_DNS_LABEL_MAX 63u |
| Longest label a name may carry, the six bits a length octet leaves (RFC 1035 sec 2.3.4). | |
| #define | PROTOCORE_DNS_PTR_HOPS 8u |
| Pointers one name may follow before it is read as a loop (RFC 1035 sec 4.1.4). | |
Functions | |
| void | protocore_dns_wire_decode (uint8_t *work) |
| void | protocore_dns_wire_encode (uint8_t *work) |
| void | protocore_dns_wire_eq (uint8_t *work) |
Variables | |
| DnsWireVars | DnsWireV |
| The operands and the outcome. | |
The DNS name on the wire (RFC 1035 sec 3.1, sec 4.1.4): labels in, dotted string out.
RFC 1035 sec 3.1: a domain name is a sequence of labels, each one a length octet followed by that many octets, ending in the null label of the root, which is a zero length octet. The high order two bits of a length octet are 00 for a label. RFC 1035 sec 4.1.4 gives 11 to a pointer, a two octet sequence whose remaining fourteen bits are the OFFSET of a prior occurrence of the same name in the message, and reserves 10 and 01.
Every DNS-shaped protocol carries that encoding, so it is written once here: the unicast server answering a query and the multicast responder advertising a service read and write names through this handle.
Names compare case-insensitively (RFC 1035 sec 2.3.3), which is a property of the encoding rather than of either caller, so the comparison sits here too.
Pure: no state, no allocation, no I/O.
Definition in file dns_wire.h.
| #define PROTOCORE_DNS_LABEL_MAX 63u |
Longest label a name may carry, the six bits a length octet leaves (RFC 1035 sec 2.3.4).
Definition at line 35 of file dns_wire.h.
| #define PROTOCORE_DNS_PTR_HOPS 8u |
Pointers one name may follow before it is read as a loop (RFC 1035 sec 4.1.4).
Definition at line 38 of file dns_wire.h.
| void protocore_dns_wire_decode | ( | uint8_t * | work | ) |
| void protocore_dns_wire_encode | ( | uint8_t * | work | ) |
| void protocore_dns_wire_eq | ( | uint8_t * | work | ) |
|
extern |
The operands and the outcome.