Lines Matching refs:new_eth
68 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr() argument
73 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
74 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
75 new_eth->h_proto = h_proto; in set_ethhdr()
83 struct ethhdr *new_eth; in handle_ipv4() local
117 new_eth = data; in handle_ipv4()
118 iph = data + sizeof(*new_eth); in handle_ipv4()
121 if (new_eth + 1 > data_end || in handle_ipv4()
126 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
156 struct ethhdr *new_eth; in handle_ipv6() local
187 new_eth = data; in handle_ipv6()
188 ip6h = data + sizeof(*new_eth); in handle_ipv6()
191 if (new_eth + 1 > data_end || old_eth + 1 > data_end || in handle_ipv6()
195 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); in handle_ipv6()