/system/netd/libnetdutils/include/netdutils/ |
D | Slice.h | 40 class Slice { 42 Slice() = default; 45 Slice(void* base, void* limit) : mBase(toUint8(base)), mLimit(toUint8(limit)) {} in Slice() function 48 Slice(void* base, size_t size) : Slice(base, toUint8(base) + size) {} in Slice() function 71 inline const Slice makeSlice(const T& ref) { in makeSlice() 78 inline const Slice makeSlice(const std::string& s) { in makeSlice() 85 inline const Slice makeSlice(const std::vector<T>& v) { in makeSlice() 91 inline const Slice makeSlice(const std::array<U, V>& a) { in makeSlice() 96 inline std::pair<const Slice, const Slice> split(const Slice s, size_t cut) { in split() 102 inline const Slice take(const Slice s, size_t cut) { in take() [all …]
|
D | Netlink.h | 34 void forEachNetlinkMessage(const Slice buf, 35 const std::function<void(const nlmsghdr&, const Slice)>& onMsg); 42 void forEachNetlinkAttribute(const Slice buf, 43 const std::function<void(const nlattr&, const Slice)>& onAttr);
|
D | Syscalls.h | 60 virtual StatusOr<size_t> write(Fd fd, const Slice buf) const = 0; 62 virtual StatusOr<Slice> read(Fd fd, const Slice buf) const = 0; 64 virtual StatusOr<size_t> sendto(Fd sock, const Slice buf, int flags, const sockaddr* dst, 67 virtual StatusOr<Slice> recvfrom(Fd sock, const Slice dst, int flags, sockaddr* src, 147 StatusOr<size_t> sendto(Fd sock, const Slice buf, int flags, const SockaddrT& dst) const { in sendto() 152 StatusOr<Slice> recvfrom(Fd sock, const Slice dst, int flags) const { in recvfrom() 157 StatusOr<std::pair<Slice, SockaddrT>> recvfrom(Fd sock, const Slice dst, int flags) const { in recvfrom()
|
D | MockSyscalls.h | 49 MOCK_CONST_METHOD2(write, StatusOr<size_t>(Fd fd, const Slice buf)); 50 MOCK_CONST_METHOD2(read, StatusOr<Slice>(Fd fd, const Slice buf)); 51 MOCK_CONST_METHOD5(sendto, StatusOr<size_t>(Fd sock, const Slice buf, int flags, 53 MOCK_CONST_METHOD5(recvfrom, StatusOr<Slice>(Fd sock, const Slice dst, int flags, sockaddr* src,
|
/system/netd/libnetdutils/ |
D | SliceTest.cpp | 35 Slice s1 = makeSlice(mRaw); in TEST_F() 36 Slice s2 = makeSlice(mRaw); in TEST_F() 39 ss << Slice(); in TEST_F() 56 Slice s1 = makeSlice(mRaw); in TEST_F() 57 Slice s2(s1); in TEST_F() 58 Slice s3 = s2; in TEST_F() 59 const Slice s4(s3); in TEST_F() 60 const Slice s5 = s4; in TEST_F() 62 Slice s6(mRaw.data(), mRaw.size()); in TEST_F() 63 Slice s7(mRaw.data(), mRaw.data() + mRaw.size()); in TEST_F() [all …]
|
D | Netlink.cpp | 26 void forEachNetlinkMessage(const Slice buf, in forEachNetlinkMessage() 27 const std::function<void(const nlmsghdr&, const Slice)>& onMsg) { in forEachNetlinkMessage() 28 Slice tail = buf; in forEachNetlinkMessage() 38 void forEachNetlinkAttribute(const Slice buf, in forEachNetlinkAttribute() 39 const std::function<void(const nlattr&, const Slice)>& onAttr) { in forEachNetlinkAttribute() 40 Slice tail = buf; in forEachNetlinkAttribute()
|
D | Slice.cpp | 34 std::string toString(const Slice s) { in toString() 38 std::string toHex(const Slice s, int wrap) { in toHex() 39 Slice tail = s; in toHex() 54 std::ostream& operator<<(std::ostream& os, const Slice& slice) { in operator <<()
|
D | Syscalls.cpp | 112 StatusOr<size_t> write(Fd fd, const Slice buf) const override { in write() 120 StatusOr<Slice> read(Fd fd, const Slice buf) const override { in read() 125 return Slice(buf.base(), rv); in read() 128 StatusOr<size_t> sendto(Fd sock, const Slice buf, int flags, const sockaddr* dst, in sendto() 137 StatusOr<Slice> recvfrom(Fd sock, const Slice dst, int flags, sockaddr* src, in recvfrom()
|
D | Android.bp | 7 "Slice.cpp",
|
D | SyscallsTest.cpp | 170 .WillOnce(Invoke([expected, used](Fd, const Slice, int, sockaddr* src, socklen_t* srclen) { in TEST_F() argument
|
/system/netd/server/ |
D | NFLogListenerTest.cpp | 44 using netdutils::Slice; 58 MOCK_METHOD1(send, netdutils::Status(const netdutils::Slice msg)); 79 static StatusOr<size_t> sendOk(const Slice buf) { return buf.size(); } in sendOk() 108 const auto dispatchFn = [](const nlmsghdr&, const nfgenmsg&, const netdutils::Slice) {}; in TEST_F() argument 114 const auto dispatchFn = [](const nlmsghdr&, const nfgenmsg&, const netdutils::Slice) {}; in TEST_F() argument 123 const netdutils::Slice) { in TEST_F() argument 135 const auto dispatchFn = [](const nlmsghdr&, const nfgenmsg&, const netdutils::Slice) { in TEST_F() argument
|
D | NFLogListener.cpp | 35 using netdutils::Slice; 55 const nfgenmsg& nfmsg, const Slice msg) { in __anon5a1cf7df0202() 61 using SendFn = std::function<Status(const Slice msg)>; 150 const auto rxHandler = [this](const nlmsghdr& nlmsg, const Slice msg) { in NFLogListener() 160 const auto rxDoneHandler = [](const nlmsghdr&, const Slice msg) { in NFLogListener() 172 const auto sendFn = [this](const Slice msg) { return mListener->send(msg); }; in ~NFLogListener() 179 const auto sendFn = [this](const Slice msg) { return mListener->send(msg); }; in subscribe() 192 const auto sendFn = [this](const Slice msg) { return mListener->send(msg); }; in unsubscribe() 215 const auto sendFn = [&listener](const Slice msg) { return listener->send(msg); }; in makeNFLogListener()
|
D | NetlinkListener.cpp | 34 using netdutils::Slice; 52 const NetlinkListener::DispatchFn kDefaultDispatchFn = [](const nlmsghdr& nlmsg, const Slice) { in __anoncbe671fe0202() argument 62 const auto rxErrorHandler = [](const nlmsghdr& nlmsg, const Slice msg) { in __anoncbe671fe0402() 78 Status NetlinkListener::send(const Slice msg) { in send() 102 const auto rxHandler = [this](const nlmsghdr& nlmsg, const Slice& buf) { in run()
|
D | NetlinkListener.h | 35 using DispatchFn = std::function<void(const nlmsghdr& nlmsg, const netdutils::Slice msg)>; 40 virtual netdutils::Status send(const netdutils::Slice msg) = 0; 77 netdutils::Status send(const netdutils::Slice msg) override;
|
D | WakeupController.cpp | 37 using netdutils::Slice; 48 const auto msgHandler = [this](const nlmsghdr&, const nfgenmsg&, const Slice msg) { in init() 54 const Slice payload) { in init()
|
D | InterfaceControllerTest.cpp | 36 using netdutils::Slice; 76 EXPECT_CALL(mSyscalls, read(kDevRandomFd, _)).WillOnce(Invoke([data](Fd, const Slice buf) { in expectReadFromDevRandom() 98 .WillOnce(Invoke([val, err](Fd, const Slice buf) -> StatusOr<size_t> { in expectWriteToFile()
|
D | NFLogListener.h | 31 const netdutils::Slice msg)>;
|