Lines Matching refs:magic
151 pcap_check_header(bpf_u_int32 magic, FILE *fp, u_int precision, char *errbuf, in pcap_check_header() argument
170 if (magic != TCPDUMP_MAGIC && magic != KUZNETZOV_TCPDUMP_MAGIC && in pcap_check_header()
171 magic != NSEC_TCPDUMP_MAGIC) { in pcap_check_header()
172 magic = SWAPLONG(magic); in pcap_check_header()
173 if (magic != TCPDUMP_MAGIC && magic != KUZNETZOV_TCPDUMP_MAGIC && in pcap_check_header()
174 magic != NSEC_TCPDUMP_MAGIC) in pcap_check_header()
183 hdr.magic = magic; in pcap_check_header()
184 amt_read = fread(((char *)&hdr) + sizeof hdr.magic, 1, in pcap_check_header()
185 sizeof(hdr) - sizeof(hdr.magic), fp); in pcap_check_header()
186 if (amt_read != sizeof(hdr) - sizeof(hdr.magic)) { in pcap_check_header()
251 if (magic == NSEC_TCPDUMP_MAGIC) { in pcap_check_header()
268 if (magic == NSEC_TCPDUMP_MAGIC) { in pcap_check_header()
322 if (magic == KUZNETZOV_TCPDUMP_MAGIC) { in pcap_check_header()
573 …hdr.magic = p->opt.tstamp_precision == PCAP_TSTAMP_PRECISION_NANO ? NSEC_TCPDUMP_MAGIC : TCPDUMP_M… in sf_write_header()
772 switch (ph.magic) { in pcap_dump_open_append()