/system/netd/server/ |
D | NetlinkListener.h | 36 using DispatchFn = std::function<void(const nlmsghdr& nlmsg, const netdutils::Slice msg)>; 43 virtual netdutils::Status send(const netdutils::Slice msg) = 0; 50 virtual netdutils::Status subscribe(uint16_t type, const DispatchFn& fn) = 0; 54 virtual netdutils::Status unsubscribe(uint16_t type) = 0; 78 NetlinkListener(netdutils::UniqueFd event, netdutils::UniqueFd sock, const std::string& name); 82 netdutils::Status send(const netdutils::Slice msg) override; 84 netdutils::Status subscribe(uint16_t type, const DispatchFn& fn) override EXCLUDES(mMutex); 86 netdutils::Status unsubscribe(uint16_t type) override EXCLUDES(mMutex); 91 netdutils::Status run(); 93 const netdutils::UniqueFd mEvent; [all …]
|
D | XfrmController.h | 66 virtual netdutils::Status open() = 0; 72 virtual netdutils::Status sendMessage(uint16_t nlMsgType, uint16_t nlMsgFlags, 204 static netdutils::Status Init(); 206 static netdutils::Status ipSecSetEncapSocketOwner(int socketFd, int newUid, uid_t callerUid); 208 static netdutils::Status ipSecAllocateSpi(int32_t transformId, const std::string& localAddress, 212 static netdutils::Status ipSecAddSecurityAssociation( 222 static netdutils::Status ipSecDeleteSecurityAssociation(int32_t transformId, 229 static netdutils::Status ipSecApplyTransportModeTransform(int socketFd, int32_t transformId, 235 static netdutils::Status ipSecRemoveTransportModeTransform(int socketFd); 237 static netdutils::Status ipSecAddSecurityPolicy(int32_t transformId, int32_t selAddrFamily, [all …]
|
D | NFLogListener.h | 32 const netdutils::Slice msg)>; 42 virtual netdutils::Status subscribe(uint16_t nfLogGroup, const DispatchFn& fn) = 0; 46 virtual netdutils::Status subscribe( 52 virtual netdutils::Status unsubscribe(uint16_t nfLogGroup) = 0; 71 netdutils::Status subscribe(uint16_t nfLogGroup, const DispatchFn& fn) override; 73 netdutils::Status subscribe( 76 netdutils::Status unsubscribe(uint16_t nfLogGroup) override; 86 netdutils::StatusOr<std::unique_ptr<NFLogListener>> makeNFLogListener();
|
D | TrafficController.h | 45 netdutils::Status start(); 89 netdutils::Status swapActiveStatsMap() EXCLUDES(mMutex); 103 netdutils::Status updateOwnerMapEntry(UidOwnerMatchType match, uid_t uid, FirewallRule rule, 106 void dump(netdutils::DumpWriter& dw, bool verbose) EXCLUDES(mMutex); 108 netdutils::Status replaceRulesInMap(UidOwnerMatchType match, const std::vector<int32_t>& uids) 111 netdutils::Status addUidInterfaceRules(const int ifIndex, const std::vector<int32_t>& uids) 113 netdutils::Status removeUidInterfaceRules(const std::vector<int32_t>& uids) EXCLUDES(mMutex); 115 netdutils::Status updateUidOwnerMap(const std::vector<std::string>& appStrUids, 122 static netdutils::StatusOr<std::unique_ptr<NetlinkListenerInterface>> makeSkDestroyListener(); 206 netdutils::Status removeRule(uint32_t uid, UidOwnerMatchType match) REQUIRES(mMutex); [all …]
|
D | XfrmControllerTest.cpp | 57 using android::netdutils::Fd; 58 using android::netdutils::MockSyscalls; 59 using android::netdutils::Slice; 60 using android::netdutils::Status; 77 android::netdutils::copy(orig, value); in ACTION_TEMPLATE() 132 testing::StrictMock<netdutils::ScopedMockSyscalls> mockSyscalls; 147 .WillOnce(DoAll(SetArg3IntValue(UDP_ENCAP_ESPINUDP), Return(netdutils::status::ok))); in TEST_F() 149 netdutils::Status res = ctrl.ipSecSetEncapSocketOwner(sockFd, 1001, getuid()); in TEST_F() 150 EXPECT_EQ(netdutils::status::ok, res); in TEST_F() 160 netdutils::Status res = ctrl.ipSecSetEncapSocketOwner(unique_fd(), 1001, getuid()); in TEST_F() [all …]
|
D | NetlinkListener.cpp | 33 using netdutils::Fd; 34 using netdutils::Slice; 35 using netdutils::Status; 36 using netdutils::UniqueFd; 37 using netdutils::findWithDefault; 38 using netdutils::forEachNetlinkMessage; 39 using netdutils::makeSlice; 40 using netdutils::sSyscalls; 41 using netdutils::status::ok; 42 using netdutils::statusFromErrno; [all …]
|
D | XfrmController.cpp | 71 using android::netdutils::DumpWriter; 72 using android::netdutils::Fd; 73 using android::netdutils::ScopedIndent; 74 using android::netdutils::Slice; 75 using android::netdutils::Status; 76 using android::netdutils::StatusOr; 77 using android::netdutils::Syscalls; 216 inline Syscalls& getSyscallInstance() { return netdutils::sSyscalls.get(); } in getSyscallInstance() 236 netdutils::Status open() override { in open() 240 return netdutils::statusFromErrno(-mSock, "Could not open netlink socket"); in open() [all …]
|
D | InterfaceController.h | 38 static android::netdutils::Status setIPv6AddrGenMode(const std::string& ifName, int mode); 47 static android::netdutils::Status setCfg(const InterfaceConfigurationParcel& cfg); 48 static android::netdutils::StatusOr<InterfaceConfigurationParcel> getCfg( 62 static android::netdutils::StatusOr<std::vector<std::string>> getIfaceNames(); 63 static android::netdutils::StatusOr<std::map<std::string, uint32_t>> getIfaceList(); 72 using SetPropertyFn = std::function<android::netdutils::Status(const std::string& key, 76 static android::netdutils::Status enableStablePrivacyAddresses(
|
D | Process.cpp | 42 using netdutils::DumpWriter; 43 using netdutils::Fd; 44 using netdutils::isOk; 45 using netdutils::makeCleanup; 46 using netdutils::makeSlice; 47 using netdutils::UniqueFd; 110 auto& sys = netdutils::sSyscalls.get(); in writePidFile()
|
D | NFLogListenerTest.cpp | 41 using netdutils::Slice; 42 using netdutils::StatusOr; 43 using netdutils::makeSlice; 44 using netdutils::status::ok; 53 MOCK_METHOD1(send, netdutils::Status(const Slice msg)); 54 MOCK_METHOD2(subscribe, netdutils::Status(uint16_t type, const DispatchFn& fn)); 55 MOCK_METHOD1(unsubscribe, netdutils::Status(uint16_t type));
|
D | WakeupController.h | 62 netdutils::Status init(NFLogListenerInterface* listener); 68 netdutils::Status addInterface(const std::string& ifName, const std::string& prefix, 73 netdutils::Status delInterface(const std::string& ifName, const std::string& prefix, 77 netdutils::Status execIptables(const std::string& action, const std::string& ifName,
|
D | InterfaceControllerTest.cpp | 38 using netdutils::Fd; 39 using netdutils::ScopedMockSyscalls; 40 using netdutils::Slice; 41 using netdutils::Status; 42 using netdutils::StatusOr; 43 using netdutils::UniqueFd; 44 using netdutils::makeSlice; 45 using netdutils::status::ok; 46 using netdutils::statusFromErrno;
|
D | NFLogListener.cpp | 35 using netdutils::extract; 36 using netdutils::findWithDefault; 37 using netdutils::makeSlice; 38 using netdutils::Slice; 39 using netdutils::sSyscalls; 40 using netdutils::Status; 41 using netdutils::StatusOr; 42 using netdutils::status::ok; 54 ss << nlmsg << " " << nfmsg << " " << msg << " " << netdutils::toHex(msg, 32); in __anone8b324600202()
|
D | ClatdController.h | 53 void dump(netdutils::DumpWriter& dw) EXCLUDES(mutex); 83 void dumpEgress(netdutils::DumpWriter& dw) REQUIRES(mutex); 84 void dumpIngress(netdutils::DumpWriter& dw) REQUIRES(mutex); 85 void dumpTrackers(netdutils::DumpWriter& dw) REQUIRES(mutex);
|
D | Controllers.cpp | 41 using android::netdutils::Stopwatch; 46 netdutils::Log gLog("netd"); 47 netdutils::Log gUnsolicitedLog("netdUnsolicited"); 285 netdutils::Status tcStatus = trafficCtrl.start(); in init() 300 netdutils::Status xStatus = XfrmController::Init(); in init() 302 … gLog.error("Failed to initialize XfrmController (%s)", netdutils::toString(xStatus).c_str()); in init()
|
D | TrafficController.cpp | 62 using netdutils::DumpWriter; 63 using netdutils::extract; 64 using netdutils::ScopedIndent; 65 using netdutils::Slice; 66 using netdutils::sSyscalls; 67 using netdutils::Status; 68 using netdutils::statusFromErrno; 69 using netdutils::StatusOr; 70 using netdutils::status::ok; 200 return netdutils::status::ok; in initMaps() [all …]
|
D | TetherController.h | 152 netdutils::StatusOr<TetherStatsList> getTetherStats(); 153 netdutils::StatusOr<TetherOffloadStatsList> getTetherOffloadStats(); 174 void dump(netdutils::DumpWriter& dw); 175 void dumpIfaces(netdutils::DumpWriter& dw); 176 void dumpBpf(netdutils::DumpWriter& dw);
|
D | Controllers.h | 74 extern netdutils::Log gLog; 75 extern netdutils::Log gUnsolicitedLog;
|
D | WakeupControllerTest.cpp | 43 using netdutils::status::ok; 63 MOCK_METHOD2(subscribe, netdutils::Status(uint16_t nfLogGroup, const DispatchFn& fn)); 65 netdutils::Status(uint16_t nfLogGroup, uint32_t copyRange, const DispatchFn& fn)); 66 MOCK_METHOD1(unsubscribe, netdutils::Status(uint16_t nfLogGroup)); 130 auto payload = drop(netdutils::makeSlice(msg), offsetof(Msg, uidAttr)); in TEST_F() 206 auto payload = drop(netdutils::makeSlice(msg), offsetof(Msg, uidAttr)); in TEST_F() 256 auto payload = drop(netdutils::makeSlice(msg), offsetof(Msg, uidAttr)); in TEST_F() 278 auto payload = drop(netdutils::makeSlice(msg), offsetof(Msg, prefixAttr)); in TEST_F()
|
D | InterfaceController.cpp | 49 using android::netdutils::isOk; 50 using android::netdutils::makeSlice; 51 using android::netdutils::sSyscalls; 52 using android::netdutils::Status; 53 using android::netdutils::statusFromErrno; 54 using android::netdutils::StatusOr; 55 using android::netdutils::toString; 56 using android::netdutils::status::ok; 200 android::netdutils::Status InterfaceController::enableStablePrivacyAddresses( in enableStablePrivacyAddresses()
|
D | WakeupController.cpp | 45 using netdutils::Slice; 46 using netdutils::Status; 120 netdutils::Status WakeupController::init(NFLogListenerInterface* listener) { in init() 224 return netdutils::status::ok; in execIptables()
|
/system/netd/libnetdutils/ |
D | LogTest.cpp | 21 android::netdutils::LogEntry globalFunctionName() { in globalFunctionName() 22 return android::netdutils::LogEntry().function(__FUNCTION__); in globalFunctionName() 25 android::netdutils::LogEntry globalPrettyFunctionName() { in globalPrettyFunctionName() 26 return android::netdutils::LogEntry().prettyFunction(__PRETTY_FUNCTION__); in globalPrettyFunctionName() 30 namespace netdutils { namespace
|
D | UniqueFile.cpp | 23 namespace netdutils { namespace
|
D | Fd.cpp | 20 namespace netdutils { namespace
|
/system/netd/libnetdutils/include/netdutils/ |
D | Handle.h | 23 namespace netdutils { 64 using name = ::android::netdutils::Handle<type, _##name##Tag>;
|