Lines Matching refs:offset
66 size_t offset; /* valid iff buf != NULL; 0 if len == 0 */ member
161 if (peer_b->offset + rest <= peer_b->size) in bio_read()
165 chunk = peer_b->size - peer_b->offset; in bio_read()
166 assert(peer_b->offset + chunk <= peer_b->size); in bio_read()
168 memcpy(buf, peer_b->buf + peer_b->offset, chunk); in bio_read()
172 peer_b->offset += chunk; in bio_read()
173 assert(peer_b->offset <= peer_b->size); in bio_read()
174 if (peer_b->offset == peer_b->size) in bio_read()
175 peer_b->offset = 0; in bio_read()
180 peer_b->offset = 0; in bio_read()
227 if (peer_b->size < peer_b->offset + num) in bio_nread0()
229 num = peer_b->size - peer_b->offset; in bio_nread0()
233 *buf = peer_b->buf + peer_b->offset; in bio_nread0()
258 peer_b->offset += num; in bio_nread()
259 assert(peer_b->offset <= peer_b->size); in bio_nread()
260 if (peer_b->offset == peer_b->size) in bio_nread()
261 peer_b->offset = 0; in bio_nread()
263 peer_b->offset = 0; in bio_nread()
313 write_offset = b->offset + b->len; in bio_write()
375 write_offset = b->offset + b->len; in bio_nwrite0()
530 b->offset = 0; in bio_ctrl()
626 b1->offset = 0; in bio_make_pair()
634 b2->offset = 0; in bio_make_pair()
667 peer_b->offset = 0; in bio_destroy_pair()
673 b->offset = 0; in bio_destroy_pair()