Home | History | Annotate | Download | only in client

Lines Matching refs:socketFd

87     int socketFd = libcSocket(domain, type, protocol);
88 if (socketFd == -1) {
93 if (int error = setNetworkForSocket(netId, socketFd)) {
94 return closeFdAndSetErrno(socketFd, error);
97 return socketFd;
119 int socketFd;
121 socketFd = libcSocket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0);
123 socketFd = socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0);
125 if (socketFd < 0) {
128 int error = setNetworkForSocket(netId, socketFd);
132 close(socketFd);
166 extern "C" int getNetworkForSocket(unsigned* netId, int socketFd) {
167 if (!netId || socketFd < 0) {
172 if (getsockopt(socketFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen) == -1) {
183 extern "C" int setNetworkForSocket(unsigned netId, int socketFd) {
184 if (socketFd < 0) {
188 return FwmarkClient().send(&command, socketFd);
199 extern "C" int protectFromVpn(int socketFd) {
200 if (socketFd < 0) {
204 return FwmarkClient().send(&command, socketFd);
207 extern "C" int setNetworkForUser(uid_t uid, int socketFd) {
208 if (socketFd < 0) {
212 return FwmarkClient().send(&command, socketFd);