blob: 21cb5c032853d9a637ee121cfff273c911dcb100 [file] [log] [blame]
Colin Cross07a58322022-02-08 19:45:27 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_DNS_RESOLVER_H
20#define _UAPI_LINUX_DNS_RESOLVER_H
21#include <linux/types.h>
22enum dns_payload_content_type {
23 DNS_PAYLOAD_IS_SERVER_LIST = 0,
24};
25enum dns_payload_address_type {
26 DNS_ADDRESS_IS_IPV4 = 0,
27 DNS_ADDRESS_IS_IPV6 = 1,
28};
29enum dns_payload_protocol_type {
30 DNS_SERVER_PROTOCOL_UNSPECIFIED = 0,
31 DNS_SERVER_PROTOCOL_UDP = 1,
32 DNS_SERVER_PROTOCOL_TCP = 2,
33};
34enum dns_record_source {
35 DNS_RECORD_UNAVAILABLE = 0,
36 DNS_RECORD_FROM_CONFIG = 1,
37 DNS_RECORD_FROM_DNS_A = 2,
38 DNS_RECORD_FROM_DNS_AFSDB = 3,
39 DNS_RECORD_FROM_DNS_SRV = 4,
40 DNS_RECORD_FROM_NSS = 5,
41 NR__dns_record_source
42};
43enum dns_lookup_status {
44 DNS_LOOKUP_NOT_DONE = 0,
45 DNS_LOOKUP_GOOD = 1,
46 DNS_LOOKUP_GOOD_WITH_BAD = 2,
47 DNS_LOOKUP_BAD = 3,
48 DNS_LOOKUP_GOT_NOT_FOUND = 4,
49 DNS_LOOKUP_GOT_LOCAL_FAILURE = 5,
50 DNS_LOOKUP_GOT_TEMP_FAILURE = 6,
51 DNS_LOOKUP_GOT_NS_FAILURE = 7,
52 NR__dns_lookup_status
53};
54struct dns_payload_header {
55 __u8 zero;
56 __u8 content;
57 __u8 version;
58} __packed;
59struct dns_server_list_v1_header {
60 struct dns_payload_header hdr;
61 __u8 source;
62 __u8 status;
63 __u8 nr_servers;
64} __packed;
65struct dns_server_list_v1_server {
66 __u16 name_len;
67 __u16 priority;
68 __u16 weight;
69 __u16 port;
70 __u8 source;
71 __u8 status;
72 __u8 protocol;
73 __u8 nr_addrs;
74} __packed;
75struct dns_server_list_v1_address {
76 __u8 address_type;
77} __packed;
78#endif