Home
last modified time | relevance | path

Searched refs:tunPacket (Results 1 – 2 of 2) sorted by relevance

/packages/modules/DnsResolver/tests/
Dtun_forwarder.cpp205 const Slice tunPacket(buf, readlen); in handlePacket() local
206 if (auto result = validatePacket(tunPacket); !result.ok()) { in handlePacket()
212 if (auto result = translatePacket(tunPacket); !result.ok()) { in handlePacket()
220 Result<void> TunForwarder::validatePacket(Slice tunPacket) const { in validatePacket()
221 if (tunPacket.size() < TUN_HDRLEN) { in validatePacket()
225 const tun_pi* const tunHeader = reinterpret_cast<tun_pi*>(tunPacket.base()); in validatePacket()
232 return validateIpv4Packet(drop(tunPacket, TUN_HDRLEN)); in validatePacket()
234 return validateIpv6Packet(drop(tunPacket, TUN_HDRLEN)); in validatePacket()
313 Result<void> TunForwarder::translatePacket(Slice tunPacket) const { in translatePacket()
314 const tun_pi* const tunHeader = reinterpret_cast<tun_pi*>(tunPacket.base()); in translatePacket()
[all …]
Dtun_forwarder.h80 base::Result<void> validatePacket(netdutils::Slice tunPacket) const;
88 base::Result<void> translatePacket(netdutils::Slice tunPacket) const;