diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-04 06:56:02 -0800 |
---|---|---|
committer | Zhang zhengguang <zhengguang.zhang@intel.com> | 2014-12-12 12:50:59 +0800 |
commit | 11ede81cd6af3e7fc7b2c826c2301f48d2210077 (patch) | |
tree | ff89c6578bc0f90fb7dbd7de9aefb54c2fd3d601 | |
parent | 6c7da5860fff5fa5bcbbf9f8714d5f97e220c6e9 (diff) | |
download | libpcap-11ede81cd6af3e7fc7b2c826c2301f48d2210077.tar.gz libpcap-11ede81cd6af3e7fc7b2c826c2301f48d2210077.tar.bz2 libpcap-11ede81cd6af3e7fc7b2c826c2301f48d2210077.zip |
bpf
-rw-r--r-- | pcap/bpf.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -100,6 +100,25 @@ typedef u_int bpf_u_int32; #define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) /* + * Struct returned by BIOCGSTATS. + */ +struct bpf_stat { + u_int bs_recv; /* number of packets received */ + u_int bs_drop; /* number of packets dropped */ +}; + +/* + * Structure prepended to each packet. + */ +struct bpf_hdr { + struct timeval bh_tstamp; /* time stamp */ + bpf_u_int32 bh_caplen; /* length of captured portion */ + bpf_u_int32 bh_datalen; /* original length of packet */ + u_short bh_hdrlen; /* length of bpf header (this struct + plus alignment padding) */ +}; + +/* * Structure for "pcap_compile()", "pcap_setfilter()", etc.. */ struct bpf_program { |