* Destination options header processing.
*/
int
-dest6_input(mp, offp)
- struct mbuf **mp;
- int *offp;
+dest6_input(struct mbuf **mp, int *offp, int proto)
{
+#pragma unused(proto)
struct mbuf *m = *mp;
int off = *offp, dstoptlen, optlen;
struct ip6_dest *dstopts;
u_int8_t *opt;
- struct ip6_hdr *ip6;
-
- ip6 = mtod(m, struct ip6_hdr *);
/* validation of the length of the header */
-#ifndef PULLDOWN_TEST
IP6_EXTHDR_CHECK(m, off, sizeof(*dstopts), return IPPROTO_DONE);
dstopts = (struct ip6_dest *)(mtod(m, caddr_t) + off);
-#else
- IP6_EXTHDR_GET(dstopts, struct ip6_dest *, m, off, sizeof(*dstopts));
- if (dstopts == NULL)
- return IPPROTO_DONE;
-#endif
dstoptlen = (dstopts->ip6d_len + 1) << 3;
-#ifndef PULLDOWN_TEST
IP6_EXTHDR_CHECK(m, off, dstoptlen, return IPPROTO_DONE);
dstopts = (struct ip6_dest *)(mtod(m, caddr_t) + off);
-#else
- IP6_EXTHDR_GET(dstopts, struct ip6_dest *, m, off, dstoptlen);
- if (dstopts == NULL)
- return IPPROTO_DONE;
-#endif
off += dstoptlen;
dstoptlen -= sizeof(struct ip6_dest);
opt = (u_int8_t *)dstopts + sizeof(struct ip6_dest);
default: /* unknown option */
optlen = ip6_unknown_opt(opt, m,
- opt - mtod(m, u_int8_t *), 0);
+ opt - mtod(m, u_int8_t *));
if (optlen == -1)
return (IPPROTO_DONE);
optlen += 2;