summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-04 06:56:02 -0800
committerZhang zhengguang <zhengguang.zhang@intel.com>2014-12-12 12:50:59 +0800
commit11ede81cd6af3e7fc7b2c826c2301f48d2210077 (patch)
treeff89c6578bc0f90fb7dbd7de9aefb54c2fd3d601
parent6c7da5860fff5fa5bcbbf9f8714d5f97e220c6e9 (diff)
downloadlibpcap-11ede81cd6af3e7fc7b2c826c2301f48d2210077.tar.gz
libpcap-11ede81cd6af3e7fc7b2c826c2301f48d2210077.tar.bz2
libpcap-11ede81cd6af3e7fc7b2c826c2301f48d2210077.zip
bpf
-rw-r--r--pcap/bpf.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/pcap/bpf.h b/pcap/bpf.h
index ff88fd0..577c8e3 100644
--- a/pcap/bpf.h
+++ b/pcap/bpf.h
@@ -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 {