Lines Matching refs:tail
165 boff_t tail = (data + datalen - 1) % rb->len; in buf_try_resize() local
168 tcpbufseg_t *tailseg = buf_getbuf(rb, tail); in buf_try_resize()
179 if (head > tail && headseg == tailseg) { in buf_try_resize()
221 if (f->tail <= eh) in buf_try_resize()
224 if (f->tail > et) { in buf_try_resize()
227 new->tail = f->tail; in buf_try_resize()
230 f->tail = et; in buf_try_resize()
233 if (f->head >= eh && f->tail <= et) { in buf_try_resize()
241 new->tail = f->tail; in buf_try_resize()
244 f->tail = eh; in buf_try_resize()
270 assert((tail % UNITBUFSIZE) < (head % UNITBUFSIZE)); in buf_try_resize()
425 if (new > cf->tail) in tcprb_setpile()
442 int cflen = cf->tail - rb->pile; /* length of cf */ in tcprb_cflen()
463 int cflen = cf->tail - cf->head; /* length of cf */ in tcprb_ffhead()
503 int cflen = cf->tail - cf->head; /* length of cf */ in tcprb_fflen()
516 return lastfrag ? (int)(lastfrag->tail - rb->head) : 0; in tcprb_get_datalen()
615 if (off >= f->head && off < f->tail) { in tcprb_ppeek()
624 int plen = MIN(len, f->tail - off); in tcprb_ppeek()
680 if (f->tail > off + uoff) { in tcprb_pwrite()
682 wrlen = f->tail - (off + uoff); in tcprb_pwrite()
684 } else if (f->tail == off + uoff) { in tcprb_pwrite()
689 ef && ef->empty && ef->head < f->tail + len - uoff; in tcprb_pwrite()
693 if (ef->tail <= f->tail + len - uoff) { in tcprb_pwrite()
696 ef->head = f->tail + len - uoff; in tcprb_pwrite()
705 f->tail += wrlen; in tcprb_pwrite()
706 if (fnext && (f->tail == fnext->head)) { in tcprb_pwrite()
708 f->tail = fnext->tail; in tcprb_pwrite()
721 ef && ef->empty && ef->tail < f->head; in tcprb_pwrite()
728 ef->tail = f->head; in tcprb_pwrite()
751 new->tail = off + len; in tcprb_pwrite()
775 new->tail = efhead + eflen; in tcprb_pwrite()
808 printf("[%lu - %lu]:'", walk->head, walk->tail - 1); in tcprb_printfrags()
814 for (i = walk->head; i < walk->tail; i++) { in tcprb_printfrags()
907 if (DOESOVERLAP(f->head, f->tail, off, off + pctx->p.payloadlen)) { in tcp_rb_overlapchk()