Home
last modified time | relevance | path

Searched refs:socketFd (Results 1 – 8 of 8) sorted by relevance

/system/netd/include/
DNetdClient.h28 int getNetworkForSocket(unsigned* netId, int socketFd);
29 int setNetworkForSocket(unsigned netId, int socketFd);
37 int protectFromVpn(int socketFd);
39 int setNetworkForUser(uid_t uid, int socketFd);
45 int tagSocket(int socketFd, uint32_t tag, uid_t uid);
47 int untagSocket(int socketFd);
/system/netd/client/
DNetdClient.cpp98 int checkSocket(int socketFd) { in checkSocket() argument
99 if (socketFd < 0) { in checkSocket()
104 if (getsockopt(socketFd, SOL_SOCKET, SO_DOMAIN, &family, &familyLen) == -1) { in checkSocket()
113 bool shouldMarkSocket(int socketFd, const sockaddr* dst) { in shouldMarkSocket() argument
117 return dst && FwmarkClient::shouldSetFwmark(dst->sa_family) && (checkSocket(socketFd) == 0); in shouldMarkSocket()
191 int socketFd = libcSocket(domain, type, protocol); in netdClientSocket() local
192 if (socketFd == -1) { in netdClientSocket()
197 if (int error = setNetworkForSocket(netId, socketFd)) { in netdClientSocket()
198 return closeFdAndSetErrno(socketFd, error); in netdClientSocket()
201 return socketFd; in netdClientSocket()
[all …]
/system/netd/server/
DFwmarkServer.cpp75 int socketFd = -1; in onDataAvailable() local
76 int error = processClient(client, &socketFd); in onDataAvailable()
77 if (socketFd >= 0) { in onDataAvailable()
78 close(socketFd); in onDataAvailable()
101 int FwmarkServer::processClient(SocketClient* client, int* socketFd) { in processClient() argument
153 *socketFd = received_fds[0].release(); in processClient()
157 if (getsockopt(*socketFd, SOL_SOCKET, SO_DOMAIN, &family, &familyLen) == -1) { in processClient()
166 if (getsockopt(*socketFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen) == -1) { in processClient()
230 const int ret = getsockopt(*socketFd, SOL_SOCKET, SO_PROTOCOL, &socketProto, &intSize); in processClient()
312 return mTrafficCtrl->tagSocket(*socketFd, command.trafficCtrlInfo, command.uid, in processClient()
[all …]
DFwmarkServer.h41 int processClient(SocketClient* client, int* socketFd);
DXfrmController.h206 static netdutils::Status ipSecSetEncapSocketOwner(int socketFd, int newUid, uid_t callerUid);
229 static netdutils::Status ipSecApplyTransportModeTransform(int socketFd, int32_t transformId,
235 static netdutils::Status ipSecRemoveTransportModeTransform(int socketFd);
DXfrmController.cpp454 netdutils::Status XfrmController::ipSecSetEncapSocketOwner(int socketFd, int newUid, in ipSecSetEncapSocketOwner() argument
458 const int fd = socketFd; in ipSecSetEncapSocketOwner()
698 int socketFd, int32_t transformId, int32_t direction, const std::string& sourceAddress, in ipSecApplyTransportModeTransform() argument
708 getSyscallInstance().getsockname<sockaddr_storage>(Fd(socketFd)); in ipSecApplyTransportModeTransform()
759 status = getSyscallInstance().setsockopt(Fd(socketFd), sockLayer, sockOpt, policy); in ipSecApplyTransportModeTransform()
767 netdutils::Status XfrmController::ipSecRemoveTransportModeTransform(int socketFd) { in ipSecRemoveTransportModeTransform() argument
771 getSyscallInstance().getsockname<sockaddr_storage>(Fd(socketFd)); in ipSecRemoveTransportModeTransform()
794 getSyscallInstance().setsockopt(Fd(socketFd), sockLayer, sockOpt, nullptr, 0); in ipSecRemoveTransportModeTransform()
/system/core/libsysutils/include/sysutils/
DSocketListener.h39 SocketListener(int socketFd, bool listen);
64 void init(const char *socketName, int socketFd, bool listen, bool useCmdNum);
/system/core/libsysutils/src/
DSocketListener.cpp43 SocketListener::SocketListener(int socketFd, bool listen) { in SocketListener() argument
44 init(nullptr, socketFd, listen, false); in SocketListener()
51 void SocketListener::init(const char *socketName, int socketFd, bool listen, bool useCmdNum) { in init() argument
54 mSock = socketFd; in init()