Lines Matching refs:ip6h
168 struct ipv6hdr *ip6h; in handle_ipv6() local
178 ip6h = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, ip6h_buffer_udp, sizeof(ip6h_buffer_udp)); in handle_ipv6()
180 ip6h = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, ip6h_buffer_tcp, sizeof(ip6h_buffer_tcp)); in handle_ipv6()
182 if (!ip6h) in handle_ipv6()
185 dport = get_dport(ip6h + 1, ip6h->nexthdr); in handle_ipv6()
189 vip.protocol = ip6h->nexthdr; in handle_ipv6()
191 memcpy(vip.daddr.v6, ip6h->daddr.s6_addr32, sizeof(vip.daddr)); in handle_ipv6()
193 payload_len = ip6h->payload_len; in handle_ipv6()
208 ip6h = (struct ipv6hdr *)(new_eth + 1); in handle_ipv6()
209 old_eth = (struct ethhdr *)(ip6h + 1); in handle_ipv6()
216 ip6h->version = 6; in handle_ipv6()
217 ip6h->priority = 0; in handle_ipv6()
218 memset(ip6h->flow_lbl, 0, sizeof(ip6h->flow_lbl)); in handle_ipv6()
219 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + ipv6hdr_sz); in handle_ipv6()
220 ip6h->nexthdr = IPPROTO_IPV6; in handle_ipv6()
221 ip6h->hop_limit = 8; in handle_ipv6()
222 memcpy(ip6h->saddr.s6_addr32, tnl->saddr.v6, sizeof(tnl->saddr.v6)); in handle_ipv6()
223 memcpy(ip6h->daddr.s6_addr32, tnl->daddr.v6, sizeof(tnl->daddr.v6)); in handle_ipv6()