Home
last modified time | relevance | path

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

12345

/packages/modules/Connectivity/staticlibs/netd/libnetdutils/include/netdutils/
DNetlinkListener.h32 namespace netdutils {
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();
[all …]
DHandle.h23 namespace netdutils {
64 using name = ::android::netdutils::Handle<type, _##name##Tag>;
/packages/modules/Connectivity/staticlibs/netd/libnetdutils/
DNetlinkListener.cpp30 namespace netdutils { namespace
32 using netdutils::Fd;
33 using netdutils::Slice;
34 using netdutils::Status;
35 using netdutils::UniqueFd;
36 using netdutils::findWithDefault;
37 using netdutils::forEachNetlinkMessage;
38 using netdutils::makeSlice;
39 using netdutils::sSyscalls;
40 using netdutils::status::ok;
[all …]
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
/packages/modules/DnsResolver/tests/
Dtun_forwarder.h80 base::Result<void> validatePacket(netdutils::Slice tunPacket) const;
81 base::Result<void> validateIpv4Packet(netdutils::Slice ipv4Packet) const;
82 base::Result<void> validateIpv6Packet(netdutils::Slice ipv6Packet) const;
83 base::Result<void> validateUdpPacket(netdutils::Slice udpPacket) const;
84 base::Result<void> validateTcpPacket(netdutils::Slice tcpPacket) const;
88 base::Result<void> translatePacket(netdutils::Slice tunPacket) const;
89 base::Result<void> translateIpv4Packet(netdutils::Slice ipv4Packet) const;
90 base::Result<void> translateIpv6Packet(netdutils::Slice ipv6Packet) const;
91 void translateUdpPacket(netdutils::Slice udpPacket, uint32_t oldPseudoSum,
93 void translateTcpPacket(netdutils::Slice tcpPacket, uint32_t oldPseudoSum,
/packages/modules/DnsResolver/
DDnsStats.h36 StatsData(const netdutils::IPSockAddr& ipSockAddr) : sockAddr(ipSockAddr) { in StatsData()
41 netdutils::IPSockAddr sockAddr;
76 StatsRecords(const netdutils::IPSockAddr& ipSockAddr, size_t size);
113 using StatsMap = std::map<netdutils::IPSockAddr, StatsRecords>;
117 bool setAddrs(const std::vector<netdutils::IPSockAddr>& addrs, Protocol protocol);
120 bool addStats(const netdutils::IPSockAddr& server, const DnsQueryEvent& record);
122 std::vector<netdutils::IPSockAddr> getSortedServers(Protocol protocol) const;
127 void dump(netdutils::DumpWriter& dw);
DDns64Configuration.h84 netdutils::IPPrefix getPrefix64(unsigned netId) const;
86 int setPrefix64(unsigned netId, const netdutils::IPPrefix& pfx) EXCLUDES(mMutex);
89 void dump(netdutils::DumpWriter& dw, unsigned netId);
100 netdutils::IPPrefix prefix64{};
114 netdutils::IPPrefix getPrefix64Locked(unsigned netId) const REQUIRES(mMutex);
116 bool reportNat64PrefixStatus(unsigned netId, bool added, const netdutils::IPPrefix& pfx)
DDnsTlsServer.h38 explicit DnsTlsServer(const netdutils::IPAddress& ip) in DnsTlsServer()
39 : DnsTlsServer(netdutils::IPSockAddr(ip, kDotPort)) {} in DnsTlsServer()
40 explicit DnsTlsServer(const netdutils::IPSockAddr& addr) : ss(addr) {} in DnsTlsServer()
69 netdutils::IPSockAddr addr() const { return netdutils::IPSockAddr::toIPSockAddr(ss); } in addr()
DDnsTlsTransport.cpp39 using android::netdutils::setThreadName;
96 base::Result<void> sendUdpQuery(netdutils::IPAddress ip, uint32_t mark, in sendUdpQuery()
98 const sockaddr_storage ss = netdutils::IPSockAddr(ip, 53); in sendUdpQuery()
151 std::future<DnsTlsTransport::Result> DnsTlsTransport::query(const netdutils::Slice query) { in query()
178 const bool sent = mSocket->query(q.newId, netdutils::drop(netdutils::makeSlice(q.query), 2)); in sendQuery()
284 auto r = transport.query(netdutils::makeSlice(query)).get(); in validate()
322 netdutils::Stopwatch stopwatch; in validate()
340 netdutils::Stopwatch stopwatch; in validate()
341 auto r = transport.query(netdutils::makeSlice(query)).get(); in validate()
DPrivateDnsConfiguration.h51 std::map<netdutils::IPSockAddr, Validation> dohServersMap;
83 const netdutils::IPSockAddr sockaddr;
88 ServerIdentity(const netdutils::IPSockAddr& addr, const std::string& host) in ServerIdentity()
117 ssize_t dohQuery(unsigned netId, const netdutils::Slice query, const netdutils::Slice answer,
127 void dump(netdutils::DumpWriter& dw) const;
132 base::Result<netdutils::IPSockAddr> getDohServer(unsigned netId) const
187 void notifyValidationStateUpdate(const netdutils::IPSockAddr& sockaddr, Validation validation,
203 netdutils::BackoffSequence<>::Builder mBackoffBuilder =
204 netdutils::BackoffSequence<>::Builder()
DDnsTlsDispatcher.h54 ResState* _Nonnull statp, const netdutils::Slice query,
55 const netdutils::Slice ans, int* _Nonnull resplen,
63 const netdutils::Slice query, const netdutils::Slice ans,
160 DnsTlsTransport::Result queryInternal(Transport& transport, const netdutils::Slice query)
Dresolv_cache.h119 bool resolv_stats_add(unsigned netid, const android::netdutils::IPSockAddr& server,
127 const std::vector<android::netdutils::IPSockAddr>& serverSockAddrs);
133 const android::netdutils::IPSockAddr& serverSockAddr,
140 void resolv_netconfig_dump(android::netdutils::DumpWriter& dw, unsigned netid);
DDns64Configuration.cpp39 using netdutils::DumpWriter;
40 using netdutils::IPAddress;
41 using netdutils::IPPrefix;
42 using netdutils::ScopedAddrinfo;
43 using netdutils::setThreadName;
73 auto backoff = netdutils::BackoffSequence<>::Builder() in startPrefixDiscovery()
DDnsTlsSocket.h102 bool query(uint16_t id, const netdutils::Slice query) override EXCLUDES(mLock);
115 netdutils::Status tcpConnect() REQUIRES(mLock);
131 bool sslWrite(const netdutils::Slice buffer) REQUIRES(mLock);
137 int sslRead(const netdutils::Slice buffer, bool wait) REQUIRES(mLock);
DResolverController.h57 int setPrefix64(unsigned netId, const netdutils::IPPrefix& prefix) { in setPrefix64()
64 int getPrefix64(unsigned netId, netdutils::IPPrefix* prefix);
66 void dump(netdutils::DumpWriter& dw, unsigned netId);
DDnsTlsSocket.cpp46 using netdutils::enableSockopt;
47 using netdutils::enableTcpKeepAlives;
48 using netdutils::isOk;
49 using netdutils::setThreadName;
50 using netdutils::Slice;
51 using netdutils::Status;
116 return netdutils::status::ok; in tcpConnect()
613 if (!sslWrite(netdutils::makeSlice(buf))) { in sendQuery()
637 if (sslRead(netdutils::makeSlice(response), true) != SSL_ERROR_NONE) { in readResponse()
645 if (sslRead(netdutils::makeSlice(discard), true) != SSL_ERROR_NONE) { in readResponse()
DPrivateDnsConfigurationTest.cpp179 const DnsTlsServer server(netdutils::IPSockAddr::toIPSockAddr(kServer1, 853)); in TEST_F()
300 DnsTlsServer server(netdutils::IPSockAddr::toIPSockAddr("127.0.0.1", 853)); in TEST_F()
306 other.ss = netdutils::IPSockAddr::toIPSockAddr("127.0.0.1", 5353); in TEST_F()
308 other.ss = netdutils::IPSockAddr::toIPSockAddr("127.0.0.2", 853); in TEST_F()
321 const DnsTlsServer server(netdutils::IPSockAddr::toIPSockAddr(kServer1, 853)); in TEST_F()
376 const DnsTlsServer server1(netdutils::IPSockAddr::toIPSockAddr(kServer1, 853)); in TEST_F()
377 const DnsTlsServer server2(netdutils::IPSockAddr::toIPSockAddr(kServer2, 853)); in TEST_F()
398 const DnsTlsServer server1(netdutils::IPSockAddr::toIPSockAddr(kServer1, 853)); in TEST_F()
399 const DnsTlsServer server2(netdutils::IPSockAddr::toIPSockAddr(kServer2, 853)); in TEST_F()
DDnsTlsDispatcher.cpp35 using android::netdutils::IPSockAddr;
36 using android::netdutils::Stopwatch;
37 using netdutils::Slice;
206 netdutils::copy(ans, netdutils::makeSlice(result.response)); in query()
250 const netdutils::Slice query) { in queryInternal()
DDnsStats.cpp27 using netdutils::DumpWriter;
28 using netdutils::IPAddress;
29 using netdutils::IPSockAddr;
30 using netdutils::ScopedIndent;
173 bool DnsStats::setAddrs(const std::vector<netdutils::IPSockAddr>& addrs, Protocol protocol) { in setAddrs()
DDnsProxyListener.cpp74 using netdutils::MAX_QUERIES_IN_TOTAL;
75 using netdutils::MAX_QUERIES_PER_UID;
76 using netdutils::ResponseCode;
77 using netdutils::Stopwatch;
82 android::netdutils::OperationLimiter<uid_t> queryLimiter(MAX_QUERIES_PER_UID);
476 bool isValidNat64Prefix(const netdutils::IPPrefix prefix) { in isValidNat64Prefix()
488 bool synthesizeNat64PrefixWithARecord(const netdutils::IPPrefix& prefix, struct hostent* hp) { in synthesizeNat64PrefixWithARecord()
493 struct sockaddr_storage ss = netdutils::IPSockAddr(prefix.ip()); in synthesizeNat64PrefixWithARecord()
523 bool synthesizeNat64PrefixWithARecord(const netdutils::IPPrefix& prefix, addrinfo** res, in synthesizeNat64PrefixWithARecord()
530 const sockaddr_storage ss = netdutils::IPSockAddr(prefix.ip()); in synthesizeNat64PrefixWithARecord()
[all …]
DExperiments.cpp27 using netdutils::DumpWriter;
28 using netdutils::ScopedIndent;
DPrivateDnsConfiguration.cpp40 using android::netdutils::IPAddress;
41 using android::netdutils::IPSockAddr;
42 using android::netdutils::setThreadName;
43 using android::netdutils::Slice;
549 base::Result<netdutils::IPSockAddr> PrivateDnsConfiguration::getDohServer(unsigned netId) const { in getDohServer()
559 void PrivateDnsConfiguration::notifyValidationStateUpdate(const netdutils::IPSockAddr& sockaddr, in notifyValidationStateUpdate()
567 void PrivateDnsConfiguration::dump(netdutils::DumpWriter& dw) const { in dump()
569 netdutils::ScopedIndent indentStats(dw); in dump()
/packages/modules/Connectivity/netd/
DBpfHandler.cpp40 using netdutils::Status;
41 using netdutils::statusFromErrno;
62 return netdutils::status::ok; in attachProgramToCgroup()
70 return netdutils::status::ok; in checkProgramAccessible()
179 return netdutils::status::ok; in initPrograms()
244 return netdutils::status::ok; in init()
282 return netdutils::status::ok; in initMaps()
DNetdUpdatable.cpp32 android::netdutils::Status ret = sBpfHandler.init(cg2_path); in libnetd_updatable_init()
33 if (!android::netdutils::isOk(ret)) { in libnetd_updatable_init()
DBpfHandler.h34 netdutils::Status init(const char* cg2_path);
58 netdutils::Status initMaps();

12345