Lines Matching refs:hdr
325 struct ipv6_sr_hdr *hdr; in seg6_update_csum() local
333 hdr = (struct ipv6_sr_hdr *)skb_transport_header(skb); in seg6_update_csum()
334 addr = hdr->segments + hdr->segments_left; in seg6_update_csum()
336 hdr->segments_left++; in seg6_update_csum()
337 from = *(__be32 *)hdr; in seg6_update_csum()
339 hdr->segments_left--; in seg6_update_csum()
340 to = *(__be32 *)hdr; in seg6_update_csum()
356 struct ipv6_sr_hdr *hdr; in ipv6_srh_rcv() local
361 hdr = (struct ipv6_sr_hdr *)skb_transport_header(skb); in ipv6_srh_rcv()
382 if (hdr->segments_left == 0) { in ipv6_srh_rcv()
383 if (hdr->nexthdr == NEXTHDR_IPV6) { in ipv6_srh_rcv()
384 int offset = (hdr->hdrlen + 1) << 3; in ipv6_srh_rcv()
408 skb->transport_header += (hdr->hdrlen + 1) << 3; in ipv6_srh_rcv()
409 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_srh_rcv()
414 if (hdr->segments_left >= (hdr->hdrlen >> 1)) { in ipv6_srh_rcv()
417 ((&hdr->segments_left) - in ipv6_srh_rcv()
431 hdr = (struct ipv6_sr_hdr *)skb_transport_header(skb); in ipv6_srh_rcv()
433 hdr->segments_left--; in ipv6_srh_rcv()
434 addr = hdr->segments + hdr->segments_left; in ipv6_srh_rcv()
473 struct ipv6_rpl_sr_hdr *hdr, *ohdr, *chdr; in ipv6_rpl_srh_rcv() local
497 hdr = (struct ipv6_rpl_sr_hdr *)skb_transport_header(skb); in ipv6_rpl_srh_rcv()
499 if (hdr->segments_left == 0) { in ipv6_rpl_srh_rcv()
500 if (hdr->nexthdr == NEXTHDR_IPV6) { in ipv6_rpl_srh_rcv()
501 int offset = (hdr->hdrlen + 1) << 3; in ipv6_rpl_srh_rcv()
525 skb->transport_header += (hdr->hdrlen + 1) << 3; in ipv6_rpl_srh_rcv()
526 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rpl_srh_rcv()
531 if (!pskb_may_pull(skb, sizeof(*hdr))) { in ipv6_rpl_srh_rcv()
536 n = (hdr->hdrlen << 3) - hdr->pad - (16 - hdr->cmpre); in ipv6_rpl_srh_rcv()
537 r = do_div(n, (16 - hdr->cmpri)); in ipv6_rpl_srh_rcv()
547 if (hdr->segments_left > n + 1) { in ipv6_rpl_srh_rcv()
550 ((&hdr->segments_left) - in ipv6_rpl_srh_rcv()
555 if (!pskb_may_pull(skb, ipv6_rpl_srh_size(n, hdr->cmpri, in ipv6_rpl_srh_rcv()
556 hdr->cmpre))) { in ipv6_rpl_srh_rcv()
561 hdr->segments_left--; in ipv6_rpl_srh_rcv()
562 i = n - hdr->segments_left; in ipv6_rpl_srh_rcv()
564 buf = kcalloc(struct_size(hdr, segments.addr, n + 2), 2, GFP_ATOMIC); in ipv6_rpl_srh_rcv()
571 ipv6_rpl_srh_decompress(ohdr, hdr, &ipv6_hdr(skb)->daddr, n); in ipv6_rpl_srh_rcv()
597 skb_pull(skb, ((hdr->hdrlen + 1) << 3)); in ipv6_rpl_srh_rcv()
599 sizeof(struct ipv6hdr) + ((hdr->hdrlen + 1) << 3)); in ipv6_rpl_srh_rcv()
600 if (unlikely(!hdr->segments_left)) { in ipv6_rpl_srh_rcv()
665 struct ipv6_rt_hdr *hdr; in ipv6_rthdr_rcv() local
682 hdr = (struct ipv6_rt_hdr *)skb_transport_header(skb); in ipv6_rthdr_rcv()
691 switch (hdr->type) { in ipv6_rthdr_rcv()
703 if (hdr->segments_left == 0) { in ipv6_rthdr_rcv()
704 switch (hdr->type) { in ipv6_rthdr_rcv()
723 skb->transport_header += (hdr->hdrlen + 1) << 3; in ipv6_rthdr_rcv()
726 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rthdr_rcv()
730 switch (hdr->type) { in ipv6_rthdr_rcv()
736 if (hdr->hdrlen != 2 || hdr->segments_left != 1) { in ipv6_rthdr_rcv()
752 n = hdr->hdrlen >> 1; in ipv6_rthdr_rcv()
754 if (hdr->segments_left > n) { in ipv6_rthdr_rcv()
757 ((&hdr->segments_left) - in ipv6_rthdr_rcv()
773 hdr = (struct ipv6_rt_hdr *)skb_transport_header(skb); in ipv6_rthdr_rcv()
779 i = n - --hdr->segments_left; in ipv6_rthdr_rcv()
781 rthdr = (struct rt0_hdr *) hdr; in ipv6_rthdr_rcv()
785 switch (hdr->type) { in ipv6_rthdr_rcv()
843 (&hdr->type) - skb_network_header(skb)); in ipv6_rthdr_rcv()