Home
last modified time | relevance | path

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

/system/netd/client/
DNetdClient.cpp68 int checkSocket(int socketFd) { in checkSocket() argument
69 if (socketFd < 0) { in checkSocket()
74 if (getsockopt(socketFd, SOL_SOCKET, SO_DOMAIN, &family, &familyLen) == -1) { in checkSocket()
83 bool shouldMarkSocket(int socketFd, const sockaddr* dst) { in shouldMarkSocket() argument
87 return dst && FwmarkClient::shouldSetFwmark(dst->sa_family) && (checkSocket(socketFd) == 0); in shouldMarkSocket()
148 int socketFd = libcSocket(domain, type, protocol); in netdClientSocket() local
149 if (socketFd == -1) { in netdClientSocket()
154 if (int error = setNetworkForSocket(netId, socketFd)) { in netdClientSocket()
155 return closeFdAndSetErrno(socketFd, error); in netdClientSocket()
158 return socketFd; in netdClientSocket()
[all …]
/system/netd/include/
DNetdClient.h30 int getNetworkForSocket(unsigned* netId, int socketFd);
31 int setNetworkForSocket(unsigned netId, int socketFd);
39 int protectFromVpn(int socketFd);
41 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/server/
DFwmarkServer.cpp68 int socketFd = -1; in onDataAvailable() local
69 int error = processClient(client, &socketFd); in onDataAvailable()
70 if (socketFd >= 0) { in onDataAvailable()
71 close(socketFd); in onDataAvailable()
84 int FwmarkServer::processClient(SocketClient* client, int* socketFd) { in processClient() argument
99 char cmsg[CMSG_SPACE(sizeof(*socketFd))]; in processClient()
136 cmsgh->cmsg_len == CMSG_LEN(sizeof(*socketFd))) { in processClient()
137 memcpy(socketFd, CMSG_DATA(cmsgh), sizeof(*socketFd)); in processClient()
140 if (*socketFd < 0) { in processClient()
146 if (getsockopt(*socketFd, SOL_SOCKET, SO_DOMAIN, &family, &familyLen) == -1) { in processClient()
[all …]
DFwmarkServer.h41 int processClient(SocketClient* client, int* socketFd);
DXfrmController.h205 static netdutils::Status ipSecSetEncapSocketOwner(int socketFd, int newUid, uid_t callerUid);
228 static netdutils::Status ipSecApplyTransportModeTransform(int socketFd, int32_t transformId,
234 static netdutils::Status ipSecRemoveTransportModeTransform(int socketFd);
DXfrmController.cpp455 netdutils::Status XfrmController::ipSecSetEncapSocketOwner(int socketFd, int newUid, in ipSecSetEncapSocketOwner() argument
459 const int fd = socketFd; in ipSecSetEncapSocketOwner()
699 int socketFd, int32_t transformId, int32_t direction, const std::string& sourceAddress, in ipSecApplyTransportModeTransform() argument
709 getSyscallInstance().getsockname<sockaddr_storage>(Fd(socketFd)); in ipSecApplyTransportModeTransform()
760 status = getSyscallInstance().setsockopt(Fd(socketFd), sockLayer, sockOpt, policy); in ipSecApplyTransportModeTransform()
768 netdutils::Status XfrmController::ipSecRemoveTransportModeTransform(int socketFd) { in ipSecRemoveTransportModeTransform() argument
772 getSyscallInstance().getsockname<sockaddr_storage>(Fd(socketFd)); in ipSecRemoveTransportModeTransform()
795 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()