1 #include <linux/ipv6.h>
4 /* This function is upstream but not the version which supplies the
5 * fragment offset. We plan to propose the extended version.
7 int rpl_ipv6_skip_exthdr(const struct sk_buff *skb, int start,
8 u8 *nexthdrp, __be16 *frag_offp)
10 u8 nexthdr = *nexthdrp;
14 while (ipv6_ext_hdr(nexthdr)) {
15 struct ipv6_opt_hdr _hdr, *hp;
18 if (nexthdr == NEXTHDR_NONE)
20 hp = skb_header_pointer(skb, start, sizeof(_hdr), &_hdr);
23 if (nexthdr == NEXTHDR_FRAGMENT) {
24 __be16 _frag_off, *fp;
25 fp = skb_header_pointer(skb,
26 start+offsetof(struct frag_hdr,
34 if (ntohs(*frag_offp) & ~0x7)
37 } else if (nexthdr == NEXTHDR_AUTH)
38 hdrlen = (hp->hdrlen+2)<<2;
40 hdrlen = ipv6_optlen(hp);
42 nexthdr = hp->nexthdr;