Home
last modified time | relevance | path

Searched refs:netdutils (Results 1 – 25 of 88) sorted by relevance

1234

/system/netd/server/
DNetlinkListener.h36 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 …]
DXfrmController.h66 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 …]
DNFLogListener.h32 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();
DTrafficController.h45 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 …]
DXfrmControllerTest.cpp57 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 …]
DNetlinkListener.cpp33 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 …]
DXfrmController.cpp71 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 …]
DInterfaceController.h38 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(
DProcess.cpp42 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()
DNFLogListenerTest.cpp41 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));
DWakeupController.h62 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,
DInterfaceControllerTest.cpp38 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;
DNFLogListener.cpp35 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()
DClatdController.h53 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);
DControllers.cpp41 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()
DTrafficController.cpp62 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 …]
DTetherController.h152 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);
DControllers.h74 extern netdutils::Log gLog;
75 extern netdutils::Log gUnsolicitedLog;
DWakeupControllerTest.cpp43 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()
DInterfaceController.cpp49 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()
DWakeupController.cpp45 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/
DLogTest.cpp21 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
DUniqueFile.cpp23 namespace netdutils { namespace
DFd.cpp20 namespace netdutils { namespace
/system/netd/libnetdutils/include/netdutils/
DHandle.h23 namespace netdutils {
64 using name = ::android::netdutils::Handle<type, _##name##Tag>;

1234