Home
last modified time | relevance | path

Searched refs:sockFd (Results 1 – 7 of 7) sorted by relevance

/system/chre/host/common/
Dsocket_client.cc228 int sockFd = socket(AF_LOCAL, SOCK_SEQPACKET, 0); in tryConnect() local
229 if (sockFd >= 0) { in tryConnect()
234 sockFd, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof(sndbuf)); in tryConnect()
237 sockFd, mSocketName, ANDROID_SOCKET_NAMESPACE_RESERVED, in tryConnect()
250 close(sockFd); in tryConnect()
/system/netd/server/
DXfrmControllerTest.cpp145 unique_fd sockFd(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in TEST_F() local
147 EXPECT_CALL(mockSyscalls, getsockopt(Fd(sockFd), IPPROTO_UDP, UDP_ENCAP, _, _)) in TEST_F()
150 netdutils::Status res = ctrl.ipSecSetEncapSocketOwner(sockFd, 1001, getuid()); in TEST_F()
154 EXPECT_EQ(0, fstat(sockFd.get(), &info)); in TEST_F()
167 unique_fd sockFd(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in TEST_F() local
169 netdutils::Status res = ctrl.ipSecSetEncapSocketOwner(sockFd, 1001, 1001); in TEST_F()
183 unique_fd sockFd(socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)); in TEST_F() local
185 EXPECT_CALL(mockSyscalls, getsockopt(Fd(sockFd), IPPROTO_UDP, UDP_ENCAP, _, _)) in TEST_F()
188 netdutils::Status res = ctrl.ipSecSetEncapSocketOwner(sockFd, 1001, getuid()); in TEST_F()
194 unique_fd sockFd(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in TEST_F() local
[all …]
DTrafficController.h60 int tagSocket(int sockFd, uint32_t tag, uid_t uid, uid_t callingUid) EXCLUDES(mMutex);
67 int untagSocket(int sockFd);
DTrafficController.cpp348 int TrafficController::tagSocket(int sockFd, uint32_t tag, uid_t uid, uid_t callingUid) { in tagSocket() argument
355 if (legacy_tagSocket(sockFd, tag, uid)) return -errno; in tagSocket()
359 uint64_t sock_cookie = getSocketCookie(sockFd); in tagSocket()
418 int TrafficController::untagSocket(int sockFd) { in untagSocket() argument
421 if (legacy_untagSocket(sockFd)) return -errno; in untagSocket()
424 uint64_t sock_cookie = getSocketCookie(sockFd); in untagSocket()
/system/bpf/libbpf_android/
DBpfUtils.cpp205 uint64_t getSocketCookie(int sockFd) { in getSocketCookie() argument
208 int res = getsockopt(sockFd, SOL_SOCKET, SO_COOKIE, &sock_cookie, &cookie_len); in getSocketCookie()
/system/bpf/libbpf_android/include/bpf/
DBpfUtils.h161 uint64_t getSocketCookie(int sockFd);
/system/netd/tests/
Dbinder_test.cpp345 android::os::ParcelFileDescriptor sockFd(std::move(uniqueFd)); in TEST_F() local
348 setsockopt(sockFd.get(), IPPROTO_UDP, UDP_ENCAP, &sockOptVal, sizeof(sockOptVal)); in TEST_F()
350 binder::Status res = mNetd->ipSecSetEncapSocketOwner(sockFd, 1001); in TEST_F()
354 EXPECT_EQ(0, fstat(sockFd.get(), &info)); in TEST_F()