pkgsrc/net/ppp-mppe/patches/patch-db

68 lines
1.5 KiB
Text

$NetBSD: patch-db,v 1.1.1.1 1999/10/08 04:34:43 dbj Exp $
--- pppd/options.c.orig2 Sat Sep 18 02:11:16 1999
+++ pppd/options.c Sat Sep 18 02:22:19 1999
@@ -36,7 +36,15 @@
#include <arpa/inet.h>
#ifdef PPP_FILTER
#include <pcap.h>
+#if 0
#include <pcap-int.h> /* XXX: To get struct pcap */
+#else
+struct pcap {
+ int fd;
+ int snapshot;
+ int linktype;
+};
+#endif
#endif
#include "pppd.h"
@@ -1203,7 +1212,11 @@
setpassfilter_in(argv)
char **argv;
{
+#ifdef DLT_PPP_SERIAL
pc.linktype = DLT_PPP_SERIAL;
+#else
+ pc.linktype = DLT_PPP;
+#endif
pc.snapshot = PPP_HDRLEN;
if (pcap_compile(&pc, &pass_filter_in, *argv, 1, netmask) == 0)
@@ -1219,7 +1232,11 @@
setpassfilter_out(argv)
char **argv;
{
+#ifdef DLT_PPP_SERIAL
pc.linktype = DLT_PPP_SERIAL;
+#else
+ pc.linktype = DLT_PPP;
+#endif
pc.snapshot = PPP_HDRLEN;
if (pcap_compile(&pc, &pass_filter_out, *argv, 1, netmask) == 0)
@@ -1235,7 +1252,11 @@
setactivefilter_in(argv)
char **argv;
{
+#ifdef DLT_PPP_SERIAL
pc.linktype = DLT_PPP_SERIAL;
+#else
+ pc.linktype = DLT_PPP;
+#endif
pc.snapshot = PPP_HDRLEN;
if (pcap_compile(&pc, &active_filter_in, *argv, 1, netmask) == 0)
@@ -1252,7 +1273,11 @@
setactivefilter_out(argv)
char **argv;
{
+#ifdef DLT_PPP_SERIAL
pc.linktype = DLT_PPP_SERIAL;
+#else
+ pc.linktype = DLT_PPP;
+#endif
pc.snapshot = PPP_HDRLEN;
if (pcap_compile(&pc, &active_filter_out, *argv, 1, netmask) == 0)