"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pcap/bpf.h" between
libpcap-1.10.0.tar.gz and libpcap-1.10.1.tar.gz

About: libpcap is a packet filter library used by tools like tcpdump.

bpf.h  (libpcap-1.10.0):bpf.h  (libpcap-1.10.1)
skipping to change at line 84 skipping to change at line 84
* so we trust that it will define them in a fashion that's source-compatible * so we trust that it will define them in a fashion that's source-compatible
* and binary-compatible with our definitions. * and binary-compatible with our definitions.
* *
* This also provides our own multiple-include protection. * This also provides our own multiple-include protection.
*/ */
#if !defined(_NET_BPF_H_) && !defined(_NET_BPF_H_INCLUDED) && !defined(_BPF_H_) && !defined(_H_BPF) && !defined(lib_pcap_bpf_h) #if !defined(_NET_BPF_H_) && !defined(_NET_BPF_H_INCLUDED) && !defined(_BPF_H_) && !defined(_H_BPF) && !defined(lib_pcap_bpf_h)
#define lib_pcap_bpf_h #define lib_pcap_bpf_h
#include <pcap/funcattrs.h> #include <pcap/funcattrs.h>
#include <pcap/dlt.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* BSD style release date */ /* BSD style release date */
#define BPF_RELEASE 199606 #define BPF_RELEASE 199606
#ifdef MSDOS /* must be 32-bit */ #ifdef MSDOS /* must be 32-bit */
typedef long bpf_int32; typedef long bpf_int32;
typedef unsigned long bpf_u_int32; typedef unsigned long bpf_u_int32;
skipping to change at line 120 skipping to change at line 122
#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) #define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))
/* /*
* Structure for "pcap_compile()", "pcap_setfilter()", etc.. * Structure for "pcap_compile()", "pcap_setfilter()", etc..
*/ */
struct bpf_program { struct bpf_program {
u_int bf_len; u_int bf_len;
struct bpf_insn *bf_insns; struct bpf_insn *bf_insns;
}; };
#include <pcap/dlt.h>
#ifndef __LINUX_FILTER_H__
/* /*
* The instruction encodings. * The instruction encodings.
* *
* Please inform tcpdump-workers@lists.tcpdump.org if you use any * Please inform tcpdump-workers@lists.tcpdump.org if you use any
* of the reserved values, so that we can note that they're used * of the reserved values, so that we can note that they're used
* (and perhaps implement it in the reference BPF implementation * (and perhaps implement it in the reference BPF implementation
* and encourage its implementation elsewhere). * and encourage its implementation elsewhere).
*/ */
/* /*
skipping to change at line 244 skipping to change at line 242
/* 0xb8 reserved */ /* 0xb8 reserved */
/* 0xc0 reserved; used on BSD/OS */ /* 0xc0 reserved; used on BSD/OS */
/* 0xc8 reserved */ /* 0xc8 reserved */
/* 0xd0 reserved */ /* 0xd0 reserved */
/* 0xd8 reserved */ /* 0xd8 reserved */
/* 0xe0 reserved */ /* 0xe0 reserved */
/* 0xe8 reserved */ /* 0xe8 reserved */
/* 0xf0 reserved */ /* 0xf0 reserved */
/* 0xf8 reserved */ /* 0xf8 reserved */
#endif /* __LINUX_FILTER_H__ */
/* /*
* The instruction data structure. * The instruction data structure.
*/ */
struct bpf_insn { struct bpf_insn {
u_short code; u_short code;
u_char jt; u_char jt;
u_char jf; u_char jf;
bpf_u_int32 k; bpf_u_int32 k;
}; };
#ifndef __LINUX_FILTER_H__
/* /*
* Macros for insn array initializers. * Macros for insn array initializers.
*
* In case somebody's included <linux/filter.h>, or something else that
* gives the kernel's definitions of BPF statements, get rid of its
* definitions, so we can supply ours instead. If some kernel's
* definitions aren't *binary-compatible* with what BPF has had
* since it first sprung from the brows of Van Jacobson and Steve
* McCanne, that kernel should be fixed.
*/ */
#ifdef BPF_STMT
#undef BPF_STMT
#endif
#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } #define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
#ifdef BPF_JUMP
#undef BPF_JUMP
#endif
#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } #define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
#endif /* __LINUX_FILTER_H__ */
PCAP_AVAILABLE_0_4 PCAP_AVAILABLE_0_4
PCAP_API u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int) ; PCAP_API u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int) ;
PCAP_AVAILABLE_0_6 PCAP_AVAILABLE_0_6
PCAP_API int bpf_validate(const struct bpf_insn *f, int len); PCAP_API int bpf_validate(const struct bpf_insn *f, int len);
PCAP_AVAILABLE_0_4 PCAP_AVAILABLE_0_4
PCAP_API char *bpf_image(const struct bpf_insn *, int); PCAP_API char *bpf_image(const struct bpf_insn *, int);
PCAP_AVAILABLE_0_6 PCAP_AVAILABLE_0_6
 End of changes. 8 change blocks. 
10 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)