34 #define DNS_IS_COMPRESSED( byte ) ( (byte) & 0xc0 ) 42 #define DNS_COMPRESSED_OFFSET( word ) ( (word) & ~0xc000 ) 50 #define DNS_LABEL_LEN( byte ) ( (byte) & ~0xc0 ) 53 #define DNS_MAX_LABEL_LEN 0x3f 56 #define DNS_MAX_NAME_LEN 255 62 #define DNS_MAX_CNAME_RECURSION 32 81 #define DNS_FLAG_RD 0x0100 92 #define DNS_CLASS_IN 1 118 #define DNS_TYPE_AAAA 28 129 #define DNS_TYPE_CNAME 5 struct dns_rr_common common
Common fields.
struct dns_rr_common common
Common fields.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint32_t first
First block in range.
int dns_encode(const char *string, struct dns_name *name)
Encode a DNS name using RFC1035 encoding.
void * data
Start of data.
uint32_t ttl
Time to live.
int dns_copy(struct dns_name *src, struct dns_name *dst)
Copy a DNS name.
struct dns_rr_common common
Common fields.
int dns_compare(struct dns_name *first, struct dns_name *second)
Compare DNS names for equality.
uint16_t qtype
Query type.
An RFC1035-encoded DNS name.
int dns_decode(struct dns_name *name, char *data, size_t len)
Decode RFC1035-encoded DNS name.
size_t offset
Offset of name within data.
struct dns_rr_a a
"A" record
uint16_t qclass
Query class.
struct dns_rr_common common
Common fields.
struct dns_rr_aaaa aaaa
"AAAA" record
uint8_t data[48]
Additional event data.
int dns_skip(struct dns_name *name)
Skip RFC1035-encoded DNS name.
size_t len
Total length of data.
static __always_inline int off_t userptr_t second
uint16_t rdlength
Resource data length.
struct dns_rr_cname cname
"CNAME" record