Date:2011-01-19 17:16:03 (9 years 6 months ago)
Author:Werner Almesberger
Commit:ea81e70cf9509feb5df19ab2ff5cc7e2ff8efb35
Message:atrf-txrx: define the pcap file magic number (0xa1b2c3d4) in pcap.h

- pcap.h (PCAP_FILE_MAGIC): define the pcap file magic number
- atrf-txrx.c (write_pcap_hdr): use PCAP_FILE_MAGIC instead of open-coding
the magic number
Files: tools/atrf-txrx/atrf-txrx.c (1 diff)
tools/atrf-txrx/pcap.h (1 diff)

Change Details

tools/atrf-txrx/atrf-txrx.c
184184static void write_pcap_hdr(FILE *file)
185185{
186186    struct pcap_file_header hdr = {
187        .magic = 0xa1b2c3d4,
187        .magic = PCAP_FILE_MAGIC,
188188        .version_major = 2,
189189        .version_minor = 4,
190190        .thiszone = 0,
tools/atrf-txrx/pcap.h
2727#include <sys/time.h>
2828
2929
30#define PCAP_FILE_MAGIC 0xa1b2c3d4
31
3032#define DLT_IEEE802_15_4 195
3133
34
3235struct pcap_file_header {
3336    uint32_t magic;
3437    uint16_t version_major;

Archive Download the corresponding diff file



interactive