Lines Matching refs:off

120  * ensure that [off, off + len) is contiguous on the mbuf chain "m".
121 * packet chain before "off" is kept untouched.
130 m_pulldown(struct mbuf *m, int off, int len, int *offp)
155 if (off + len > MHLEN)
163 if (dlen >= off + len)
169 if (mlen >= off + len)
177 prevlen = off + len;
183 if (off + len > MCLBYTES)
190 prevlen = off + len;
193 if (dlen >= off + len)
198 prevmlen = (off + len > MHLEN) ? MCLBYTES : MHLEN;
200 if (mlen >= off + len)
205 prevmlen = (off + len > MHLEN) ? MCLBYTES
224 while (n != NULL && off > 0) {
225 if (n->m_len > off)
227 off -= n->m_len;
239 * the target data is on <n, off>.
242 if ((off == 0 || offp) && len <= n->m_len - off)
250 * when len < n->m_len - off and off != 0, it is a special case.
251 * len bytes from <n, off> sits in single mbuf, but the caller does
252 * not like the starting position (off).
253 * chop the current mbuf into two pieces, set off to 0.
255 if (len < n->m_len - off) {
256 o = m_copym(n, off, n->m_len - off, M_DONTWAIT);
261 n->m_len = off;
265 off = 0;
270 * we need to take hlen from <n, off> and tlen from <n->m_next, 0>,
274 hlen = n->m_len - off;
303 if ((off == 0 || offp) && M_TRAILINGSPACE(n) >= tlen
310 if ((off == 0 || offp) && M_LEADINGSPACE(n->m_next) >= hlen
314 bcopy(mtod(n, caddr_t) + off, mtod(n->m_next, caddr_t), hlen);
317 off = 0;
341 /* get hlen from <n, off> into <o, 0> */
343 bcopy(mtod(n, caddr_t) + off, mtod(o, caddr_t), hlen);
352 off = 0;
361 printf(" (off=%d)\n", off);
365 *offp = off;
614 * XXXMAC: we should probably pass off the initialization, and