Home | History | Annotate | Download | only in libpcap

Lines Matching refs:magic

151 pcap_check_header(bpf_u_int32 magic, FILE *fp, u_int precision, char *errbuf,
166 * Check whether the first 4 bytes of the file are the magic
170 if (magic != TCPDUMP_MAGIC && magic != KUZNETZOV_TCPDUMP_MAGIC &&
171 magic != NSEC_TCPDUMP_MAGIC) {
172 magic = SWAPLONG(magic);
173 if (magic != TCPDUMP_MAGIC && magic != KUZNETZOV_TCPDUMP_MAGIC &&
174 magic != NSEC_TCPDUMP_MAGIC)
180 * They are. Put the magic number in the header, and read
183 hdr.magic = magic;
184 amt_read = fread(((char *)&hdr) + sizeof hdr.magic, 1,
185 sizeof(hdr) - sizeof(hdr.magic), fp);
186 if (amt_read != sizeof(hdr) - sizeof(hdr.magic)) {
274 if (magic == NSEC_TCPDUMP_MAGIC) {
291 if (magic == NSEC_TCPDUMP_MAGIC) {
345 if (magic == KUZNETZOV_TCPDUMP_MAGIC) {
348 * changes the packet header but not the magic number,
349 * and some other versions with this magic number have
431 * libpcap, but if the file has the magic number for an
626 hdr.magic = p->opt.tstamp_precision == PCAP_TSTAMP_PRECISION_NANO ? NSEC_TCPDUMP_MAGIC : TCPDUMP_MAGIC;
836 switch (ph.magic) {