Lines Matching defs:off

396 ip6_input_hbh(struct mbuf **mp, uint32_t *plen, uint32_t *rtalert, int *off,
403 if (ip6_hopopts_input(plen, rtalert, mp, off)) {
475 int off, nxt;
485 off = ip6dc->ip6dc_off;
501 if (m->m_pkthdr.len < off) {
509 if (IPSEC_INPUT(ipv6, m, off, nxt) != 0)
514 nxt = ip6_protox[nxt](&m, &off, nxt);
531 int off = sizeof(struct ip6_hdr), nest;
843 if (ip6_input_hbh(&m, &plen, &rtalert, &off, &nxt, &ours) != 0)
928 if (m->m_pkthdr.len < off) {
936 if (IPSEC_INPUT(ipv6, m, off, nxt) != 0)
941 nxt = ip6_protox[nxt](&m, &off, nxt);
961 int off = *offp, hbhlen;
965 if (m->m_len < off + sizeof(*hbh)) {
966 m = m_pullup(m, off + sizeof(*hbh));
973 hbh = (struct ip6_hbh *)(mtod(m, caddr_t) + off);
976 if (m->m_len < off + hbhlen) {
977 m = m_pullup(m, off + hbhlen);
984 hbh = (struct ip6_hbh *)(mtod(m, caddr_t) + off);
985 off += hbhlen;
993 *offp = off;
1137 * The third argument `off' is the offset from the IPv6 header to the option,
1142 ip6_unknown_opt(u_int8_t *optp, struct mbuf *m, int off)
1154 icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_OPTION, off);
1164 ICMP6_PARAMPROB_OPTION, off);
1434 int nxt = ip6->ip6_nxt, off = sizeof(struct ip6_hdr);
1461 if (off + sizeof(*ip6e) > m->m_len)
1463 ip6e = (struct ip6_ext *)(mtod(m, caddr_t) + off);
1468 if (off + elen > m->m_len)
1507 off += elen;
1601 ip6_get_prevhdr(const struct mbuf *m, int off)
1607 if (off == sizeof(struct ip6_hdr))
1609 if (off < sizeof(struct ip6_hdr))
1610 panic("%s: off < sizeof(struct ip6_hdr)", __func__);
1616 while (len < off) {
1638 ip6_nexthdr(const struct mbuf *m, int off, int proto, int *nxtp)
1647 if ((m->m_flags & M_PKTHDR) == 0 || m->m_pkthdr.len < off)
1652 if (m->m_pkthdr.len < off + sizeof(ip6))
1654 m_copydata(m, off, sizeof(ip6), (caddr_t)&ip6);
1657 off += sizeof(ip6);
1658 return off;
1665 if (m->m_pkthdr.len < off + sizeof(fh))
1667 m_copydata(m, off, sizeof(fh), (caddr_t)&fh);
1673 off += sizeof(struct ip6_frag);
1674 return off;
1677 if (m->m_pkthdr.len < off + sizeof(ip6e))
1679 m_copydata(m, off, sizeof(ip6e), (caddr_t)&ip6e);
1682 off += (ip6e.ip6e_len + 2) << 2;
1683 return off;
1688 if (m->m_pkthdr.len < off + sizeof(ip6e))
1690 m_copydata(m, off, sizeof(ip6e), (caddr_t)&ip6e);
1693 off += (ip6e.ip6e_len + 1) << 3;
1694 return off;
1713 ip6_lasthdr(const struct mbuf *m, int off, int proto, int *nxtp)
1723 newoff = ip6_nexthdr(m, off, proto, nxtp);
1725 return off;
1726 else if (newoff < off)
1728 else if (newoff == off)
1731 off = newoff;