Lines Matching refs:cursor

194  * Block cursor - used when processing the contents of a block.
233 read_block(FILE *fp, pcap_t *p, struct block_cursor *cursor, char *errbuf)
298 * Initialize the cursor.
300 cursor->data = p->buffer + sizeof(bhdr);
301 cursor->data_remaining = bhdr.total_length - sizeof(bhdr) -
303 cursor->block_type = bhdr.block_type;
308 get_from_block_data(struct block_cursor *cursor, size_t chunk_size,
317 if (cursor->data_remaining < chunk_size) {
320 cursor->block_type);
327 data = cursor->data;
328 cursor->data += chunk_size;
329 cursor->data_remaining -= chunk_size;
334 get_opthdr_from_block_data(pcap_t *p, struct block_cursor *cursor, char *errbuf)
338 opthdr = get_from_block_data(cursor, sizeof(*opthdr), errbuf);
358 get_optvalue_from_block_data(struct block_cursor *cursor,
368 optvalue = get_from_block_data(cursor, padded_option_len, errbuf);
380 process_idb_options(pcap_t *p, struct block_cursor *cursor, u_int *tsresol,
391 while (cursor->data_remaining != 0) {
395 opthdr = get_opthdr_from_block_data(p, cursor, errbuf);
406 optvalue = get_optvalue_from_block_data(cursor, opthdr,
510 struct block_cursor cursor;
664 status = read_block(fp, p, &cursor, errbuf);
673 switch (cursor.block_type) {
680 idbp = get_from_block_data(&cursor, sizeof(*idbp),
702 if (process_idb_options(p, &cursor, &p->sf.tsresol,
769 struct block_cursor cursor;
791 status = read_block(fp, p, &cursor, p->errbuf);
796 switch (cursor.block_type) {
803 epbp = get_from_block_data(&cursor, sizeof(*epbp),
832 spbp = get_from_block_data(&cursor, sizeof(*spbp),
868 pbp = get_from_block_data(&cursor, sizeof(*pbp),
897 idbp = get_from_block_data(&cursor, sizeof(*idbp),
950 if (process_idb_options(p, &cursor, &tsresol, &tsoffset,
970 shbp = get_from_block_data(&cursor, sizeof(*shbp),
1086 *data = get_from_block_data(&cursor, hdr->caplen, p->errbuf);