Home
last modified time | relevance | path

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

/system/chre/host/common/
Dsocket_client.cc226 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/
DBpfUtils.cpp49 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/
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.cpp308 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/
DBpfUtils.h36 uint64_t getSocketCookie(int sockFd);
/system/netd/tests/
Dbinder_test.cpp366 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()