summaryrefslogtreecommitdiffstats
path: root/sys/net/ppp_tty.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-11-18 14:08:51 +0000
committerbde <bde@FreeBSD.org>1997-11-18 14:08:51 +0000
commit2d38bf3ef0f676e3a1fa6c86ce0b13cc889157ea (patch)
treed657cae3f3f1157173613c8bb1e6b328a898c73b /sys/net/ppp_tty.c
parent1c02ba32615553433d8209446964a7484fa98e78 (diff)
downloadFreeBSD-src-2d38bf3ef0f676e3a1fa6c86ce0b13cc889157ea.zip
FreeBSD-src-2d38bf3ef0f676e3a1fa6c86ce0b13cc889157ea.tar.gz
Don't test for conflicting combinations of PPP_FILTER/BPFILTER here.
Testing in if_ppp.c is good enough. Added comments about bogus #includes and #defines. Removed unused #includes. Don't depend on gcc's misfeature of rewriting short args in old-style function definitions to match wrong prototypes. I just changed the function definition to match the prototype, since this is easy to verify automatically (it causes no changes in the object code), but it breaks K&R1 support and doesn't fix the pessimal type.
Diffstat (limited to 'sys/net/ppp_tty.c')
-rw-r--r--sys/net/ppp_tty.c38
1 files changed, 9 insertions, 29 deletions
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c
index f8093c0..013f27e 100644
--- a/sys/net/ppp_tty.c
+++ b/sys/net/ppp_tty.c
@@ -70,23 +70,14 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: ppp_tty.c,v 1.26 1997/10/18 00:56:23 peter Exp $ */
+/* $Id: ppp_tty.c,v 1.27 1997/10/18 01:20:28 peter Exp $ */
#include "ppp.h"
#if NPPP > 0
-#include "opt_ppp.h"
-
-#define VJC
-#define PPP_COMPRESS
-
-#ifdef PPP_FILTER
-#include "bpfilter.h"
-#if NBPFILTER == 0
-#error "PPP_FILTER requires bpf"
-#endif
-#endif
+#include "opt_ppp.h" /* XXX for ppp_defs.h */
+#define VJC /* XXX for ppp_defs.h */
#include <sys/param.h>
#include <sys/systm.h>
@@ -96,11 +87,14 @@
#include <sys/socket.h>
#include <sys/fcntl.h>
#include <sys/tty.h>
-#include <sys/kernel.h>
#include <sys/conf.h>
-#undef KERNEL /* so that vnode.h does not try to include vnode_if.h */
+/*
+ * XXX stop <sys/vnode.h> from including <vnode_if.h>. <vnode_if.h> doesn't
+ * exist if we are an LKM.
+ */
+#undef KERNEL
# include <sys/vnode.h>
#define KERNEL
@@ -108,20 +102,9 @@
#include <i386/isa/intr_machdep.h>
#endif
-#include <net/if.h>
-#include <net/if_types.h>
-
-#ifdef VJC
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <net/slcompress.h>
-#endif
-
#ifdef PPP_FILTER
#include <net/bpf.h>
#endif
-#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#include <net/if_pppvar.h>
@@ -580,10 +563,7 @@ static u_short fcstab[256] = {
* Calculate a new FCS given the current FCS and the new data.
*/
static u_short
-pppfcs(fcs, cp, len)
- register u_short fcs;
- register u_char *cp;
- register int len;
+pppfcs(u_short fcs, u_char *cp, int len)
{
while (len--)
fcs = PPP_FCS(fcs, *cp++);
OpenPOWER on IntegriCloud