blob: cd9df83e3ddfd8facba1a3b6e4977f301eaa0fdd [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferris86a48372019-01-10 14:14:59 -08007#ifndef _UAPI_LINUX_DNS_RESOLVER_H
8#define _UAPI_LINUX_DNS_RESOLVER_H
9#include <linux/types.h>
10enum dns_payload_content_type {
11 DNS_PAYLOAD_IS_SERVER_LIST = 0,
12};
13enum dns_payload_address_type {
14 DNS_ADDRESS_IS_IPV4 = 0,
15 DNS_ADDRESS_IS_IPV6 = 1,
16};
17enum dns_payload_protocol_type {
18 DNS_SERVER_PROTOCOL_UNSPECIFIED = 0,
19 DNS_SERVER_PROTOCOL_UDP = 1,
20 DNS_SERVER_PROTOCOL_TCP = 2,
21};
22enum dns_record_source {
23 DNS_RECORD_UNAVAILABLE = 0,
24 DNS_RECORD_FROM_CONFIG = 1,
25 DNS_RECORD_FROM_DNS_A = 2,
26 DNS_RECORD_FROM_DNS_AFSDB = 3,
27 DNS_RECORD_FROM_DNS_SRV = 4,
28 DNS_RECORD_FROM_NSS = 5,
29 NR__dns_record_source
30};
31enum dns_lookup_status {
32 DNS_LOOKUP_NOT_DONE = 0,
33 DNS_LOOKUP_GOOD = 1,
34 DNS_LOOKUP_GOOD_WITH_BAD = 2,
35 DNS_LOOKUP_BAD = 3,
36 DNS_LOOKUP_GOT_NOT_FOUND = 4,
37 DNS_LOOKUP_GOT_LOCAL_FAILURE = 5,
38 DNS_LOOKUP_GOT_TEMP_FAILURE = 6,
39 DNS_LOOKUP_GOT_NS_FAILURE = 7,
40 NR__dns_lookup_status
41};
42struct dns_payload_header {
43 __u8 zero;
44 __u8 content;
45 __u8 version;
Colin Cross4ac33222022-12-15 15:45:35 -080046} __attribute__((__packed__));
Christopher Ferris86a48372019-01-10 14:14:59 -080047struct dns_server_list_v1_header {
48 struct dns_payload_header hdr;
49 __u8 source;
50 __u8 status;
51 __u8 nr_servers;
Colin Cross4ac33222022-12-15 15:45:35 -080052} __attribute__((__packed__));
Christopher Ferris86a48372019-01-10 14:14:59 -080053struct dns_server_list_v1_server {
54 __u16 name_len;
55 __u16 priority;
56 __u16 weight;
57 __u16 port;
58 __u8 source;
59 __u8 status;
60 __u8 protocol;
61 __u8 nr_addrs;
Colin Cross4ac33222022-12-15 15:45:35 -080062} __attribute__((__packed__));
Christopher Ferris86a48372019-01-10 14:14:59 -080063struct dns_server_list_v1_address {
64 __u8 address_type;
Colin Cross4ac33222022-12-15 15:45:35 -080065} __attribute__((__packed__));
Christopher Ferris86a48372019-01-10 14:14:59 -080066#endif