Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 1 | /* $NetBSD: resolv.h,v 1.31 2005/12/26 19:01:47 perry Exp $ */ |
| 2 | |
| 3 | /* |
| 4 | * Copyright (c) 1983, 1987, 1989 |
| 5 | * The Regents of the University of California. All rights reserved. |
| 6 | * |
| 7 | * Redistribution and use in source and binary forms, with or without |
| 8 | * modification, are permitted provided that the following conditions |
| 9 | * are met: |
| 10 | * 1. Redistributions of source code must retain the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer. |
| 12 | * 2. Redistributions in binary form must reproduce the above copyright |
| 13 | * notice, this list of conditions and the following disclaimer in the |
| 14 | * documentation and/or other materials provided with the distribution. |
| 15 | * 3. Neither the name of the University nor the names of its contributors |
| 16 | * may be used to endorse or promote products derived from this software |
| 17 | * without specific prior written permission. |
| 18 | * |
| 19 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 29 | * SUCH DAMAGE. |
| 30 | */ |
| 31 | |
| 32 | /* |
| 33 | * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") |
| 34 | * Portions Copyright (c) 1996-1999 by Internet Software Consortium. |
| 35 | * |
| 36 | * Permission to use, copy, modify, and distribute this software for any |
| 37 | * purpose with or without fee is hereby granted, provided that the above |
| 38 | * copyright notice and this permission notice appear in all copies. |
| 39 | * |
| 40 | * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES |
| 41 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 42 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR |
| 43 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 44 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 45 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 46 | * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 47 | */ |
| 48 | |
| 49 | /* |
| 50 | * @(#)resolv.h 8.1 (Berkeley) 6/2/93 |
| 51 | * Id: resolv.h,v 1.7.2.11.4.2 2004/06/25 00:41:05 marka Exp |
| 52 | */ |
| 53 | |
Bernie Innocenti | 189eb50 | 2018-10-01 23:10:18 +0900 | [diff] [blame] | 54 | #ifndef NETD_RESOLV_PRIVATE_H |
| 55 | #define NETD_RESOLV_PRIVATE_H |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 56 | |
chenbruce | 16adee4 | 2019-02-20 19:45:50 +0800 | [diff] [blame] | 57 | #include <android-base/logging.h> |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 58 | #include <net/if.h> |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 59 | #include <resolv.h> |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 60 | #include <time.h> |
chenbruce | 16adee4 | 2019-02-20 19:45:50 +0800 | [diff] [blame] | 61 | #include <string> |
Bernie Innocenti | 189eb50 | 2018-10-01 23:10:18 +0900 | [diff] [blame] | 62 | |
| 63 | #include "netd_resolv/params.h" |
nuccachen | e172a4e | 2018-10-23 17:10:58 +0800 | [diff] [blame] | 64 | #include "netd_resolv/resolv.h" |
Bernie Innocenti | 189eb50 | 2018-10-01 23:10:18 +0900 | [diff] [blame] | 65 | #include "netd_resolv/stats.h" |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 66 | #include "resolv_static.h" |
Frank Li | 08ce7b8 | 2019-06-27 10:11:52 -0700 | [diff] [blame] | 67 | #include "stats.pb.h" |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 68 | |
| 69 | // Linux defines MAXHOSTNAMELEN as 64, while the domain name limit in |
| 70 | // RFC 1034 and RFC 1035 is 255 octets. |
| 71 | #ifdef MAXHOSTNAMELEN |
| 72 | #undef MAXHOSTNAMELEN |
| 73 | #endif |
| 74 | #define MAXHOSTNAMELEN 256 |
| 75 | |
| 76 | /* |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 77 | * Global defines and variables for resolver stub. |
| 78 | */ |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 79 | #define MAXDFLSRCH 3 /* # default domain levels to try */ |
| 80 | #define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */ |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 81 | |
waynema | 2371eab | 2019-01-18 14:02:31 +0800 | [diff] [blame] | 82 | #define RES_TIMEOUT 5000 /* min. milliseconds between retries */ |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 83 | #define MAXRESOLVSORT 10 /* number of net to sort on */ |
| 84 | #define RES_MAXNDOTS 15 /* should reflect bit field size */ |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 85 | #define RES_DFLRETRY 2 /* Default #/tries. */ |
| 86 | #define RES_MAXTIME 65535 /* Infinity, in milliseconds. */ |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 87 | |
Bernie Innocenti | 189eb50 | 2018-10-01 23:10:18 +0900 | [diff] [blame] | 88 | struct res_state_ext; |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 89 | |
| 90 | struct __res_state { |
Bernie Innocenti | 2fd418e | 2018-08-30 12:04:03 +0900 | [diff] [blame] | 91 | unsigned netid; /* NetId: cache key and socket mark */ |
Bernie Innocenti | 2fd418e | 2018-08-30 12:04:03 +0900 | [diff] [blame] | 92 | u_long options; /* option flags - see below. */ |
| 93 | int nscount; /* number of name srvers */ |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 94 | struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ |
| 95 | #define nsaddr nsaddr_list[0] /* for backward compatibility */ |
| 96 | u_short id; /* current message id */ |
| 97 | char* dnsrch[MAXDNSRCH + 1]; /* components of domain to search */ |
| 98 | char defdname[256]; /* default domain (deprecated) */ |
Bernie Innocenti | 2fd418e | 2018-08-30 12:04:03 +0900 | [diff] [blame] | 99 | unsigned ndots : 4; /* threshold for initial abs. query */ |
| 100 | unsigned nsort : 4; /* number of elements in sort_list[] */ |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 101 | char unused[3]; |
| 102 | struct { |
| 103 | struct in_addr addr; |
| 104 | uint32_t mask; |
| 105 | } sort_list[MAXRESOLVSORT]; |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 106 | unsigned _mark; /* If non-0 SET_MARK to _mark on all request sockets */ |
| 107 | int _vcsock; /* PRIVATE: for res_send VC i/o */ |
| 108 | u_int _flags; /* PRIVATE: see below */ |
| 109 | u_int _pad; /* make _u 64 bit aligned */ |
| 110 | union { |
| 111 | /* On an 32-bit arch this means 512b total. */ |
| 112 | char pad[72 - 4 * sizeof(int) - 2 * sizeof(void*)]; |
| 113 | struct { |
| 114 | uint16_t nscount; |
| 115 | uint16_t nstimes[MAXNS]; /* ms. */ |
| 116 | int nssocks[MAXNS]; |
Bernie Innocenti | 189eb50 | 2018-10-01 23:10:18 +0900 | [diff] [blame] | 117 | struct res_state_ext* ext; /* extention for IPv6 */ |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 118 | } _ext; |
| 119 | } _u; |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 120 | struct res_static rstatic[1]; |
Mike Yu | a46fae7 | 2018-11-01 20:07:00 +0800 | [diff] [blame] | 121 | bool use_local_nameserver; /* DNS-over-TLS bypass */ |
Frank Li | 08ce7b8 | 2019-06-27 10:11:52 -0700 | [diff] [blame] | 122 | android::net::NetworkDnsEventReported* event; |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 123 | }; |
| 124 | |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 125 | typedef struct __res_state* res_state; |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 126 | |
| 127 | /* Retrieve a local copy of the stats for the given netid. The buffer must have space for |
| 128 | * MAXNS __resolver_stats. Returns the revision id of the resolvers used. |
| 129 | */ |
Bernie Innocenti | 34de3ba | 2019-02-19 18:08:36 +0900 | [diff] [blame] | 130 | int resolv_cache_get_resolver_stats(unsigned netid, res_params* params, res_stats stats[MAXNS]); |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 131 | |
| 132 | /* Add a sample to the shared struct for the given netid and server, provided that the |
| 133 | * revision_id of the stored servers has not changed. |
| 134 | */ |
Bernie Innocenti | a8cfe09 | 2018-09-13 16:00:42 +0900 | [diff] [blame] | 135 | void _resolv_cache_add_resolver_stats_sample(unsigned netid, int revision_id, int ns, |
Bernie Innocenti | 189eb50 | 2018-10-01 23:10:18 +0900 | [diff] [blame] | 136 | const res_sample* sample, int max_samples); |
Bernie Innocenti | ee1b85b | 2018-09-25 14:23:19 +0900 | [diff] [blame] | 137 | |
| 138 | // Calculate the round-trip-time from start time t0 and end time t1. |
| 139 | int _res_stats_calculate_rtt(const timespec* t1, const timespec* t0); |
| 140 | |
| 141 | // Create a sample for calculating server reachability statistics. |
Bernie Innocenti | 189eb50 | 2018-10-01 23:10:18 +0900 | [diff] [blame] | 142 | void _res_stats_set_sample(res_sample* sample, time_t now, int rcode, int rtt); |
Bernie Innocenti | ee1b85b | 2018-09-25 14:23:19 +0900 | [diff] [blame] | 143 | |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 144 | /* End of stats related definitions */ |
| 145 | |
Bernie Innocenti | 49009f4 | 2019-01-08 18:36:28 +0900 | [diff] [blame] | 146 | // Flags for res_state->_flags |
| 147 | #define RES_F_VC 0x00000001 // socket is TCP |
| 148 | #define RES_F_EDNS0ERR 0x00000004 // EDNS0 caused errors |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 149 | |
| 150 | /* |
| 151 | * Resolver options (keep these in synch with res_debug.c, please) |
| 152 | */ |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 153 | #define RES_INIT 0x00000001 /* address initialized */ |
| 154 | #define RES_DEBUG 0x00000002 /* print debug messages */ |
| 155 | #define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/ |
| 156 | #define RES_USEVC 0x00000008 /* use virtual circuit */ |
| 157 | #define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */ |
| 158 | #define RES_IGNTC 0x00000020 /* ignore trucation errors */ |
| 159 | #define RES_RECURSE 0x00000040 /* recursion desired */ |
| 160 | #define RES_DEFNAMES 0x00000080 /* use default domain name */ |
| 161 | #define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */ |
| 162 | #define RES_DNSRCH 0x00000200 /* search up local domain tree */ |
| 163 | #define RES_INSECURE1 0x00000400 /* type 1 security disabled */ |
| 164 | #define RES_INSECURE2 0x00000800 /* type 2 security disabled */ |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 165 | #define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */ |
| 166 | #define RES_ROTATE 0x00004000 /* rotate ns list after each query */ |
| 167 | #define RES_NOCHECKNAME 0x00008000 /* do not check names for sanity. */ |
| 168 | #define RES_KEEPTSIG 0x00010000 /* do not strip TSIG records */ |
| 169 | #define RES_BLAST 0x00020000 /* blast all recursive servers */ |
| 170 | #define RES_NOTLDQUERY 0x00100000 /* don't unqualified name as a tld */ |
| 171 | #define RES_USE_DNSSEC 0x00200000 /* use DNSSEC using OK bit in OPT */ |
| 172 | /* #define RES_DEBUG2 0x00400000 */ /* nslookup internal */ |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 173 | /* KAME extensions: use higher bit to avoid conflict with ISC use */ |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 174 | #define RES_USE_DNAME 0x10000000 /* use DNAME */ |
| 175 | #define RES_USE_EDNS0 0x40000000 /* use EDNS0 if configured */ |
| 176 | #define RES_NO_NIBBLE2 0x80000000 /* disable alternate nibble lookup */ |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 177 | |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 178 | #define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH | RES_NO_NIBBLE2) |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 179 | |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 180 | |
Hungming Chen | 7f0d329 | 2018-12-27 18:33:19 +0800 | [diff] [blame] | 181 | /* |
| 182 | * Error code extending h_errno codes defined in bionic/libc/include/netdb.h. |
| 183 | * |
| 184 | * This error code, including legacy h_errno, is returned from res_nquery(), res_nsearch(), |
| 185 | * res_nquerydomain(), res_queryN(), res_searchN() and res_querydomainN() for DNS metrics. |
| 186 | * |
| 187 | * TODO: Consider mapping legacy and extended h_errno into a unified resolver error code mapping. |
| 188 | */ |
| 189 | #define NETD_RESOLV_H_ERRNO_EXT_TIMEOUT RCODE_TIMEOUT |
| 190 | |
Mike Yu | 69615f6 | 2018-11-06 15:42:36 +0800 | [diff] [blame] | 191 | extern const char* const _res_opcodes[]; |
| 192 | |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 193 | /* Things involving an internal (static) resolver context. */ |
Bernie Innocenti | 4acba1a | 2018-09-26 11:52:04 +0900 | [diff] [blame] | 194 | struct __res_state* res_get_state(void); |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 195 | |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 196 | int res_hnok(const char*); |
| 197 | int res_ownok(const char*); |
| 198 | int res_mailok(const char*); |
| 199 | int res_dnok(const char*); |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 200 | int dn_skipname(const u_char*, const u_char*); |
| 201 | void putlong(uint32_t, u_char*); |
| 202 | void putshort(uint16_t, u_char*); |
Bernie Innocenti | d017e97 | 2019-03-03 19:39:53 +0900 | [diff] [blame] | 203 | |
| 204 | // Thread-unsafe functions returning pointers to static buffers :-( |
| 205 | // TODO: switch all res_debug to std::string |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 206 | const char* p_class(int); |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 207 | const char* p_type(int); |
| 208 | const char* p_rcode(int); |
Bernie Innocenti | d017e97 | 2019-03-03 19:39:53 +0900 | [diff] [blame] | 209 | const char* p_section(int, int); |
| 210 | |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 211 | int res_nameinquery(const char*, int, int, const u_char*, const u_char*); |
| 212 | int res_queriesmatch(const u_char*, const u_char*, const u_char*, const u_char*); |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 213 | /* Things involving a resolver context. */ |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 214 | int res_ninit(res_state); |
chenbruce | e8911f9 | 2019-03-06 13:52:43 +0800 | [diff] [blame] | 215 | void res_pquery(const u_char*, int); |
chenbruce | 16adee4 | 2019-02-20 19:45:50 +0800 | [diff] [blame] | 216 | |
Hungming Chen | 7f0d329 | 2018-12-27 18:33:19 +0800 | [diff] [blame] | 217 | int res_nquery(res_state, const char*, int, int, u_char*, int, int*); |
| 218 | int res_nsearch(res_state, const char*, int, int, u_char*, int, int*); |
| 219 | int res_nquerydomain(res_state, const char*, const char*, int, int, u_char*, int, int*); |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 220 | int res_nmkquery(res_state, int, const char*, int, int, const u_char*, int, const u_char*, u_char*, |
| 221 | int); |
Luke Huang | 952d094 | 2018-12-26 16:53:03 +0800 | [diff] [blame] | 222 | int res_nsend(res_state, const u_char*, int, u_char*, int, int*, uint32_t); |
Bernie Innocenti | f12d5bb | 2018-08-31 14:09:46 +0900 | [diff] [blame] | 223 | void res_nclose(res_state); |
Bernie Innocenti | a8cfe09 | 2018-09-13 16:00:42 +0900 | [diff] [blame] | 224 | int res_nopt(res_state, int, u_char*, int, int); |
Bernie Innocenti | 4acba1a | 2018-09-26 11:52:04 +0900 | [diff] [blame] | 225 | int res_vinit(res_state, int); |
Bernie Innocenti | a8cfe09 | 2018-09-13 16:00:42 +0900 | [diff] [blame] | 226 | void res_ndestroy(res_state); |
nuccachen | e172a4e | 2018-10-23 17:10:58 +0800 | [diff] [blame] | 227 | void res_setservers(res_state, const sockaddr_union*, int); |
| 228 | int res_getservers(res_state, sockaddr_union*, int); |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 229 | |
| 230 | struct android_net_context; /* forward */ |
Frank Li | 08ce7b8 | 2019-06-27 10:11:52 -0700 | [diff] [blame] | 231 | void res_setnetcontext(res_state, const struct android_net_context*, |
| 232 | android::net::NetworkDnsEventReported* event); |
Bernie Innocenti | 5586419 | 2018-08-30 04:05:20 +0900 | [diff] [blame] | 233 | |
Bernie Innocenti | c165ce8 | 2018-10-16 23:35:28 +0900 | [diff] [blame] | 234 | int getaddrinfo_numeric(const char* hostname, const char* servname, addrinfo hints, |
| 235 | addrinfo** result); |
| 236 | |
Mike Yu | 69615f6 | 2018-11-06 15:42:36 +0800 | [diff] [blame] | 237 | // Helper function for converting h_errno to the error codes visible to netd |
Hungming Chen | 7f0d329 | 2018-12-27 18:33:19 +0800 | [diff] [blame] | 238 | int herrnoToAiErrno(int herrno); |
Mike Yu | 69615f6 | 2018-11-06 15:42:36 +0800 | [diff] [blame] | 239 | |
chenbruce | 16adee4 | 2019-02-20 19:45:50 +0800 | [diff] [blame] | 240 | // switch resolver log severity |
| 241 | android::base::LogSeverity logSeverityStrToEnum(const std::string& logSeverityStr); |
| 242 | |
Frank Li | 08ce7b8 | 2019-06-27 10:11:52 -0700 | [diff] [blame] | 243 | template <typename Dest> |
| 244 | Dest saturate_cast(int64_t x) { |
| 245 | using DestLimits = std::numeric_limits<Dest>; |
| 246 | if (x > DestLimits::max()) return DestLimits::max(); |
| 247 | if (x < DestLimits::min()) return DestLimits::min(); |
| 248 | return static_cast<Dest>(x); |
| 249 | } |
| 250 | |
| 251 | android::net::NsType getQueryType(const uint8_t* msg, size_t msgLen); |
| 252 | |
| 253 | android::net::IpVersion ipFamilyToIPVersion(int ipFamily); |
| 254 | |
Bernie Innocenti | 189eb50 | 2018-10-01 23:10:18 +0900 | [diff] [blame] | 255 | #endif // NETD_RESOLV_PRIVATE_H |