Lines Matching refs:tnl
69 const struct iptnl_info *tnl, in set_ethhdr() argument
73 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
81 struct iptnl_info *tnl; in handle_ipv4() local
105 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv4()
107 if (!tnl || tnl->family != AF_INET) in handle_ipv4()
127 set_ethhdr(new_eth, old_eth, tnl, htons(ETH_P_IP)); in handle_ipv4()
136 iph->daddr = tnl->daddr.v4; in handle_ipv4()
137 iph->saddr = tnl->saddr.v4; in handle_ipv4()
156 struct iptnl_info *tnl; in handle_ipv6() local
177 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv6()
179 if (!tnl || tnl->family != AF_INET6) in handle_ipv6()
199 set_ethhdr(new_eth, old_eth, tnl, htons(ETH_P_IPV6)); in handle_ipv6()
207 memcpy(ip6h->saddr.s6_addr32, tnl->saddr.v6, sizeof(tnl->saddr.v6)); in handle_ipv6()
208 memcpy(ip6h->daddr.s6_addr32, tnl->daddr.v6, sizeof(tnl->daddr.v6)); in handle_ipv6()