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))
147 #if defined(__CWCC__) || defined(_WIN32)
148 #pragma pack(push, 1)
156 typedef __start_packed
struct
159 #if defined(_CPU_BIG_ENDIAN) && !defined(__ICCRX__)
190 typedef __start_packed
struct
201 typedef __start_packed
struct
215 typedef __start_packed
struct
229 typedef __start_packed
struct
243 typedef __start_packed
struct
257 #if defined(__CWCC__) || defined(_WIN32)
@ DNS_RR_TYPE_WKS
Well known service description.
__start_packed struct @2 DnsResourceRecord
Resource record format.
@ DNS_RR_CLASS_ANY
Any class.
@ DNS_RCODE_SERVER_FAILURE
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.
__start_packed struct @0 DnsHeader
DNS message header.
@ DNS_RR_TYPE_NSEC
NSEC record.
@ DNS_RR_TYPE_EUI64
EUI-64 address.
@ DNS_RR_CLASS_IN
Internet.
uint32_t Ipv4Addr
IPv4 network address.
@ DNS_RCODE_QUERY_REFUSED
@ DNS_RR_TYPE_AXFR
Transfer of an entire zone.
__start_packed struct @4 DnsIpv6AddrResourceRecord
AAAA resource record format.
@ DNS_RR_TYPE_ANY
A request for all records.
@ 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_RR_TYPE_A
Host address.
__start_packed struct _Ipv4Header __end_packed
@ DNS_RR_TYPE_PTR
Domain name pointer.
__start_packed struct @5 DnsSrvResourceRecord
SRV resource record format.
@ 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.
DnsResourceRecordClass
DNS resource record classes.
__start_packed struct @1 DnsQuestion
Question format.
@ 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.
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.
@ DNS_RR_TYPE_SRV
Server selection.
@ DNS_RCODE_NOT_IMPLEMENTED
DnsReturnCode
DNS return codes.
@ DNS_OPCODE_INVERSE_QUERY
@ DNS_RR_TYPE_URI
Uniform resource identifier.
@ DNS_RR_TYPE_AAAA
IPv6 address.
__start_packed struct @0 Ipv6Addr
IPv6 network address.
@ DNS_RR_TYPE_NAPTR
Naming authority pointer.
__start_packed struct @3 DnsIpv4AddrResourceRecord
A resource record format.
@ DNS_RR_TYPE_HINFO
Host information.