Go to the documentation of this file.
38 #ifndef DNS_NAME_MAX_RECURSION
39 #define DNS_NAME_MAX_RECURSION 4
40 #elif (DNS_NAME_MAX_RECURSION < 1 || DNS_NAME_MAX_RECURSION > 8)
41 #error DNS_NAME_MAX_RECURSION parameter is not valid
45 #define DNS_MESSAGE_MAX_SIZE 512
47 #define DNS_NAME_MAX_SIZE 255
49 #define DNS_LABEL_MAX_SIZE 63
52 #define DNS_MAX_IPV4_REVERSE_NAME_LEN 15
54 #define DNS_MAX_IPV6_REVERSE_NAME_LEN 63
60 #define DNS_COMPRESSION_TAG 0xC0
63 #define DNS_GET_QUESTION(message, offset) (DnsQuestion *) ((uint8_t *) (message) + (offset))
64 #define DNS_GET_RESOURCE_RECORD(message, offset) (DnsResourceRecord *) ((uint8_t *) (message) + (offset))
66 #define DNS_SET_NSEC_BITMAP(bitmap, type) bitmap[(type) / 8] |= 0x80 >> ((type) % 8)
67 #define DNS_CLR_NSEC_BITMAP(bitmap, type) bitmap[(type) / 8] &= ~(0x80 >> ((type) % 8))
161 #if defined(__CCRX__)
163 #elif defined(__CWCC__) || defined(_WIN32)
164 #pragma pack(push, 1)
175 #if defined(_CPU_BIG_ENDIAN) && !defined(__ICCRX__)
273 #if defined(__CCRX__)
275 #elif defined(__CWCC__) || defined(_WIN32)
289 size_t pos1,
const DnsHeader *message2,
size_t length2,
size_t pos2,
@ DNS_RR_TYPE_WKS
Well known service description.
@ DNS_OPCODE_IQUERY
Inverse query.
@ DNS_RCODE_YXRRSET
RR set exists when it should not.
@ DNS_RR_CLASS_ANY
Any class.
@ DNS_RCODE_BADCOOKIE
Bad server cookie.
void dnsGenerateIpv6ReverseName(const Ipv6Addr *ipv6Addr, char_t *buffer)
Generate domain name for reverse DNS lookup (IPv6)
@ DNS_RR_TYPE_SOA
Start of a zone of authority.
@ DNS_RR_TYPE_MINFO
Mailbox or mail list information.
@ DNS_RR_TYPE_NSEC
NSEC record.
@ DNS_RR_TYPE_EUI64
EUI-64 address.
@ DNS_RCODE_BADKEY
Key not recognized.
@ DNS_RCODE_NOTAUTH
Server not authoritative for zone.
DnsResponseCode
DNS response codes.
@ DNS_RR_CLASS_IN
Internet.
@ DNS_OPCODE_STATUS
Status.
DnsIpv4AddrResourceRecord
uint32_t Ipv4Addr
IPv4 network address.
@ DNS_RCODE_BADVERS
Bad OPT version.
@ DNS_RCODE_NXDOMAIN
Non-existent domain.
DnsIpv6AddrResourceRecord
@ DNS_RCODE_NOERROR
No error.
@ DNS_RR_TYPE_AXFR
Transfer of an entire zone.
@ DNS_RR_TYPE_ANY
A request for all records.
@ DNS_RCODE_YXDOMAIN
Name exists when it should not.
@ DNS_RCODE_BADALG
Algorithm not supported.
@ DNS_RR_TYPE_NB
NetBIOS name service.
size_t dnsParseName(const DnsHeader *message, size_t length, size_t pos, char_t *dest, uint_t level)
Decode a domain name that uses the DNS name encoding.
int_t dnsCompareEncodedName(const DnsHeader *message1, size_t length1, size_t pos1, const DnsHeader *message2, size_t length2, size_t pos2, uint_t level)
Compare domain names encoded with DNS notation.
@ DNS_RCODE_REFUSED
Query refused.
@ DNS_RR_TYPE_A
Host address.
@ DNS_RR_TYPE_PTR
Domain name pointer.
@ DNS_OPCODE_NOTIFY
Notify.
@ DNS_OPCODE_UPDATE
Update.
@ DNS_RCODE_FORMERR
Format error.
@ DNS_RR_TYPE_NS
Authoritative name server.
int_t dnsCompareName(const DnsHeader *message, size_t length, size_t pos, const char_t *name, uint_t level)
Compare domain names.
@ DNS_RCODE_BADTIME
Signature out of time window.
@ DNS_RCODE_BADTRUC
Bad truncation.
@ DNS_RCODE_BADSIG
TSIG signature failure.
@ DNS_RCODE_NOTZONE
Name not contained in zone.
DnsResourceRecordClass
DNS resource record classes.
@ DNS_RR_TYPE_TXT
Text strings.
size_t dnsEncodeName(const char_t *src, uint8_t *dest)
Encode a domain name using the DNS name notation.
@ DNS_RCODE_SERVFAIL
Server failure.
@ DNS_RCODE_BADNAME
Duplicate key name.
DnsResourceRecordType
DNS resource record types.
@ DNS_RR_TYPE_MX
Mail exchange.
@ DNS_RR_TYPE_CNAME
Canonical name for an alias.
void dnsGenerateIpv4ReverseName(Ipv4Addr ipv4Addr, char_t *buffer)
Generate domain name for reverse DNS lookup (IPv4)
@ DNS_RR_TYPE_EUI48
EUI-48 address.
typedef __packed_struct
DNS message header.
@ DNS_RR_TYPE_SRV
Server selection.
@ DNS_RCODE_NXRRSET
RR set that should exist does not.
@ DNS_RCODE_NOTIMP
Not implemented.
@ DNS_RR_TYPE_URI
Uniform resource identifier.
@ DNS_RR_TYPE_AAAA
IPv6 address.
@ DNS_RR_TYPE_NAPTR
Naming authority pointer.
@ DNS_RCODE_BADMODE
Bad TKEY mode.
@ DNS_RR_TYPE_HINFO
Host information.