Lines Matching refs:netid
30 static int getnetidfromhandle(net_handle_t handle, unsigned *netid) { in getnetidfromhandle() argument
39 if (netid != NULL) { in getnetidfromhandle()
40 *netid = ((handle >> (CHAR_BIT * sizeof(k32BitMask))) & k32BitMask); in getnetidfromhandle()
45 static net_handle_t gethandlefromnetid(unsigned netid) { in gethandlefromnetid() argument
46 if (netid == NETID_UNSET) { in gethandlefromnetid()
49 return (((net_handle_t) netid) << kHandleMagicSize) | kHandleMagic; in gethandlefromnetid()
53 unsigned netid; in android_setsocknetwork() local
54 if (!getnetidfromhandle(network, &netid)) { in android_setsocknetwork()
59 int rval = setNetworkForSocket(netid, fd); in android_setsocknetwork()
68 unsigned netid; in android_setprocnetwork() local
69 if (!getnetidfromhandle(network, &netid)) { in android_setprocnetwork()
74 int rval = setNetworkForProcess(netid); in android_setprocnetwork()
88 unsigned netid = getNetworkForProcess(); in android_getprocnetwork() local
89 *network = gethandlefromnetid(netid); in android_getprocnetwork()
94 unsigned netid; in android_setprocdns() local
95 if (!getnetidfromhandle(network, &netid)) { in android_setprocdns()
100 int rval = setNetworkForResolv(netid); in android_setprocdns()
114 unsigned netid; in android_getprocdns() local
115 int rval = getNetworkForDns(&netid); in android_getprocdns()
121 *network = gethandlefromnetid(netid); in android_getprocdns()
128 unsigned netid; in android_getaddrinfofornetwork() local
129 if (!getnetidfromhandle(network, &netid)) { in android_getaddrinfofornetwork()
134 return android_getaddrinfofornet(node, service, hints, netid, 0, res); in android_getaddrinfofornetwork()
139 unsigned netid; in android_res_nquery() local
140 if (!getnetidfromhandle(network, &netid)) { in android_res_nquery()
144 return resNetworkQuery(netid, dname, ns_class, ns_type, flags); in android_res_nquery()
153 unsigned netid; in android_res_nsend() local
154 if (!getnetidfromhandle(network, &netid)) { in android_res_nsend()
158 return resNetworkSend(netid, msg, msglen, flags); in android_res_nsend()