Deleted Added
full compact
bpf.c (83805) bpf.c (84781)
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 83805 2001-09-21 22:46:54Z jhb $
40 * $FreeBSD: head/sys/net/bpf.c 84781 2001-10-10 20:43:50Z jhb $
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>

--- 1158 unchanged lines hidden (view full) ---

1207 * headers are not yet supporrted).
1208 */
1209void
1210bpfattach(ifp, dlt, hdrlen)
1211 struct ifnet *ifp;
1212 u_int dlt, hdrlen;
1213{
1214 struct bpf_if *bp;
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>

--- 1158 unchanged lines hidden (view full) ---

1207 * headers are not yet supporrted).
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);
1215 bp = (struct bpf_if *)malloc(sizeof(*bp), M_BPF, M_NOWAIT | M_ZERO);
1216 if (bp == 0)
1217 panic("bpfattach");
1218
1219 bp->bif_dlist = 0;
1220 bp->bif_ifp = ifp;
1221 bp->bif_dlt = dlt;
1222 mtx_init(&bp->bif_mtx, "bpf interface lock", MTX_DEF);
1223

--- 159 unchanged lines hidden ---
1216 if (bp == 0)
1217 panic("bpfattach");
1218
1219 bp->bif_dlist = 0;
1220 bp->bif_ifp = ifp;
1221 bp->bif_dlt = dlt;
1222 mtx_init(&bp->bif_mtx, "bpf interface lock", MTX_DEF);
1223

--- 159 unchanged lines hidden ---