bpf.c (75204) | bpf.c (82239) |
---|---|
1/* 2 * Copyright (c) 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from the Stanford/CMU enet packet filter, 6 * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8 * Berkeley Laboratory. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)bpf.c 8.2 (Berkeley) 3/28/94 39 * | 1/* 2 * Copyright (c) 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from the Stanford/CMU enet packet filter, 6 * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8 * Berkeley Laboratory. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)bpf.c 8.2 (Berkeley) 3/28/94 39 * |
40 * $FreeBSD: head/sys/net/bpf.c 75204 2001-04-04 23:27:35Z gad $ | 40 * $FreeBSD: head/sys/net/bpf.c 82239 2001-08-23 22:38:08Z dd $ |
41 */ 42 43#include "opt_bpf.h" 44#include "opt_netgraph.h" 45 46#include <sys/param.h> 47#include <sys/systm.h> 48#include <sys/conf.h> --- 1147 unchanged lines hidden (view full) --- 1196 free(d->bd_fbuf, M_BPF); 1197 } 1198 if (d->bd_filter) 1199 free((caddr_t)d->bd_filter, M_BPF); 1200 mtx_destroy(&d->bd_mtx); 1201} 1202 1203/* | 41 */ 42 43#include "opt_bpf.h" 44#include "opt_netgraph.h" 45 46#include <sys/param.h> 47#include <sys/systm.h> 48#include <sys/conf.h> --- 1147 unchanged lines hidden (view full) --- 1196 free(d->bd_fbuf, M_BPF); 1197 } 1198 if (d->bd_filter) 1199 free((caddr_t)d->bd_filter, M_BPF); 1200 mtx_destroy(&d->bd_mtx); 1201} 1202 1203/* |
1204 * Attach an interface to bpf. driverp is a pointer to a (struct bpf_if *) 1205 * in the driver's softc; dlt is the link layer type; hdrlen is the fixed 1206 * size of the link header (variable length headers not yet supported). | 1204 * Attach an interface to bpf. ifp is a pointer to the structure 1205 * defining the interface to be attached, dlt is the link layer type, 1206 * and hdrlen is the fixed size of the link header (variable length 1207 * headers are not yet supporrted). |
1207 */ 1208void 1209bpfattach(ifp, dlt, hdrlen) 1210 struct ifnet *ifp; 1211 u_int dlt, hdrlen; 1212{ 1213 struct bpf_if *bp; 1214 bp = (struct bpf_if *)malloc(sizeof(*bp), M_BPF, M_NOWAIT); --- 167 unchanged lines hidden --- | 1208 */ 1209void 1210bpfattach(ifp, dlt, hdrlen) 1211 struct ifnet *ifp; 1212 u_int dlt, hdrlen; 1213{ 1214 struct bpf_if *bp; 1215 bp = (struct bpf_if *)malloc(sizeof(*bp), M_BPF, M_NOWAIT); --- 167 unchanged lines hidden --- |