Lines Matching refs:socketFd
108 int socketFd = libcSocket(domain, type, protocol); in netdClientSocket() local
109 if (socketFd == -1) { in netdClientSocket()
114 if (int error = setNetworkForSocket(netId, socketFd)) { in netdClientSocket()
115 return closeFdAndSetErrno(socketFd, error); in netdClientSocket()
118 return socketFd; in netdClientSocket()
140 int socketFd; in setNetworkForTarget() local
142 socketFd = libcSocket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0); in setNetworkForTarget()
144 socketFd = socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0); in setNetworkForTarget()
146 if (socketFd < 0) { in setNetworkForTarget()
149 int error = setNetworkForSocket(netId, socketFd); in setNetworkForTarget()
153 close(socketFd); in setNetworkForTarget()
187 extern "C" int getNetworkForSocket(unsigned* netId, int socketFd) { in getNetworkForSocket() argument
188 if (!netId || socketFd < 0) { in getNetworkForSocket()
193 if (getsockopt(socketFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen) == -1) { in getNetworkForSocket()
204 extern "C" int setNetworkForSocket(unsigned netId, int socketFd) { in setNetworkForSocket() argument
205 if (socketFd < 0) { in setNetworkForSocket()
209 return FwmarkClient().send(&command, socketFd, nullptr); in setNetworkForSocket()
220 extern "C" int protectFromVpn(int socketFd) { in protectFromVpn() argument
221 if (socketFd < 0) { in protectFromVpn()
225 return FwmarkClient().send(&command, socketFd, nullptr); in protectFromVpn()
228 extern "C" int setNetworkForUser(uid_t uid, int socketFd) { in setNetworkForUser() argument
229 if (socketFd < 0) { in setNetworkForUser()
233 return FwmarkClient().send(&command, socketFd, nullptr); in setNetworkForUser()