include/uapi/linux/dns_resolver.h

Source file repositories/reference/linux-study-clean/include/uapi/linux/dns_resolver.h

File Facts

System
Linux kernel
Corpus path
include/uapi/linux/dns_resolver.h
Extension
.h
Size
3904 bytes
Lines
117
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct dns_payload_header {
	__u8		zero;		/* Zero byte: marks this as not being text */
	__u8		content;	/* enum dns_payload_content_type */
	__u8		version;	/* Encoding version */
} __packed;

/*
 * Header at the beginning of a V1 server list.  This is followed directly by
 * the server records.  Each server records begins with a struct of type
 * dns_server_list_v1_server.
 */
struct dns_server_list_v1_header {
	struct dns_payload_header hdr;
	__u8		source;		/* enum dns_record_source */
	__u8		status;		/* enum dns_lookup_status */
	__u8		nr_servers;	/* Number of server records following this */
} __packed;

/*
 * Header at the beginning of each V1 server record.  This is followed by the
 * characters of the name with no NUL-terminator, followed by the address
 * records for that server.  Each address record begins with a struct of type
 * struct dns_server_list_v1_address.
 */
struct dns_server_list_v1_server {
	__u16		name_len;	/* Length of name (LE) */
	__u16		priority;	/* Priority (as SRV record) (LE) */
	__u16		weight;		/* Weight (as SRV record) (LE) */
	__u16		port;		/* UDP/TCP port number (LE) */
	__u8		source;		/* enum dns_record_source */
	__u8		status;		/* enum dns_lookup_status */
	__u8		protocol;	/* enum dns_payload_protocol_type */
	__u8		nr_addrs;
} __packed;

/*
 * Header at the beginning of each V1 address record.  This is followed by the
 * bytes of the address, 4 for IPV4 and 16 for IPV6.
 */
struct dns_server_list_v1_address {
	__u8		address_type;	/* enum dns_payload_address_type */
} __packed;

#endif /* _UAPI_LINUX_DNS_RESOLVER_H */

Annotation

Implementation Notes