Lines Matching defs:hdr
324 struct pcap_file_header hdr;
375 hdr.magic = TCPDUMP_MAGIC;
376 hdr.version_major = PCAP_VERSION_MAJOR;
377 hdr.version_minor = PCAP_VERSION_MINOR;
378 hdr.thiszone = hpcap->tzoff;
379 hdr.snaplen = hpcap->snapshot;
380 hdr.sigfigs = 0;
381 hdr.linktype = hpcap->linktype;
383 if (fwrite((char *)&hdr, sizeof(hdr), 1, fp) != 1) {
408 struct pcap_file_header hdr;
426 if (fread((char *)&hdr, sizeof(hdr), 1, fp) != 1) {
431 if (hdr.magic != TCPDUMP_MAGIC ||
432 hdr.version_major != PCAP_VERSION_MAJOR ||
433 hdr.version_minor != PCAP_VERSION_MINOR ||
434 hdr.linktype != hpcap->linktype ||
435 hdr.snaplen > PFLOGD_MAXSNAPLEN) {
439 pos = sizeof(hdr);
448 if (ph.caplen > hdr.snaplen || ph.caplen > PFLOGD_MAXSNAPLEN)
459 if (hdr.snaplen != cur_snaplen) {
462 hdr.snaplen);
463 if (set_snaplen(hdr.snaplen)) {