Lines Matching refs:tnl
66 const struct iptnl_info *tnl, in set_ethhdr() argument
70 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
78 struct iptnl_info *tnl; in handle_ipv4() local
102 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv4()
104 if (!tnl || tnl->family != AF_INET) in handle_ipv4()
122 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
131 iph->daddr = tnl->daddr.v4; in handle_ipv4()
132 iph->saddr = tnl->saddr.v4; in handle_ipv4()
151 struct iptnl_info *tnl; in handle_ipv6() local
172 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv6()
174 if (!tnl || tnl->family != AF_INET6) in handle_ipv6()
191 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); in handle_ipv6()
199 memcpy(ip6h->saddr.s6_addr32, tnl->saddr.v6, sizeof(tnl->saddr.v6)); in handle_ipv6()
200 memcpy(ip6h->daddr.s6_addr32, tnl->daddr.v6, sizeof(tnl->daddr.v6)); in handle_ipv6()