Lines Matching refs:tnl
72 const struct iptnl_info *tnl, in set_ethhdr() argument
76 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
84 struct iptnl_info *tnl; in handle_ipv4() local
108 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv4()
110 if (!tnl || tnl->family != AF_INET) in handle_ipv4()
128 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
137 iph->daddr = tnl->daddr.v4; in handle_ipv4()
138 iph->saddr = tnl->saddr.v4; in handle_ipv4()
157 struct iptnl_info *tnl; in handle_ipv6() local
178 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv6()
180 if (!tnl || tnl->family != AF_INET6) in handle_ipv6()
197 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); in handle_ipv6()
205 memcpy(ip6h->saddr.s6_addr32, tnl->saddr.v6, sizeof(tnl->saddr.v6)); in handle_ipv6()
206 memcpy(ip6h->daddr.s6_addr32, tnl->daddr.v6, sizeof(tnl->daddr.v6)); in handle_ipv6()