--- Net2/net/bpfdesc.h 2018/04/24 18:04:02 1.1.1.1 +++ Net2/net/bpfdesc.h 2018/04/24 18:21:54 1.1.1.3 @@ -4,7 +4,8 @@ * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne of Lawrence Berkeley Laboratory. + * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence + * Berkeley Laboratory. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,11 +35,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)bpfdesc.h 7.1 (Berkeley) 5/7/91 - * - * @(#) $Header: /var/lib/cvsd/net2/Net2/net/bpfdesc.h,v 1.1.1.1 2018/04/24 18:04:02 root Exp $ (LBL) + * from: @(#)bpfdesc.h 7.1 (Berkeley) 5/7/91 + * bpfdesc.h,v 1.5 1993/05/18 18:19:52 cgd Exp */ +#ifndef _NET_BPFDESC_H_ +#define _NET_BPFDESC_H_ + /* * Descriptor associated with each open bpf file. */ @@ -66,12 +69,18 @@ struct bpf_d { struct bpf_insn *bd_filter; /* filter code */ u_long bd_rcount; /* number of packets received */ u_long bd_dcount; /* number of packets dropped */ - struct proc * bd_selproc; /* process that last selected us */ u_char bd_promisc; /* true if listening promiscuously */ u_char bd_state; /* idle, waiting, or timed out */ - u_char bd_selcoll; /* true if selects collide */ u_char bd_immediate; /* true to return on packet arrival */ +#if (BSD <= 199103) && !defined(__386BSD__) + u_char bd_selcoll; /* true if selects collide */ + int bd_timedout; + struct proc * bd_selproc; /* process that last selected us */ +#else /* BSD > 199103 */ + u_char bd_pad; /* explicit alignment */ + struct selinfo bd_sel; /* bsd select info */ +#endif }; /* @@ -85,3 +94,5 @@ struct bpf_if { u_int bif_hdrlen; /* length of header (with padding) */ struct ifnet *bif_ifp; /* correspoding interface */ }; + +#endif /* !_NET_BPFDESC_H_ */