Lines Matching refs:ip6h
285 struct ipv6hdr *ip6h; in encap_v6() local
295 ip6h = data + sizeof(struct eth_hdr); in encap_v6()
298 old_eth + 1 > data_end || ip6h + 1 > data_end) in encap_v6()
303 ip6h->version = 6; in encap_v6()
304 ip6h->priority = 0; in encap_v6()
305 memset(ip6h->flow_lbl, 0, sizeof(ip6h->flow_lbl)); in encap_v6()
307 ip6h->nexthdr = IPPROTO_IPV6; in encap_v6()
309 ip6h->payload_len = in encap_v6()
311 ip6h->hop_limit = 4; in encap_v6()
313 ip6h->saddr.in6_u.u6_addr32[0] = 1; in encap_v6()
314 ip6h->saddr.in6_u.u6_addr32[1] = 2; in encap_v6()
315 ip6h->saddr.in6_u.u6_addr32[2] = 3; in encap_v6()
316 ip6h->saddr.in6_u.u6_addr32[3] = ip_suffix; in encap_v6()
317 memcpy(ip6h->daddr.in6_u.u6_addr32, dst->dstv6, 16); in encap_v6()
436 struct ipv6hdr *ip6h; in send_icmp6_reply() local
444 ip6h = data + off; in send_icmp6_reply()
449 ip6h->hop_limit = 4; in send_icmp6_reply()
450 memcpy(tmp_addr, ip6h->saddr.in6_u.u6_addr32, 16); in send_icmp6_reply()
451 memcpy(ip6h->saddr.in6_u.u6_addr32, ip6h->daddr.in6_u.u6_addr32, 16); in send_icmp6_reply()
452 memcpy(ip6h->daddr.in6_u.u6_addr32, tmp_addr, 16); in send_icmp6_reply()
461 struct ipv6hdr *ip6h; in parse_icmpv6() local
471 ip6h = data + off; in parse_icmpv6()
472 if (ip6h + 1 > data_end) in parse_icmpv6()
474 pckt->flow.proto = ip6h->nexthdr; in parse_icmpv6()
476 memcpy(pckt->flow.srcv6, ip6h->daddr.in6_u.u6_addr32, 16); in parse_icmpv6()
477 memcpy(pckt->flow.dstv6, ip6h->saddr.in6_u.u6_addr32, 16); in parse_icmpv6()
605 struct ipv6hdr *ip6h; in process_l3_headers_v6() local
611 ip6h = data + off; in process_l3_headers_v6()
612 if (ip6h + 1 > data_end) in process_l3_headers_v6()
615 *protocol = ip6h->nexthdr; in process_l3_headers_v6()
617 *pkt_bytes = bpf_ntohs(ip6h->payload_len); in process_l3_headers_v6()
626 memcpy(pckt->flow.srcv6, ip6h->saddr.in6_u.u6_addr32, 16); in process_l3_headers_v6()
627 memcpy(pckt->flow.dstv6, ip6h->daddr.in6_u.u6_addr32, 16); in process_l3_headers_v6()