--- lib/interfaces.c.orig	Fri Jun  9 11:24:47 1995
+++ lib/interfaces.c	Sun Apr 26 08:02:40 1998
@@ -21,8 +21,6 @@
 #include <sys/socket.h>
 #include <net/if.h>
 #include <net/slip.h>
-#include <net/if_slvar.h>
-#include <net/ppp_proto.h>
 #include <netinet/in.h>
 #include <netinet/if_ether.h>
 #include <netinet/in_systm.h>
@@ -33,6 +31,17 @@
 #include <netinet/tcp.h>
 #include <netinet/tcpip.h>
 #include <net/bpf.h>
+#if __FreeBSD__ >= 3
+#include <net/if_var.h>
+#include <sys/mbuf.h>
+#include <net/slcompress.h>
+#endif
+#include <net/if_slvar.h>
+#ifdef __FreeBSD__
+#include <net/if_ppp.h>
+#else
+#include <net/ppp_proto.h>
+#endif
 
 #include "interface.h"
 
@@ -129,13 +138,16 @@
 	 * Thanks to Gregory J. Miller <gmiller@gateway.mitre.org> for
 	 * help of true PPP header parsing.
 	 */
+#ifdef PPP_HDRLEN		/* ppp-2.2 or later */
+	if (caplen < PPP_HDRLEN)
+#else
 	if (caplen < sizeof(struct ppp_header))
+#endif
 		return;
 	packetp = (u_char *)p;
 	snapend = (u_char *)p + caplen;
 	hdrlength = 0;
-	if (p[0] == PPP_ADDRESS && p[1] == PPP_CONTROL)
-		p += 2, hdrlength = 2;
+	p += 2, hdrlength = 2;
 	/* Retrive the protocol type */
 	if (*p & 01) {	/* Compressed protocol field */
 		type = *p++;
