Lines Matching refs:ip6h
284 struct ipv6hdr *ip6h; in encap_v6() local
294 ip6h = data + sizeof(struct eth_hdr); in encap_v6()
297 old_eth + 1 > data_end || ip6h + 1 > data_end) in encap_v6()
302 ip6h->version = 6; in encap_v6()
303 ip6h->priority = 0; in encap_v6()
304 memset(ip6h->flow_lbl, 0, sizeof(ip6h->flow_lbl)); in encap_v6()
306 ip6h->nexthdr = IPPROTO_IPV6; in encap_v6()
308 ip6h->payload_len = in encap_v6()
310 ip6h->hop_limit = 4; in encap_v6()
312 ip6h->saddr.in6_u.u6_addr32[0] = 1; in encap_v6()
313 ip6h->saddr.in6_u.u6_addr32[1] = 2; in encap_v6()
314 ip6h->saddr.in6_u.u6_addr32[2] = 3; in encap_v6()
315 ip6h->saddr.in6_u.u6_addr32[3] = ip_suffix; in encap_v6()
316 memcpy(ip6h->daddr.in6_u.u6_addr32, dst->dstv6, 16); in encap_v6()
463 struct ipv6hdr *ip6h; in send_icmp6_reply() local
471 ip6h = data + off; in send_icmp6_reply()
476 ip6h->hop_limit = 4; in send_icmp6_reply()
477 memcpy(tmp_addr, ip6h->saddr.in6_u.u6_addr32, 16); in send_icmp6_reply()
478 memcpy(ip6h->saddr.in6_u.u6_addr32, ip6h->daddr.in6_u.u6_addr32, 16); in send_icmp6_reply()
479 memcpy(ip6h->daddr.in6_u.u6_addr32, tmp_addr, 16); in send_icmp6_reply()
488 struct ipv6hdr *ip6h; in parse_icmpv6() local
498 ip6h = data + off; in parse_icmpv6()
499 if (ip6h + 1 > data_end) in parse_icmpv6()
501 pckt->flow.proto = ip6h->nexthdr; in parse_icmpv6()
503 memcpy(pckt->flow.srcv6, ip6h->daddr.in6_u.u6_addr32, 16); in parse_icmpv6()
504 memcpy(pckt->flow.dstv6, ip6h->saddr.in6_u.u6_addr32, 16); in parse_icmpv6()
633 struct ipv6hdr *ip6h; in process_l3_headers_v6() local
637 ip6h = data + off; in process_l3_headers_v6()
638 if (ip6h + 1 > data_end) in process_l3_headers_v6()
641 *protocol = ip6h->nexthdr; in process_l3_headers_v6()
643 *pkt_bytes = bpf_ntohs(ip6h->payload_len); in process_l3_headers_v6()
652 memcpy(pckt->flow.srcv6, ip6h->saddr.in6_u.u6_addr32, 16); in process_l3_headers_v6()
653 memcpy(pckt->flow.dstv6, ip6h->daddr.in6_u.u6_addr32, 16); in process_l3_headers_v6()