/system/netd/include/ |
D | NetdClient.h | 28 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/ |
D | NetdClient.cpp | 98 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/ |
D | FwmarkServer.cpp | 75 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 …]
|
D | FwmarkServer.h | 41 int processClient(SocketClient* client, int* socketFd);
|
D | XfrmController.h | 214 static netdutils::Status ipSecSetEncapSocketOwner(int socketFd, int newUid, uid_t callerUid); 237 static netdutils::Status ipSecApplyTransportModeTransform(int socketFd, int32_t transformId, 243 static netdutils::Status ipSecRemoveTransportModeTransform(int socketFd);
|
D | XfrmController.cpp | 454 netdutils::Status XfrmController::ipSecSetEncapSocketOwner(int socketFd, int newUid, in ipSecSetEncapSocketOwner() argument 458 const int fd = socketFd; in ipSecSetEncapSocketOwner() 761 int socketFd, int32_t transformId, int32_t direction, const std::string& sourceAddress, in ipSecApplyTransportModeTransform() argument 771 getSyscallInstance().getsockname<sockaddr_storage>(Fd(socketFd)); in ipSecApplyTransportModeTransform() 823 status = getSyscallInstance().setsockopt(Fd(socketFd), sockLayer, sockOpt, policy); in ipSecApplyTransportModeTransform() 831 netdutils::Status XfrmController::ipSecRemoveTransportModeTransform(int socketFd) { in ipSecRemoveTransportModeTransform() argument 835 getSyscallInstance().getsockname<sockaddr_storage>(Fd(socketFd)); in ipSecRemoveTransportModeTransform() 858 getSyscallInstance().setsockopt(Fd(socketFd), sockLayer, sockOpt, nullptr, 0); in ipSecRemoveTransportModeTransform()
|
/system/core/libsysutils/include/sysutils/ |
D | SocketListener.h | 39 SocketListener(int socketFd, bool listen); 64 void init(const char *socketName, int socketFd, bool listen, bool useCmdNum);
|
/system/core/libsysutils/src/ |
D | SocketListener.cpp | 43 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()
|