Lines Matching refs:tunPacket
205 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()
317 return translateIpv4Packet(drop(tunPacket, TUN_HDRLEN)); in translatePacket()
319 return translateIpv6Packet(drop(tunPacket, TUN_HDRLEN)); in translatePacket()