Lines Matching refs:ip6h
155 struct ipv6hdr *ip6h = data + sizeof(struct ethhdr); in handle_ipv6() local
160 if (ip6h + 1 > data_end) in handle_ipv6()
163 dport = get_dport(ip6h + 1, data_end, ip6h->nexthdr); in handle_ipv6()
167 vip.protocol = ip6h->nexthdr; in handle_ipv6()
169 memcpy(vip.daddr.v6, ip6h->daddr.s6_addr32, sizeof(vip.daddr)); in handle_ipv6()
171 payload_len = ip6h->payload_len; in handle_ipv6()
185 ip6h = data + sizeof(*new_eth); in handle_ipv6()
186 old_eth = data + sizeof(*ip6h); in handle_ipv6()
189 ip6h + 1 > data_end) in handle_ipv6()
194 ip6h->version = 6; in handle_ipv6()
195 ip6h->priority = 0; in handle_ipv6()
196 memset(ip6h->flow_lbl, 0, sizeof(ip6h->flow_lbl)); in handle_ipv6()
197 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
198 ip6h->nexthdr = IPPROTO_IPV6; in handle_ipv6()
199 ip6h->hop_limit = 8; in handle_ipv6()
200 memcpy(ip6h->saddr.s6_addr32, tnl->saddr.v6, sizeof(tnl->saddr.v6)); in handle_ipv6()
201 memcpy(ip6h->daddr.s6_addr32, tnl->daddr.v6, sizeof(tnl->daddr.v6)); in handle_ipv6()