/system/netd/libnetdutils/ |
D | FdTest.cpp | 34 inline Fd toFd(const UniqueFd& fd) { in toFd() 40 TEST(Fd, smoke) { in TEST() argument 42 Fd fd1(1); in TEST() 43 Fd fd2(fd1); in TEST() 44 Fd fd3 = fd2; in TEST() 45 const Fd fd4(8); in TEST() 46 const Fd fd5(fd4); in TEST() 47 const Fd fd6 = fd5; in TEST() 52 Fd zero(0); in TEST() 56 Fd bad(-1); in TEST() [all …]
|
D | Syscalls.cpp | 60 Status getsockname(Fd sock, sockaddr* addr, socklen_t* addrlen) const override { in getsockname() 68 Status getsockopt(Fd sock, int level, int optname, void* optval, in getsockopt() 77 Status setsockopt(Fd sock, int level, int optname, const void* optval, in setsockopt() 86 Status bind(Fd sock, const sockaddr* addr, socklen_t addrlen) const override { in bind() 94 Status connect(Fd sock, const sockaddr* addr, socklen_t addrlen) const override { in connect() 102 StatusOr<ifreq> ioctl(Fd sock, unsigned long request, ifreq* ifr) const override { in ioctl() 129 StatusOr<size_t> writev(Fd fd, const std::vector<iovec>& iov) const override { in writev() 137 StatusOr<size_t> write(Fd fd, const Slice buf) const override { in write() 145 StatusOr<Slice> read(Fd fd, const Slice buf) const override { in read() 153 StatusOr<size_t> sendto(Fd sock, const Slice buf, int flags, const sockaddr* dst, in sendto() [all …]
|
D | SyscallsTest.cpp | 58 constexpr Fd kFd(40); in TEST_F() 70 constexpr Fd kFd(40); in TEST_F() 76 .WillOnce(Invoke([expected](Fd, sockaddr* addr, socklen_t* addrlen) { in TEST_F() argument 92 constexpr Fd kFd(40); in TEST_F() 111 constexpr Fd kFd(40); in TEST_F() 131 constexpr Fd kFd(40); in TEST_F() 148 constexpr Fd kFd(40); in TEST_F() 165 constexpr Fd kFd(40); in TEST_F() 179 constexpr Fd kFd(40); in TEST_F() 190 [expected, used](Fd, const Slice, int, sockaddr* src, socklen_t* srclen) { in TEST_F() argument
|
D | UniqueFd.cpp | 25 void UniqueFd::reset(Fd fd) { in reset() 34 return os << "UniqueFd[" << static_cast<Fd>(fd) << "]"; in operator <<()
|
D | SocketOption.cpp | 29 Status enableSockopt(Fd sock, int level, int optname) { in enableSockopt() 35 Status enableTcpKeepAlives(Fd sock, unsigned idleTime, unsigned numProbes, unsigned probeInterval) { in enableTcpKeepAlives()
|
D | Fd.cpp | 22 std::ostream& operator<<(std::ostream& os, const Fd& fd) { in operator <<()
|
D | Android.bp | 14 "Fd.cpp",
|
/system/netd/libnetdutils/include/netdutils/ |
D | Fd.h | 29 class Fd { 31 constexpr Fd() = default; 33 constexpr Fd(int fd) : mFd(fd) {} in Fd() function 37 bool operator==(const Fd& other) const { return get() == other.get(); } 38 bool operator!=(const Fd& other) const { return get() != other.get(); } 45 inline bool isWellFormed(const Fd fd) { in isWellFormed() 49 std::ostream& operator<<(std::ostream& os, const Fd& fd);
|
D | Syscalls.h | 50 virtual Status getsockname(Fd sock, sockaddr* addr, socklen_t* addrlen) const = 0; 52 virtual Status getsockopt(Fd sock, int level, int optname, void *optval, 55 virtual Status setsockopt(Fd sock, int level, int optname, const void* optval, 58 virtual Status bind(Fd sock, const sockaddr* addr, socklen_t addrlen) const = 0; 60 virtual Status connect(Fd sock, const sockaddr* addr, socklen_t addrlen) const = 0; 62 virtual StatusOr<ifreq> ioctl(Fd sock, unsigned long request, ifreq* ifr) const = 0; 68 virtual StatusOr<size_t> writev(Fd fd, const std::vector<iovec>& iov) const = 0; 70 virtual StatusOr<size_t> write(Fd fd, const Slice buf) const = 0; 72 virtual StatusOr<Slice> read(Fd fd, const Slice buf) const = 0; 74 virtual StatusOr<size_t> sendto(Fd sock, const Slice buf, int flags, const sockaddr* dst, [all …]
|
D | MockSyscalls.h | 39 MOCK_CONST_METHOD3(getsockname, Status(Fd sock, sockaddr* addr, socklen_t* addrlen)); 40 MOCK_CONST_METHOD5(getsockopt, Status(Fd sock, int level, int optname, void* optval, 42 MOCK_CONST_METHOD5(setsockopt, Status(Fd sock, int level, int optname, const void* optval, 45 MOCK_CONST_METHOD3(bind, Status(Fd sock, const sockaddr* addr, socklen_t addrlen)); 46 MOCK_CONST_METHOD3(connect, Status(Fd sock, const sockaddr* addr, socklen_t addrlen)); 47 MOCK_CONST_METHOD3(ioctl, StatusOr<ifreq>(Fd sock, unsigned long request, ifreq* ifr)); 53 MOCK_CONST_METHOD2(writev, StatusOr<size_t>(Fd fd, const std::vector<iovec>& iov)); 54 MOCK_CONST_METHOD2(write, StatusOr<size_t>(Fd fd, const Slice buf)); 55 MOCK_CONST_METHOD2(read, StatusOr<Slice>(Fd fd, const Slice buf)); 56 MOCK_CONST_METHOD5(sendto, StatusOr<size_t>(Fd sock, const Slice buf, int flags, [all …]
|
D | UniqueFd.h | 40 UniqueFd(Fd fd) : mFd(fd) {} in UniqueFd() 57 void reset(Fd fd = Fd()); 60 operator const Fd &() const { return mFd; } 63 Fd mFd;
|
D | SocketOption.h | 36 Status enableSockopt(Fd sock, int level, int optname); 55 Status enableTcpKeepAlives(Fd sock, unsigned idleTime, unsigned numProbes, unsigned probeInterval);
|
/system/extras/mmap-perf/ |
D | mmapPerf.cpp | 21 class Fd { class 26 Fd() {} in Fd() function in Fd 27 explicit Fd(int fd) : m_fd{fd} {} in Fd() function in Fd 28 ~Fd() { in ~Fd() 51 Fd m_fileFd;
|
/system/netd/server/ |
D | InterfaceControllerTest.cpp | 38 using netdutils::Fd; 48 constexpr Fd kDevRandomFd(777); 49 constexpr Fd kStableSecretFd(9999); 68 void expectOpenFile(const std::string& path, const Fd fd, int err) { in expectOpenFile() 80 EXPECT_CALL(mSyscalls, read(kDevRandomFd, _)).WillOnce(Invoke([data](Fd, const Slice buf) { in expectReadFromDevRandom() argument 100 void expectWriteToFile(const Fd fd, const std::string& val, int err) { in expectWriteToFile() 102 .WillOnce(Invoke([val, err](Fd, const Slice buf) -> StatusOr<size_t> { in expectWriteToFile() argument
|
D | NetlinkListener.cpp | 33 using netdutils::Fd; 126 const std::array<Fd, 2> fds{{{mEvent}, {mSock}}}; in run() 143 mErrorHandler(((Fd) mSock).get(), err); in run()
|
D | Process.cpp | 43 using netdutils::Fd; 95 Fd pidFd = open(pidFile.c_str(), PID_FILE_FLAGS, PID_FILE_MODE); in writePidFile()
|
D | XfrmControllerTest.cpp | 57 using android::netdutils::Fd; 146 EXPECT_CALL(mockSyscalls, getsockopt(Fd(sockFd), IPPROTO_UDP, UDP_ENCAP, _, _)) in TEST_F() 184 EXPECT_CALL(mockSyscalls, getsockopt(Fd(sockFd), IPPROTO_UDP, UDP_ENCAP, _, _)) in TEST_F() 195 EXPECT_CALL(mockSyscalls, getsockopt(Fd(sockFd), IPPROTO_UDP, UDP_ENCAP, _, _)) in TEST_F() 486 EXPECT_CALL(mockSyscalls, getsockname(Fd(sock), _, _)) in TEST_F()
|
D | XfrmController.cpp | 72 using android::netdutils::Fd; 312 getSyscallInstance().read(Fd(mSock), netdutils::makeSlice(response)); in sendMessage() 473 getSyscallInstance().getsockopt(Fd(fd), IPPROTO_UDP, UDP_ENCAP, &optval, &optlen); in ipSecSetEncapSocketOwner() 771 getSyscallInstance().getsockname<sockaddr_storage>(Fd(socketFd)); in ipSecApplyTransportModeTransform() 823 status = getSyscallInstance().setsockopt(Fd(socketFd), sockLayer, sockOpt, policy); in ipSecApplyTransportModeTransform() 835 getSyscallInstance().getsockname<sockaddr_storage>(Fd(socketFd)); in ipSecRemoveTransportModeTransform() 858 getSyscallInstance().setsockopt(Fd(socketFd), sockLayer, sockOpt, nullptr, 0); in ipSecRemoveTransportModeTransform()
|
/system/incremental_delivery/incfs/include/ |
D | incfs.h | 183 using Fd = IncFsFd; variable
|