Lines Matching defs:srh
28 bool seg6_validate_srh(struct ipv6_sr_hdr *srh, int len, bool reduced)
34 if (srh->type != IPV6_SRCRT_TYPE_4)
37 if (((srh->hdrlen + 1) << 3) != len)
40 if (!reduced && srh->segments_left > srh->first_segment) {
43 max_last_entry = (srh->hdrlen / 2) - 1;
45 if (srh->first_segment > max_last_entry)
48 if (srh->segments_left > srh->first_segment + 1)
52 tlv_offset = sizeof(*srh) + ((srh->first_segment + 1) << 4);
65 tlv = (struct sr6_tlv *)((unsigned char *)srh + tlv_offset);
80 struct ipv6_sr_hdr *srh;
86 if (!pskb_may_pull(skb, srhoff + sizeof(*srh)))
89 srh = (struct ipv6_sr_hdr *)(skb->data + srhoff);
91 len = (srh->hdrlen + 1) << 3;
99 srh = (struct ipv6_sr_hdr *)(skb->data + srhoff);
101 if (!seg6_validate_srh(srh, len, true))
104 return srh;
114 struct ipv6_sr_hdr *srh;
122 srh = seg6_get_srh(skb, 0);
123 if (!srh)
126 if (srh->type != IPV6_SRCRT_TYPE_4)
130 opt->srhoff = (unsigned char *)srh - skb->data;