Lines Matching refs:new_eth
69 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr() argument
74 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
75 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
76 new_eth->h_proto = h_proto; in set_ethhdr()
84 struct ethhdr *new_eth; in handle_ipv4() local
118 new_eth = data; in handle_ipv4()
119 iph = data + sizeof(*new_eth); in handle_ipv4()
122 if (new_eth + 1 > data_end || in handle_ipv4()
127 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
157 struct ethhdr *new_eth; in handle_ipv6() local
188 new_eth = data; in handle_ipv6()
189 ip6h = data + sizeof(*new_eth); in handle_ipv6()
192 if (new_eth + 1 > data_end || old_eth + 1 > data_end || in handle_ipv6()
196 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); in handle_ipv6()