From 7432002de6b5ecd51d01bb7e91819ee6347ea6f3 Mon Sep 17 00:00:00 2001 From: rwatson Date: Sat, 18 Mar 2000 06:30:42 +0000 Subject: Introduce a new bd_seesent flag to the BPF descriptor, indicating whether or not the current BPF device should report locally generated packets or not. This allows sniffing applications to see only packets that are not generated locally, which can be useful for debugging bridging problems, or other situations where MAC addresses are not sufficient to identify locally sourced packets. Default to true for this flag, so as to provide existing behavior by default. Introduce two new ioctls, BIOCGSEESENT and BIOCSSEESENT, which may be used to manipulate this flag from userland, given appropriate privilege. Modify bpf.4 to document these two new ioctl arguments. Reviewed by: asmodai --- sys/net/bpf.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/net/bpf.h') diff --git a/sys/net/bpf.h b/sys/net/bpf.h index a684314..9494e83 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -113,6 +113,8 @@ struct bpf_version { #define BIOCSRSIG _IOW('B',115, u_int) #define BIOCGHDRCMPLT _IOR('B',116, u_int) #define BIOCSHDRCMPLT _IOW('B',117, u_int) +#define BIOCGSEESENT _IOR('B',118, u_int) +#define BIOCSSEESENT _IOW('B',119, u_int) /* * Structure prepended to each packet. -- cgit v1.1