Lines Matching refs:amt_read
142 size_t amt_read; in pcap_check_header() local
171 amt_read = fread(((char *)&hdr) + sizeof hdr.magic, 1, in pcap_check_header()
173 if (amt_read != sizeof(hdr) - sizeof(hdr.magic)) { in pcap_check_header()
181 (unsigned long)amt_read); in pcap_check_header()
434 size_t amt_read; in pcap_next_packet() local
444 amt_read = fread(&sf_hdr, 1, ps->hdrsize, fp); in pcap_next_packet()
445 if (amt_read != ps->hdrsize) { in pcap_next_packet()
451 if (amt_read != 0) { in pcap_next_packet()
455 (unsigned long)amt_read); in pcap_next_packet()
599 amt_read = fread(p->buffer, 1, p->snapshot, fp); in pcap_next_packet()
600 if (amt_read != (bpf_u_int32)p->snapshot) { in pcap_next_packet()
615 p->snapshot, (unsigned long)amt_read); in pcap_next_packet()
624 bytes_read = amt_read; in pcap_next_packet()
629 amt_read = fread(discard_buf, 1, bytes_to_read, fp); in pcap_next_packet()
630 bytes_read += amt_read; in pcap_next_packet()
631 if (amt_read != bytes_to_read) { in pcap_next_packet()
643 bytes_to_discard -= amt_read; in pcap_next_packet()
679 amt_read = fread(p->buffer, 1, hdr->caplen, fp); in pcap_next_packet()
680 if (amt_read != hdr->caplen) { in pcap_next_packet()
688 hdr->caplen, (unsigned long)amt_read); in pcap_next_packet()
845 size_t amt_read; in pcap_dump_open_append() local
879 amt_read = fread(&ph, 1, sizeof (ph), f); in pcap_dump_open_append()
880 if (amt_read != sizeof (ph)) { in pcap_dump_open_append()
886 } else if (feof(f) && amt_read > 0) { in pcap_dump_open_append()
914 if (amt_read > 0) { in pcap_dump_open_append()