Back out the `PPP_FILTER => NBPFILTER' changes
This commit is contained in:
parent
7aef05003a
commit
f2189317fa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30523
@ -69,7 +69,7 @@
|
||||
* Paul Mackerras (paulus@cs.anu.edu.au).
|
||||
*/
|
||||
|
||||
/* $Id: if_ppp.c,v 1.45 1997/10/10 11:57:40 peter Exp $ */
|
||||
/* $Id: if_ppp.c,v 1.46 1997/10/17 00:12:38 brian Exp $ */
|
||||
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
|
||||
/* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
|
||||
#define VJC
|
||||
#define PPP_COMPRESS
|
||||
#define PPP_FILTER
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -96,7 +97,7 @@
|
||||
#include <net/if_types.h>
|
||||
#include <net/netisr.h>
|
||||
#include <net/route.h>
|
||||
#if NBPFILTER > 0
|
||||
#ifdef PPP_FILTER
|
||||
#include <net/bpf.h>
|
||||
#endif
|
||||
|
||||
@ -313,7 +314,7 @@ pppdealloc(sc)
|
||||
sc->sc_xc_state = NULL;
|
||||
sc->sc_rc_state = NULL;
|
||||
#endif /* PPP_COMPRESS */
|
||||
#if NBPFILTER > 0
|
||||
#ifdef PPP_FILTER
|
||||
if (sc->sc_pass_filt.bf_insns != 0) {
|
||||
FREE(sc->sc_pass_filt.bf_insns, M_DEVBUF);
|
||||
sc->sc_pass_filt.bf_insns = 0;
|
||||
@ -324,7 +325,7 @@ pppdealloc(sc)
|
||||
sc->sc_active_filt.bf_insns = 0;
|
||||
sc->sc_active_filt.bf_len = 0;
|
||||
}
|
||||
#endif /* NBPFILTER */
|
||||
#endif /* PPP_FILTER */
|
||||
#ifdef VJC
|
||||
if (sc->sc_comp != 0) {
|
||||
FREE(sc->sc_comp, M_DEVBUF);
|
||||
@ -349,11 +350,11 @@ pppioctl(sc, cmd, data, flag, p)
|
||||
struct compressor **cp;
|
||||
struct npioctl *npi;
|
||||
time_t t;
|
||||
#if NBPFILTER > 0
|
||||
#ifdef PPP_FILTER
|
||||
struct bpf_program *bp, *nbp;
|
||||
struct bpf_insn *newcode, *oldcode;
|
||||
int newcodelen;
|
||||
#endif /* NBPFILTER */
|
||||
#endif /* PPP_FILTER */
|
||||
#ifdef PPP_COMPRESS
|
||||
u_char ccp_option[CCP_MAX_OPTION_LENGTH];
|
||||
#endif
|
||||
@ -509,7 +510,7 @@ pppioctl(sc, cmd, data, flag, p)
|
||||
splx(s);
|
||||
break;
|
||||
|
||||
#if NBPFILTER > 0
|
||||
#ifdef PPP_FILTER
|
||||
case PPPIOCSPASS:
|
||||
case PPPIOCSACTIVE:
|
||||
nbp = (struct bpf_program *) data;
|
||||
@ -794,7 +795,7 @@ pppoutput(ifp, m0, dst, rtp)
|
||||
}
|
||||
|
||||
if ((protocol & 0x8000) == 0) {
|
||||
#if NBPFILTER > 0
|
||||
#ifdef PPP_FILTER
|
||||
/*
|
||||
* Apply the pass and active filters to the packet,
|
||||
* but only if it is a data packet.
|
||||
@ -820,7 +821,7 @@ pppoutput(ifp, m0, dst, rtp)
|
||||
* Update the time we sent the most recent data packet.
|
||||
*/
|
||||
sc->sc_last_sent = time.tv_sec;
|
||||
#endif /* NBPFILTER */
|
||||
#endif /* PPP_FILTER */
|
||||
}
|
||||
|
||||
#if NBPFILTER > 0
|
||||
@ -1431,7 +1432,7 @@ ppp_inproc(sc, m)
|
||||
m->m_pkthdr.rcvif = ifp;
|
||||
|
||||
if ((proto & 0x8000) == 0) {
|
||||
#if NBPFILTER > 0
|
||||
#ifdef PPP_FILTER
|
||||
/*
|
||||
* See whether we want to pass this packet, and
|
||||
* if it counts as link activity.
|
||||
@ -1455,7 +1456,7 @@ ppp_inproc(sc, m)
|
||||
* Record the time that we received this packet.
|
||||
*/
|
||||
sc->sc_last_recv = time.tv_sec;
|
||||
#endif /* NBPFILTER */
|
||||
#endif /* PPP_FILTER */
|
||||
}
|
||||
|
||||
#if NBPFILTER > 0
|
||||
|
@ -39,7 +39,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: if_pppvar.h,v 1.10 1997/10/17 21:30:30 roberto Exp $
|
||||
* $Id: if_pppvar.h,v 1.11 1997/10/17 21:50:32 roberto Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -76,10 +76,10 @@ struct ppp_softc {
|
||||
void *sc_rc_state; /* receive decompressor state */
|
||||
time_t sc_last_sent; /* time (secs) last NP pkt sent */
|
||||
time_t sc_last_recv; /* time (secs) last NP pkt rcvd */
|
||||
#if NBPFILTER > 0
|
||||
#ifdef PPP_FILTER
|
||||
struct bpf_program sc_pass_filt; /* filter for packets to pass */
|
||||
struct bpf_program sc_active_filt; /* filter for "non-idle" packets */
|
||||
#endif /* NBPFILTER */
|
||||
#endif /* PPP_FILTER */
|
||||
#ifdef VJC
|
||||
struct slcompress *sc_comp; /* vjc control buffer */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user