Home
last modified time | relevance | path

Searched refs:sockFd (Results 1 – 8 of 8) 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/bpf/libbpf_android/
DBpfUtils.cpp50 uint64_t getSocketCookie(int sockFd) { in getSocketCookie() argument
53 int res = getsockopt(sockFd, SOL_SOCKET, SO_COOKIE, &sock_cookie, &cookie_len); in getSocketCookie()
/system/netd/server/
DXfrmControllerTest.cpp144 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 …]
Dmain.cpp85 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()
DTrafficController.h56 int tagSocket(int sockFd, uint32_t tag, uid_t uid, uid_t callingUid) EXCLUDES(mMutex);
63 int untagSocket(int sockFd);
DTrafficController.cpp311 int TrafficController::tagSocket(int sockFd, uint32_t tag, uid_t uid, uid_t callingUid) { in tagSocket() argument
318 if (legacy_tagSocket(sockFd, tag, uid)) return -errno; in tagSocket()
322 uint64_t sock_cookie = getSocketCookie(sockFd); in tagSocket()
383 int TrafficController::untagSocket(int sockFd) { in untagSocket() argument
386 if (legacy_untagSocket(sockFd)) return -errno; in untagSocket()
389 uint64_t sock_cookie = getSocketCookie(sockFd); in untagSocket()
/system/bpf/libbpf_android/include/bpf/
DBpfUtils.h164 uint64_t getSocketCookie(int sockFd);
/system/netd/tests/
Dbinder_test.cpp309 android::os::ParcelFileDescriptor sockFd(std::move(uniqueFd)); in TEST_F() local
312 setsockopt(sockFd.get(), IPPROTO_UDP, UDP_ENCAP, &sockOptVal, sizeof(sockOptVal)); in TEST_F()
314 binder::Status res = mNetd->ipSecSetEncapSocketOwner(sockFd, 1001); in TEST_F()
318 EXPECT_EQ(0, fstat(sockFd.get(), &info)); in TEST_F()
3462 int sockFd = socket(AF_INET6, type | SOCK_NONBLOCK, 0); in createIpv6SocketAndCheckMark() local
3463 EXPECT_NE(-1, sockFd); in createIpv6SocketAndCheckMark()
3464 EXPECT_EQ((type == SOCK_STREAM) ? -1 : 0, connect(sockFd, (sockaddr*)&dst6, sizeof(dst6))); in createIpv6SocketAndCheckMark()
3469 EXPECT_EQ(0, getsockopt(sockFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen)); in createIpv6SocketAndCheckMark()
3470 EXPECT_EQ(0, close(sockFd)); in createIpv6SocketAndCheckMark()