40 #ifndef LWIP_HDR_PROT_DNS_H
41 #define LWIP_HDR_PROT_DNS_H
50 #ifndef DNS_SERVER_PORT
51 #define DNS_SERVER_PORT 53
55 #define DNS_RRTYPE_A 1
56 #define DNS_RRTYPE_NS 2
57 #define DNS_RRTYPE_MD 3
58 #define DNS_RRTYPE_MF 4
59 #define DNS_RRTYPE_CNAME 5
60 #define DNS_RRTYPE_SOA 6
61 #define DNS_RRTYPE_MB 7
62 #define DNS_RRTYPE_MG 8
63 #define DNS_RRTYPE_MR 9
64 #define DNS_RRTYPE_NULL 10
65 #define DNS_RRTYPE_WKS 11
66 #define DNS_RRTYPE_PTR 12
67 #define DNS_RRTYPE_HINFO 13
68 #define DNS_RRTYPE_MINFO 14
69 #define DNS_RRTYPE_MX 15
70 #define DNS_RRTYPE_TXT 16
71 #define DNS_RRTYPE_AAAA 28
72 #define DNS_RRTYPE_SRV 33
73 #define DNS_RRTYPE_ANY 255
76 #define DNS_RRCLASS_IN 1
77 #define DNS_RRCLASS_CS 2
78 #define DNS_RRCLASS_CH 3
79 #define DNS_RRCLASS_HS 4
80 #define DNS_RRCLASS_ANY 255
81 #define DNS_RRCLASS_FLUSH 0x800
84 #define DNS_FLAG1_RESPONSE 0x80
85 #define DNS_FLAG1_OPCODE_STATUS 0x10
86 #define DNS_FLAG1_OPCODE_INVERSE 0x08
87 #define DNS_FLAG1_OPCODE_STANDARD 0x00
88 #define DNS_FLAG1_AUTHORATIVE 0x04
89 #define DNS_FLAG1_TRUNC 0x02
90 #define DNS_FLAG1_RD 0x01
91 #define DNS_FLAG2_RA 0x80
92 #define DNS_FLAG2_ERR_MASK 0x0f
93 #define DNS_FLAG2_ERR_NONE 0x00
94 #define DNS_FLAG2_ERR_NAME 0x03
96 #define DNS_HDR_GET_OPCODE(hdr) ((((hdr)->flags1) >> 3) & 0xF)
98 #ifdef PACK_STRUCT_USE_INCLUDES
113 #ifdef PACK_STRUCT_USE_INCLUDES
116 #define SIZEOF_DNS_HDR 12
122 #ifndef DNS_MQUERY_PORT
123 #define DNS_MQUERY_PORT 5353
127 #ifndef DNS_MQUERY_IPV4_GROUP_INIT
128 #define DNS_MQUERY_IPV4_GROUP_INIT IPADDR4_INIT_BYTES(224,0,0,251)
132 #ifndef DNS_MQUERY_IPV6_GROUP_INIT
133 #define DNS_MQUERY_IPV6_GROUP_INIT IPADDR6_INIT_HOST(0xFF020000,0,0,0xFB)
#define PACK_STRUCT_END
Definition: arch.h:316
uint8_t u8_t
Definition: arch.h:125
#define PACK_STRUCT_BEGIN
Definition: arch.h:307
uint16_t u16_t
Definition: arch.h:127
PACK_STRUCT_BEGIN struct dns_hdr PACK_STRUCT_STRUCT
PACK_STRUCT_FIELD(u16_t numquestions)
PACK_STRUCT_FIELD(u16_t id)
PACK_STRUCT_FIELD(u16_t numanswers)
PACK_STRUCT_FIELD(u16_t numauthrr)
PACK_STRUCT_FIELD(u16_t numextrarr)
PACK_STRUCT_FLD_8(u8_t flags2)
PACK_STRUCT_FLD_8(u8_t flags1)