Lines Matching refs:new_eth
70 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr() argument
75 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
76 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
77 new_eth->h_proto = h_proto; in set_ethhdr()
85 struct ethhdr *new_eth; in handle_ipv4() local
119 new_eth = data; in handle_ipv4()
120 iph = data + sizeof(*new_eth); in handle_ipv4()
123 if (new_eth + 1 > data_end || in handle_ipv4()
128 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
158 struct ethhdr *new_eth; in handle_ipv6() local
189 new_eth = data; in handle_ipv6()
190 ip6h = data + sizeof(*new_eth); in handle_ipv6()
193 if (new_eth + 1 > data_end || old_eth + 1 > data_end || in handle_ipv6()
197 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); in handle_ipv6()