Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Modularize the sppp_subr stuff so it can be shared by pppoe ...
details: https://anonhg.NetBSD.org/src/rev/773b9e8cdd42
branches: trunk
changeset: 346915:773b9e8cdd42
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sat Aug 06 22:03:45 2016 +0000
description:
Modularize the sppp_subr stuff so it can be shared by pppoe and lmc
drivers as they get modularized.
diffstat:
distrib/sets/lists/modules/mi | 4 +++-
sys/modules/Makefile | 3 ++-
sys/modules/sppp_subr/Makefile | 14 ++++++++++++++
sys/net/if_spppsubr.c | 25 +++++++++++++++++++++++--
4 files changed, 42 insertions(+), 4 deletions(-)
diffs (103 lines):
diff -r 585455dad93a -r 773b9e8cdd42 distrib/sets/lists/modules/mi
--- a/distrib/sets/lists/modules/mi Sat Aug 06 21:57:04 2016 +0000
+++ b/distrib/sets/lists/modules/mi Sat Aug 06 22:03:45 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.90 2016/08/06 12:50:37 christos Exp $
+# $NetBSD: mi,v 1.91 2016/08/06 22:03:45 pgoyette Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -244,6 +244,8 @@
./@MODULEDIR@/solaris/solaris.kmod base-kernel-modules kmod,solaris
./@MODULEDIR@/spdmem base-kernel-modules kmod
./@MODULEDIR@/spdmem/spdmem.kmod base-kernel-modules kmod
+./@MODULEDIR@/sppp_subr base-kernel-modules kmod
+./@MODULEDIR@/sppp_subr/sppp_subr.kmod base-kernel-modules kmod
./@MODULEDIR@/suser base-kernel-modules kmod
./@MODULEDIR@/suser/suser.kmod base-kernel-modules kmod
./@MODULEDIR@/swcrypto base-kernel-modules kmod
diff -r 585455dad93a -r 773b9e8cdd42 sys/modules/Makefile
--- a/sys/modules/Makefile Sat Aug 06 21:57:04 2016 +0000
+++ b/sys/modules/Makefile Sat Aug 06 22:03:45 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.172 2016/08/06 12:44:03 christos Exp $
+# $NetBSD: Makefile,v 1.173 2016/08/06 22:03:45 pgoyette Exp $
.include <bsd.own.mk>
@@ -99,6 +99,7 @@
SUBDIR+= slcompress
SUBDIR+= smbfs
SUBDIR+= spdmem
+SUBDIR+= sppp_subr
SUBDIR+= sysmon
SUBDIR+= sysmon_envsys
SUBDIR+= sysmon_power
diff -r 585455dad93a -r 773b9e8cdd42 sys/modules/sppp_subr/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/modules/sppp_subr/Makefile Sat Aug 06 22:03:45 2016 +0000
@@ -0,0 +1,14 @@
+# $NetBSD: Makefile,v 1.1 2016/08/06 22:03:45 pgoyette Exp $
+
+.include "../Makefile.inc"
+
+.PATH: ${S}/net
+
+KMOD= sppp_subr
+SRCS= if_spppsubr.c
+
+CPPFLAGS+= -DINET
+CPPFLAGS+= -DINET6
+#CPPFLAGS+= -DIPV6CP_MYIFID_DYN # Will not build if this is enabled!
+
+.include <bsd.kmodule.mk>
diff -r 585455dad93a -r 773b9e8cdd42 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c Sat Aug 06 21:57:04 2016 +0000
+++ b/sys/net/if_spppsubr.c Sat Aug 06 22:03:45 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_spppsubr.c,v 1.146 2016/07/07 09:32:02 ozaki-r Exp $ */
+/* $NetBSD: if_spppsubr.c,v 1.147 2016/08/06 22:03:45 pgoyette Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.146 2016/07/07 09:32:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.147 2016/08/06 22:03:45 pgoyette Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -64,6 +64,7 @@
#include <sys/inttypes.h>
#include <sys/kauth.h>
#include <sys/cprng.h>
+#include <sys/module.h>
#include <net/if.h>
#include <net/netisr.h>
@@ -5592,3 +5593,23 @@
* hilit-auto-highlight-maxout: 120000
* End:
*/
+
+/*
+ * Module glue
+ */
+MODULE(MODULE_CLASS_MISC, sppp_subr, NULL);
+
+static int
+sppp_subr_modcmd(modcmd_t cmd, void *arg)
+{
+ switch (cmd) {
+ case MODULE_CMD_INIT:
+ case MODULE_CMD_FINI:
+ return 0;
+ case MODULE_CMD_STAT:
+ case MODULE_CMD_AUTOUNLOAD:
+ default:
+ return ENOTTY;
+ }
+}
+
Home |
Main Index |
Thread Index |
Old Index