NetBSD -> __NetBSD__ in an #ifdef, and nuke sc_bpf; there's one in

the ifnet already.
This commit is contained in:
thorpej 2000-07-12 23:02:38 +00:00
parent 1a82fc879b
commit 5cae63e123
2 changed files with 10 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sl.c,v 1.57 2000/03/30 09:45:36 augustss Exp $ */
/* $NetBSD: if_sl.c,v 1.58 2000/07/12 23:02:38 thorpej Exp $ */
/*
* Copyright (c) 1987, 1989, 1992, 1993
@ -215,7 +215,7 @@ slattach()
sc->sc_fastq.ifq_maxlen = 32;
if_attach(&sc->sc_if);
#if NBPFILTER > 0
bpfattach(&sc->sc_bpf, &sc->sc_if, DLT_SLIP, SLIP_HDRLEN);
bpfattach(&sc->sc_if.if_bpf, &sc->sc_if, DLT_SLIP, SLIP_HDRLEN);
#endif
}
}
@ -530,7 +530,7 @@ slstart(tp)
* munged when this happens.
*/
#if NBPFILTER > 0
if (sc->sc_bpf && bpfbuf != NULL) {
if (sc->sc_if.if_bpf && bpfbuf != NULL) {
/*
* We need to save the TCP/IP header before it's
* compressed. To avoid complicated code, we just
@ -558,7 +558,7 @@ slstart(tp)
&sc->sc_comp, 1);
}
#if NBPFILTER > 0
if (sc->sc_bpf && bpfbuf != NULL) {
if (sc->sc_if.if_bpf && bpfbuf != NULL) {
/*
* Put the SLIP pseudo-"link header" in place. The
* compressed header is now at the beginning of the
@ -566,7 +566,7 @@ slstart(tp)
*/
bpfbuf[SLX_DIR] = SLIPDIR_OUT;
bcopy(mtod(m, caddr_t), &bpfbuf[SLX_CHDR], CHDR_LEN);
bpf_tap(sc->sc_bpf, bpfbuf, len + SLIP_HDRLEN);
bpf_tap(sc->sc_if.if_bpf, bpfbuf, len + SLIP_HDRLEN);
}
#endif
sc->sc_if.if_lastchange = time;
@ -797,7 +797,7 @@ slinput(c, tp)
goto newpack;
#if NBPFILTER > 0
if (sc->sc_bpf) {
if (sc->sc_if.if_bpf) {
/*
* Save the compressed header, so we
* can tack it on later. Note that we
@ -838,7 +838,7 @@ slinput(c, tp)
goto error;
}
#if NBPFILTER > 0
if (sc->sc_bpf) {
if (sc->sc_if.if_bpf) {
/*
* Put the SLIP pseudo-"link header" in place.
* We couldn't do this any earlier since
@ -849,7 +849,7 @@ slinput(c, tp)
hp[SLX_DIR] = SLIPDIR_IN;
bcopy(chdr, &hp[SLX_CHDR], CHDR_LEN);
bpf_tap(sc->sc_bpf, hp, len + SLIP_HDRLEN);
bpf_tap(sc->sc_if.if_bpf, hp, len + SLIP_HDRLEN);
}
#endif
m = sl_btom(sc, len);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_slvar.h,v 1.19 1998/03/01 02:25:05 fvdl Exp $ */
/* $NetBSD: if_slvar.h,v 1.20 2000/07/12 23:02:38 thorpej Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -60,14 +60,13 @@ struct sl_softc {
long sc_starttime; /* time of first abort in window */
long sc_oqlen; /* previous output queue size */
long sc_otimeout; /* number of times output's stalled */
#ifdef NetBSD
#ifdef __NetBSD__
int sc_oldbufsize; /* previous output buffer size */
int sc_oldbufquot; /* previous output buffer quoting */
#endif
#ifdef INET /* XXX */
struct slcompress sc_comp; /* tcp compression data */
#endif
caddr_t sc_bpf; /* BPF data */
};
/* internal flags */