From: Nuno Antunes Date: Sat, 18 Sep 2010 01:37:29 +0000 (+0100) Subject: netgraph7: Welcome ng_mppc. X-Git-Tag: v3.0.0~119 X-Git-Url: https://gitweb.dragonflybsd.org/~nant/dragonfly.git/commitdiff_plain/063536054b5ffd1aed4ef7b7eeff4251fc51ece3 netgraph7: Welcome ng_mppc. --- diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index caf9810dbb..ad933e5561 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -238,6 +238,8 @@ .. lmi .. + mppc + .. ppp .. pptpgre diff --git a/include/Makefile b/include/Makefile index 2d3d64ce22..a1962b4e24 100644 --- a/include/Makefile +++ b/include/Makefile @@ -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 \ diff --git a/lib/libnetgraph7/debug.c b/lib/libnetgraph7/debug.c index baa035cc61..6dbb9304cd 100644 --- a/lib/libnetgraph7/debug.c +++ b/lib/libnetgraph7/debug.c @@ -84,8 +84,8 @@ #include #include #include -/* #include +/* #include */ #include @@ -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), diff --git a/sys/conf/files b/sys/conf/files index 7b60ed866c..f2e158e674 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -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 diff --git a/sys/netgraph7/Makefile b/sys/netgraph7/Makefile index ebd68b8297..bb9af38d0a 100644 --- a/sys/netgraph7/Makefile +++ b/sys/netgraph7/Makefile @@ -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 index 0000000000..7647cadbc7 --- /dev/null +++ b/sys/netgraph7/mppc/Makefile @@ -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 diff --git a/sys/netgraph7/ng_mppc.c b/sys/netgraph7/mppc/ng_mppc.c similarity index 99% rename from sys/netgraph7/ng_mppc.c rename to sys/netgraph7/mppc/ng_mppc.c index d4db899af8..c152e5a72a 100644 --- a/sys/netgraph7/ng_mppc.c +++ b/sys/netgraph7/mppc/ng_mppc.c @@ -57,8 +57,8 @@ #include #include -#include "ng_message.h" -#include "netgraph.h" +#include +#include #include "ng_mppc.h" #include "opt_netgraph.h" diff --git a/sys/netgraph7/ng_mppc.h b/sys/netgraph7/mppc/ng_mppc.h similarity index 100% rename from sys/netgraph7/ng_mppc.h rename to sys/netgraph7/mppc/ng_mppc.h