/system/chre/host/common/ |
D | socket_client.cc | 226 int sockFd = socket(AF_LOCAL, SOCK_SEQPACKET, 0); in tryConnect() local 227 if (sockFd >= 0) { in tryConnect() 240 if ((ret = setsockopt(sockFd, SOL_SOCKET, SO_SNDBUF, &sndbuf, in tryConnect() 245 } else if ((ret = setsockopt(sockFd, SOL_SOCKET, SO_SNDTIMEO, &timeout, in tryConnect() 251 mSockFd = socket_local_client_connect(sockFd, mSocketName, in tryConnect() 263 close(sockFd); in tryConnect()
|
/system/bpf/libbpf_android/ |
D | BpfUtils.cpp | 49 uint64_t getSocketCookie(int sockFd) { in getSocketCookie() argument 52 int res = getsockopt(sockFd, SOL_SOCKET, SO_COOKIE, &sock_cookie, &cookie_len); in getSocketCookie()
|
/system/netd/server/ |
D | XfrmControllerTest.cpp | 144 unique_fd sockFd(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in TEST_F() local 146 EXPECT_CALL(mockSyscalls, getsockopt(Fd(sockFd), IPPROTO_UDP, UDP_ENCAP, _, _)) in TEST_F() 149 netdutils::Status res = ctrl.ipSecSetEncapSocketOwner(sockFd, 1001, getuid()); in TEST_F() 153 EXPECT_EQ(0, fstat(sockFd.get(), &info)); in TEST_F() 166 unique_fd sockFd(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in TEST_F() local 168 netdutils::Status res = ctrl.ipSecSetEncapSocketOwner(sockFd, 1001, 1001); in TEST_F() 182 unique_fd sockFd(socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)); in TEST_F() local 184 EXPECT_CALL(mockSyscalls, getsockopt(Fd(sockFd), IPPROTO_UDP, UDP_ENCAP, _, _)) in TEST_F() 187 netdutils::Status res = ctrl.ipSecSetEncapSocketOwner(sockFd, 1001, getuid()); in TEST_F() 193 unique_fd sockFd(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in TEST_F() local [all …]
|
D | main.cpp | 85 int tagSocketCallback(int sockFd, uint32_t tag, uid_t uid, pid_t) { in tagSocketCallback() argument 88 return gCtls->trafficCtrl.tagSocket(sockFd, tag, uid, geteuid()); in tagSocketCallback()
|
D | TrafficController.h | 56 int tagSocket(int sockFd, uint32_t tag, uid_t uid, uid_t callingUid) EXCLUDES(mMutex); 63 int untagSocket(int sockFd);
|
D | TrafficController.cpp | 308 int TrafficController::tagSocket(int sockFd, uint32_t tag, uid_t uid, uid_t callingUid) { in tagSocket() argument 314 uint64_t sock_cookie = getSocketCookie(sockFd); in tagSocket() 375 int TrafficController::untagSocket(int sockFd) { in untagSocket() argument 377 uint64_t sock_cookie = getSocketCookie(sockFd); in untagSocket()
|
/system/bpf/libbpf_android/include/bpf/ |
D | BpfUtils.h | 36 uint64_t getSocketCookie(int sockFd);
|
/system/netd/tests/ |
D | binder_test.cpp | 366 android::os::ParcelFileDescriptor sockFd(std::move(uniqueFd)); in TEST_F() local 369 setsockopt(sockFd.get(), IPPROTO_UDP, UDP_ENCAP, &sockOptVal, sizeof(sockOptVal)); in TEST_F() 371 binder::Status res = mNetd->ipSecSetEncapSocketOwner(sockFd, 1001); in TEST_F() 375 EXPECT_EQ(0, fstat(sockFd.get(), &info)); in TEST_F() 3507 int sockFd = socket(AF_INET6, type | SOCK_NONBLOCK, 0); in createIpv6SocketAndCheckMark() local 3508 EXPECT_NE(-1, sockFd); in createIpv6SocketAndCheckMark() 3509 EXPECT_EQ((type == SOCK_STREAM) ? -1 : 0, connect(sockFd, (sockaddr*)&dst6, sizeof(dst6))); in createIpv6SocketAndCheckMark() 3514 EXPECT_EQ(0, getsockopt(sockFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen)); in createIpv6SocketAndCheckMark() 3515 EXPECT_EQ(0, close(sockFd)); in createIpv6SocketAndCheckMark()
|