Lines Matching refs:ip6h
154 struct ipv6hdr *ip6h = data + sizeof(struct ethhdr); in handle_ipv6() local
159 if (ip6h + 1 > data_end) in handle_ipv6()
162 dport = get_dport(ip6h + 1, data_end, ip6h->nexthdr); in handle_ipv6()
166 vip.protocol = ip6h->nexthdr; in handle_ipv6()
168 memcpy(vip.daddr.v6, ip6h->daddr.s6_addr32, sizeof(vip.daddr)); in handle_ipv6()
170 payload_len = ip6h->payload_len; in handle_ipv6()
184 ip6h = data + sizeof(*new_eth); in handle_ipv6()
185 old_eth = data + sizeof(*ip6h); in handle_ipv6()
188 ip6h + 1 > data_end) in handle_ipv6()
193 ip6h->version = 6; in handle_ipv6()
194 ip6h->priority = 0; in handle_ipv6()
195 memset(ip6h->flow_lbl, 0, sizeof(ip6h->flow_lbl)); in handle_ipv6()
196 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
197 ip6h->nexthdr = IPPROTO_IPV6; in handle_ipv6()
198 ip6h->hop_limit = 8; in handle_ipv6()
199 memcpy(ip6h->saddr.s6_addr32, tnl->saddr.v6, sizeof(tnl->saddr.v6)); in handle_ipv6()
200 memcpy(ip6h->daddr.s6_addr32, tnl->daddr.v6, sizeof(tnl->daddr.v6)); in handle_ipv6()