summaryrefslogtreecommitdiff
path: root/solaris/ppp_comp_mod.c
diff options
context:
space:
mode:
authorAdi Masputra <adi.masputra@sun.com>2000-04-18 23:51:29 +0000
committerAdi Masputra <adi.masputra@sun.com>2000-04-18 23:51:29 +0000
commitf9eac6e29b5137c46063855b3bfc253159c90c29 (patch)
treececff57292d63f00567d7d029b154fe943b09f0d /solaris/ppp_comp_mod.c
parent56e6860d27306bcbe35b3a14f360d0f52b5940b5 (diff)
downloadppp-f9eac6e29b5137c46063855b3bfc253159c90c29.tar.gz
1) Created a subdirectory called 'solaris'. Currently it contains a replica
of the 'svr4' directory. However, over time, files in this directory will contain the same code as the kernel-portion of pppd in future releases of Solaris, hence they most probably will change in contents and/or sub-structure. 2) Changed the 'configure' script to not create symbolic link Makefiles when the OS is SunOS 4.x. Under 'SunOS' category, only SunOS 5.x (or Solaris 2.x) is currently enabled. 3) Changed the rest of the utilities + pppd daemon Makefile.sol2 to point to the solaris/Makedefs instead of the one in svr4 directory.
Diffstat (limited to 'solaris/ppp_comp_mod.c')
-rw-r--r--solaris/ppp_comp_mod.c81
1 files changed, 81 insertions, 0 deletions
diff --git a/solaris/ppp_comp_mod.c b/solaris/ppp_comp_mod.c
new file mode 100644
index 0000000..1471bc0
--- /dev/null
+++ b/solaris/ppp_comp_mod.c
@@ -0,0 +1,81 @@
+/*
+ * ppp_comp_mod.c - modload support for PPP compression STREAMS module.
+ *
+ * Copyright (c) 1994 The Australian National University.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation is hereby granted, provided that the above copyright
+ * notice appears in all copies. This software is provided without any
+ * warranty, express or implied. The Australian National University
+ * makes no representations about the suitability of this software for
+ * any purpose.
+ *
+ * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
+ * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+ * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ *
+ * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
+ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
+ * OR MODIFICATIONS.
+ *
+ * $Id: ppp_comp_mod.c,v 1.1 2000/04/18 23:51:29 masputra Exp $
+ */
+
+/*
+ * This file is used under Solaris 2.
+ */
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/conf.h>
+#include <sys/modctl.h>
+#include <sys/sunddi.h>
+
+extern struct streamtab ppp_compinfo;
+
+static struct fmodsw fsw = {
+ "ppp_comp",
+ &ppp_compinfo,
+ D_NEW | D_MP | D_MTQPAIR
+};
+
+extern struct mod_ops mod_strmodops;
+
+static struct modlstrmod modlstrmod = {
+ &mod_strmodops,
+ "PPP compression module",
+ &fsw
+};
+
+static struct modlinkage modlinkage = {
+ MODREV_1,
+ (void *) &modlstrmod,
+ NULL
+};
+
+/*
+ * Entry points for modloading.
+ */
+int
+_init(void)
+{
+ return mod_install(&modlinkage);
+}
+
+int
+_fini(void)
+{
+ return mod_remove(&modlinkage);
+}
+
+int
+_info(mip)
+ struct modinfo *mip;
+{
+ return mod_info(&modlinkage, mip);
+}