netgraph7: Welcome ng_mppc.
authorNuno Antunes <nuno.antunes@gmail.com>
Sat, 18 Sep 2010 01:37:29 +0000 (02:37 +0100)
committerNuno Antunes <nuno.antunes@gmail.com>
Tue, 10 Jan 2012 14:10:32 +0000 (14:10 +0000)
etc/mtree/BSD.include.dist
include/Makefile
lib/libnetgraph7/debug.c
sys/conf/files
sys/netgraph7/Makefile
sys/netgraph7/mppc/Makefile [new file with mode: 0644]
sys/netgraph7/mppc/ng_mppc.c [moved from sys/netgraph7/ng_mppc.c with 99% similarity]
sys/netgraph7/mppc/ng_mppc.h [moved from sys/netgraph7/ng_mppc.h with 100% similarity]

index caf9810..ad933e5 100644 (file)
         ..
         lmi
         ..
+        mppc
+        ..
         ppp
         ..
         pptpgre
index 2d3d64c..a1962b4 100644 (file)
@@ -71,7 +71,7 @@ LSUBDIRS=     bus/cam bus/cam/scsi \
        netgraph7/bridge netgraph7/cisco netgraph7/deflate netgraph7/echo \
        netgraph7/etf netgraph7/ether netgraph7/frame_relay netgraph7/hole \
        netgraph7/iface netgraph7/ksocket netgraph7/l2tp netgraph7/lmi \
-       netgraph7/ppp \
+       netgraph7/mppc netgraph7/ppp \
        netgraph7/pptpgre netgraph7/socket netgraph7/tee netgraph7/vjc \
        bus/cam bus/usb bus/pccard bus/pci bus/isa bus/ppbus bus/smbus \
        netproto/atm netproto/ipsec netproto/ipx \
index baa035c..6dbb930 100644 (file)
@@ -84,8 +84,8 @@
 #include <netgraph7/ksocket/ng_ksocket.h>
 #include <netgraph7/l2tp/ng_l2tp.h>
 #include <netgraph7/lmi/ng_lmi.h>
-/*
 #include <netgraph7/mppc/ng_mppc.h>
+/*
 #include <netgraph7/one2many/ng_one2many.h>
 */
 #include <netgraph7/ppp/ng_ppp.h>
@@ -163,10 +163,12 @@ static const struct ng_cookie cookies[] = {
        COOKIE(KSOCKET),
        COOKIE(L2TP),
        COOKIE(LMI),
-/*
        COOKIE(MPPC),
+/*
        COOKIE(ONE2MANY),
+*/
        COOKIE(PPP),
+/*
        COOKIE(PPPOE),
 */
        COOKIE(PPTPGRE),
index 7b60ed8..f2e158e 100644 (file)
@@ -1325,8 +1325,8 @@ netgraph7/ng_ipfw.c               optional netgraph7_ipfw
 netgraph7/ksocket/ng_ksocket.c optional netgraph7_ksocket
 netgraph7/l2tp/ng_l2tp.c       optional netgraph7_l2tp
 netgraph7/lmi/ng_lmi.c         optional netgraph7_lmi
-netgraph7/ng_mppc.c            optional netgraph7_mppc_compression
-netgraph7/ng_mppc.c            optional netgraph7_mppc_encryption
+netgraph7/mppc/ng_mppc.c       optional netgraph7_mppc_compression
+netgraph7/mppc/ng_mppc.c       optional netgraph7_mppc_encryption
 netgraph7/ng_nat.c             optional netgraph7_nat
 netgraph7/ng_one2many.c                optional netgraph7_one2many
 netgraph7/netgraph/ng_parse.c  optional netgraph7
index ebd68b8..bb9af38 100644 (file)
@@ -18,6 +18,7 @@ SUBDIR=       UI \
        ksocket \
        l2tp \
        lmi \
+       mppc \
        netgraph \
        ppp \
        pptpgre \
diff --git a/sys/netgraph7/mppc/Makefile b/sys/netgraph7/mppc/Makefile
new file mode 100644 (file)
index 0000000..7647cad
--- /dev/null
@@ -0,0 +1,32 @@
+# $Whistle: Makefile,v 1.1 1999/12/08 20:20:39 archie Exp $
+# $FreeBSD: src/sys/modules/netgraph/mppc/Makefile,v 1.3.2.4 2001/12/21 09:00:49 ru Exp $
+# $DragonFly: src/sys/netgraph/mppc/Makefile,v 1.3 2006/09/16 18:39:13 swildner Exp $
+
+KMOD=          ng_mppc
+SRCS=          ng_mppc.c opt_netgraph.h
+
+NETGRAPH_MPPC_COMPRESSION?=    0
+NETGRAPH_MPPC_ENCRYPTION?=     1
+
+.if ${NETGRAPH_MPPC_COMPRESSION} > 0
+# XXX These files don't exist yet, but hopefully someday they will...
+.PATH:         ${.CURDIR}/../../net
+SRCS+=         mppcc.c mppcd.c
+.endif
+
+.if ${NETGRAPH_MPPC_ENCRYPTION} > 0
+.PATH:         ${.CURDIR}/../../crypto
+.PATH:         ${.CURDIR}/../../crypto/rc4
+SRCS+=         rc4.c sha1.c
+.endif
+
+opt_netgraph.h:
+       touch ${.TARGET}
+.if ${NETGRAPH_MPPC_COMPRESSION} > 0
+       echo "#define NETGRAPH_MPPC_COMPRESSION 1" >> ${.TARGET}
+.endif
+.if ${NETGRAPH_MPPC_ENCRYPTION} > 0
+       echo "#define NETGRAPH_MPPC_ENCRYPTION 1" >> ${.TARGET}
+.endif
+
+.include <bsd.kmod.mk>
similarity index 99%
rename from sys/netgraph7/ng_mppc.c
rename to sys/netgraph7/mppc/ng_mppc.c
index d4db899..c152e5a 100644 (file)
@@ -57,8 +57,8 @@
 #include <sys/errno.h>
 #include <sys/syslog.h>
 
-#include "ng_message.h"
-#include "netgraph.h"
+#include <netgraph7/ng_message.h>
+#include <netgraph7/netgraph.h>
 #include "ng_mppc.h"
 
 #include "opt_netgraph.h"