Home
last modified time | relevance | path

Searched refs:netcontext (Results 1 – 19 of 19) sorted by relevance

/aosp12/packages/modules/DnsResolver/
H A Dresolv_private.h91 ResState(const android_net_context* netcontext, android::net::NetworkDnsEventReported* dnsEvent) in ResState()
92 : netid(netcontext->dns_netid), in ResState()
93 uid(netcontext->uid), in ResState()
94 pid(netcontext->pid), in ResState()
95 _mark(netcontext->dns_mark), in ResState()
97 netcontext_flags(netcontext->flags) {} in ResState()
H A DDnsProxyListener.cpp597 mNetContext(netcontext) {} in GetAddrInfoHandler()
831 android_net_context netcontext; in runCommand() local
832 gResNetdCallbacks.get_network_context(netId, uid, &netcontext); in runCommand()
835 netcontext.flags |= NET_CONTEXT_FLAG_USE_LOCAL_NAMESERVERS; in runCommand()
885 android_net_context netcontext; in runCommand() local
886 gResNetdCallbacks.get_network_context(netId, uid, &netcontext); in runCommand()
1033 android_net_context netcontext; in runCommand() local
1037 netcontext.app_netid |= NETID_USE_LOCAL_NAMESERVERS; in runCommand()
1074 android_net_context netcontext; in runCommand() local
1220 android_net_context netcontext; in runCommand() local
[all …]
H A DDns64Configuration.cpp82 android_net_context netcontext{}; in startPrefixDiscovery() local
83 mGetNetworkContextCallback(evalCfg.netId, 0, &netcontext); in startPrefixDiscovery()
87 netcontext.flags |= NET_CONTEXT_FLAG_USE_LOCAL_NAMESERVERS; in startPrefixDiscovery()
88 if (doRfc7050PrefixDiscovery(netcontext, &evalCfg)) { in startPrefixDiscovery()
149 bool Dns64Configuration::doRfc7050PrefixDiscovery(const android_net_context& netcontext, in doRfc7050PrefixDiscovery() argument
165 resolv_getaddrinfo(kIPv4OnlyHost, nullptr, &hints, &netcontext, &res, &event); in doRfc7050PrefixDiscovery()
H A DDnsProxyListener.h69 std::unique_ptr<addrinfo> hints, const android_net_context& netcontext);
95 const android_net_context& netcontext);
121 const android_net_context& netcontext);
148 const android_net_context& netcontext);
H A Dgetaddrinfo.h25 const addrinfo* hints, const android_net_context* netcontext,
30 const android_net_context* netcontext, addrinfo** res,
H A Dgethnamaddr.h32 const android_net_context* netcontext, hostent** result,
37 size_t buflen, const android_net_context* netcontext, hostent** result,
H A Dgetaddrinfo.cpp144 const android_net_context* netcontext, addrinfo** rv,
264 const android_net_context netcontext = { in getaddrinfo_numeric() local
329 assert(netcontext != nullptr); in android_getaddrinfofornetcontext()
418 assert(netcontext != nullptr); in resolv_getaddrinfo()
462 addrinfo** res, const android_net_context* netcontext, in explore_fqdn() argument
475 if (!files_getaddrinfo(netcontext->dns_netid, hostname, pai, &result)) { in explore_fqdn()
476 error = dns_getaddrinfo(hostname, pai, netcontext, &result, event); in explore_fqdn()
1406 query_ipv6 = have_ipv6(netcontext->app_mark, netcontext->uid); in dns_getaddrinfo()
1407 query_ipv4 = have_ipv4(netcontext->app_mark, netcontext->uid); in dns_getaddrinfo()
1438 ResState res(netcontext, event); in dns_getaddrinfo()
[all …]
H A DResolverController.cpp159 [](uint32_t netId, uint32_t uid, android_net_context* netcontext) { in ResolverController() argument
160 gResNetdCallbacks.get_network_context(netId, uid, netcontext); in ResolverController()
194 android_net_context netcontext; in setResolverConfiguration() local
195 gResNetdCallbacks.get_network_context(resolverParams.netId, 0 /* uid */, &netcontext); in setResolverConfiguration()
208 resolverParams.netId, netcontext.app_mark, tlsServers, resolverParams.tlsName, in setResolverConfiguration()
H A Dgethnamaddr.cpp113 const android_net_context* netcontext, getnamaddr* info,
389 const android_net_context* netcontext, hostent** result, in resolv_gethostbyname() argument
396 ResState res(netcontext, event); in resolv_gethostbyname()
478 size_t buflen, const struct android_net_context* netcontext, in resolv_gethostbyaddr() argument
521 int error = dns_gethtbyaddr(uaddr, len, af, netcontext, &info, event); in resolv_gethostbyaddr()
687 const android_net_context* netcontext, getnamaddr* info, in dns_gethtbyaddr() argument
732 ResState res(netcontext, event); in dns_gethtbyaddr()
H A DDns64Configuration.h108 static bool doRfc7050PrefixDiscovery(const android_net_context& netcontext, Dns64Config* cfg);
/aosp12/bionic/libc/dns/net/
H A Dgethnamaddr.c797 res_setnetcontext(res, netcontext); in gethostbyname_internal()
834 const struct android_net_context *netcontext) in android_gethostbyaddrfornetcontext_real() argument
1210 const struct android_net_context *netcontext; in _dns_gethtbyaddr() local
1259 res_setnetcontext(res, netcontext); in _dns_gethtbyaddr()
1564 netcontext.app_netid = netid; in make_context()
1565 netcontext.app_mark = mark; in make_context()
1566 netcontext.dns_netid = netid; in make_context()
1567 netcontext.dns_mark = mark; in make_context()
1568 return netcontext; in make_context()
1580 const struct android_net_context *netcontext) in android_gethostbynamefornetcontext() argument
[all …]
H A Dgetaddrinfo.c574 struct android_net_context netcontext = { in android_getaddrinfofornet() local
602 assert(netcontext != NULL); in android_getaddrinfofornetcontext()
734 hostname, servname, hints, res, netcontext->app_netid); in android_getaddrinfofornetcontext()
767 pai, hostname, servname, &cur->ai_next, netcontext); in android_getaddrinfofornetcontext()
801 const struct android_net_context *netcontext) in explore_fqdn() argument
827 default_dns_files, hostname, pai, netcontext)) { in explore_fqdn()
1903 const struct android_net_context *netcontext; in _dns_getaddrinfo() local
1936 query_ipv6 = _have_ipv6(netcontext->app_mark, netcontext->uid); in _dns_getaddrinfo()
1937 query_ipv4 = _have_ipv4(netcontext->app_mark, netcontext->uid); in _dns_getaddrinfo()
1989 res_setnetcontext(res, netcontext); in _dns_getaddrinfo()
[all …]
H A Dgetnameinfo.c317 const struct android_net_context netcontext = { .app_netid = netid, .app_mark = mark }; in getnameinfo_inet() local
318 hp = android_gethostbyaddrfornetcontext_proxy(addr, afd->a_addrlen, afd->a_af, &netcontext); in getnameinfo_inet()
/aosp12/packages/modules/DnsResolver/include/netd_resolv/
H A Dresolv.h78 android_net_context* netcontext);
103 const android_net_context &netcontext, const char *host);
/aosp12/bionic/libc/dns/resolv/
H A Dres_init.c771 void res_setnetcontext(res_state statp, const struct android_net_context *netcontext) in res_setnetcontext() argument
774 statp->netid = netcontext->dns_netid; in res_setnetcontext()
775 statp->_mark = netcontext->dns_mark; in res_setnetcontext()
776 statp->qhook = netcontext->qhook; in res_setnetcontext()
777 if (netcontext->flags & NET_CONTEXT_FLAG_USE_EDNS) { in res_setnetcontext()
/aosp12/system/netd/server/
H A Dmain.cpp73 void getNetworkContextCallback(uint32_t netId, uint32_t uid, android_net_context* netcontext) { in getNetworkContextCallback() argument
74 gCtls->netCtrl.getNetworkContext(netId, uid, netcontext); in getNetworkContextCallback()
H A DNetworkController.cpp311 unsigned netId, uid_t uid, struct android_net_context* netcontext) const { in getNetworkContext()
354 if (netcontext) { in getNetworkContext()
355 *netcontext = nc; in getNetworkContext()
H A DNetworkController.h104 void getNetworkContext(unsigned netId, uid_t uid, struct android_net_context* netcontext) const;
/aosp12/packages/modules/DnsResolver/tests/
H A Dresolv_gold_test.cpp199 const android_net_context netcontext = GetNetContext(protocol); in VerifyGetAddrInfo() local
202 resolv_getaddrinfo(args.host().c_str(), nullptr, &hints, &netcontext, &res, &event); in VerifyGetAddrInfo()
214 const android_net_context netcontext = GetNetContext(protocol); in VerifyGetHostByName() local
217 sizeof(tmpbuf), &netcontext, &hp, &event); in VerifyGetHostByName()