Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 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 Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_DNS_RESOLVER_H |
| 8 | #define _UAPI_LINUX_DNS_RESOLVER_H |
| 9 | #include <linux/types.h> |
| 10 | enum dns_payload_content_type { |
| 11 | DNS_PAYLOAD_IS_SERVER_LIST = 0, |
| 12 | }; |
| 13 | enum dns_payload_address_type { |
| 14 | DNS_ADDRESS_IS_IPV4 = 0, |
| 15 | DNS_ADDRESS_IS_IPV6 = 1, |
| 16 | }; |
| 17 | enum dns_payload_protocol_type { |
| 18 | DNS_SERVER_PROTOCOL_UNSPECIFIED = 0, |
| 19 | DNS_SERVER_PROTOCOL_UDP = 1, |
| 20 | DNS_SERVER_PROTOCOL_TCP = 2, |
| 21 | }; |
| 22 | enum 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 | }; |
| 31 | enum 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 | }; |
| 42 | struct dns_payload_header { |
| 43 | __u8 zero; |
| 44 | __u8 content; |
| 45 | __u8 version; |
Colin Cross | 4ac3322 | 2022-12-15 15:45:35 -0800 | [diff] [blame] | 46 | } __attribute__((__packed__)); |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 47 | struct dns_server_list_v1_header { |
| 48 | struct dns_payload_header hdr; |
| 49 | __u8 source; |
| 50 | __u8 status; |
| 51 | __u8 nr_servers; |
Colin Cross | 4ac3322 | 2022-12-15 15:45:35 -0800 | [diff] [blame] | 52 | } __attribute__((__packed__)); |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 53 | struct 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 Cross | 4ac3322 | 2022-12-15 15:45:35 -0800 | [diff] [blame] | 62 | } __attribute__((__packed__)); |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 63 | struct dns_server_list_v1_address { |
| 64 | __u8 address_type; |
Colin Cross | 4ac3322 | 2022-12-15 15:45:35 -0800 | [diff] [blame] | 65 | } __attribute__((__packed__)); |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 66 | #endif |