Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      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>
     22 enum dns_payload_content_type {
     23   DNS_PAYLOAD_IS_SERVER_LIST = 0,
     24 };
     25 enum dns_payload_address_type {
     26   DNS_ADDRESS_IS_IPV4 = 0,
     27   DNS_ADDRESS_IS_IPV6 = 1,
     28 };
     29 enum dns_payload_protocol_type {
     30   DNS_SERVER_PROTOCOL_UNSPECIFIED = 0,
     31   DNS_SERVER_PROTOCOL_UDP = 1,
     32   DNS_SERVER_PROTOCOL_TCP = 2,
     33 };
     34 enum 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 };
     43 enum 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 };
     54 struct dns_payload_header {
     55   __u8 zero;
     56   __u8 content;
     57   __u8 version;
     58 } __packed;
     59 struct dns_server_list_v1_header {
     60   struct dns_payload_header hdr;
     61   __u8 source;
     62   __u8 status;
     63   __u8 nr_servers;
     64 } __packed;
     65 struct 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;
     75 struct dns_server_list_v1_address {
     76   __u8 address_type;
     77 } __packed;
     78 #endif
     79