• Home
  • Raw
  • Download

Lines Matching refs:netId

195     unsigned netId = netIdForProcess & ~NETID_USE_LOCAL_NAMESERVERS;  in netdClientSocket()  local
196 if (netId != NETID_UNSET && FwmarkClient::shouldSetFwmark(domain)) { in netdClientSocket()
197 if (int error = setNetworkForSocket(netId, socketFd)) { in netdClientSocket()
246 unsigned getNetworkForResolv(unsigned netId) { in getNetworkForResolv() argument
247 if (netId != NETID_UNSET) { in getNetworkForResolv()
248 return netId; in getNetworkForResolv()
254 netId = netIdForProcess; in getNetworkForResolv()
255 if (netId != NETID_UNSET) { in getNetworkForResolv()
256 return netId; in getNetworkForResolv()
261 int setNetworkForTarget(unsigned netId, std::atomic_uint* target) { in setNetworkForTarget() argument
262 const unsigned requestedNetId = netId; in setNetworkForTarget()
263 netId &= ~NETID_USE_LOCAL_NAMESERVERS; in setNetworkForTarget()
265 if (netId == NETID_UNSET) { in setNetworkForTarget()
266 *target = netId; in setNetworkForTarget()
278 int error = setNetworkForSocket(netId, socketFd); in setNetworkForTarget()
459 extern "C" int getNetworkForSocket(unsigned* netId, int socketFd) { in getNetworkForSocket() argument
460 if (!netId || socketFd < 0) { in getNetworkForSocket()
468 *netId = fwmark.netId; in getNetworkForSocket()
476 extern "C" int setNetworkForSocket(unsigned netId, int socketFd) { in setNetworkForSocket() argument
478 FwmarkCommand command = {FwmarkCommand::SELECT_NETWORK, netId, 0, 0}; in setNetworkForSocket()
482 extern "C" int setNetworkForProcess(unsigned netId) { in setNetworkForProcess() argument
483 return setNetworkForTarget(netId, &netIdForProcess); in setNetworkForProcess()
486 extern "C" int setNetworkForResolv(unsigned netId) { in setNetworkForResolv() argument
487 return setNetworkForTarget(netId, &netIdForResolv); in setNetworkForResolv()
502 extern "C" int queryUserAccess(uid_t uid, unsigned netId) { in queryUserAccess() argument
503 FwmarkCommand command = {FwmarkCommand::QUERY_USER_ACCESS, netId, uid, 0}; in queryUserAccess()
529 extern "C" int resNetworkQuery(unsigned netId, const char* dname, int ns_class, int ns_type, in resNetworkQuery() argument
535 return resNetworkSend(netId, buf.data(), len, flags); in resNetworkQuery()
538 extern "C" int resNetworkSend(unsigned netId, const uint8_t* msg, size_t msglen, uint32_t flags) { in resNetworkSend() argument
552 netId = getNetworkForResolv(netId); in resNetworkSend()
553 const std::string cmd = "resnsend " + std::to_string(netId) + " " + std::to_string(flags) + in resNetworkSend()