Lines Matching refs:bhdr
283 struct block_header bhdr; in read_block() local
290 status = read_bytes(fp, &bhdr, sizeof(bhdr), 0, errbuf); in read_block()
295 bhdr.block_type = SWAPLONG(bhdr.block_type); in read_block()
296 bhdr.total_length = SWAPLONG(bhdr.total_length); in read_block()
303 if (bhdr.total_length < sizeof(struct block_header) + in read_block()
307 bhdr.total_length, in read_block()
315 if ((bhdr.total_length % 4) != 0) { in read_block()
321 bhdr.total_length); in read_block()
328 if (p->bufsize < bhdr.total_length) { in read_block()
335 if (bhdr.total_length > ps->max_blocksize) { in read_block()
336 snprintf(errbuf, PCAP_ERRBUF_SIZE, "pcapng block size %u > maximum %u", bhdr.total_length, in read_block()
340 bigger_buffer = realloc(p->buffer, bhdr.total_length); in read_block()
352 memcpy(p->buffer, &bhdr, sizeof(bhdr)); in read_block()
353 bdata = (u_char *)p->buffer + sizeof(bhdr); in read_block()
354 data_remaining = bhdr.total_length - sizeof(bhdr); in read_block()
369 if (bhdr.total_length != btrlr->total_length) { in read_block()
383 cursor->block_type = bhdr.block_type; in read_block()