2 * spppasyn_mod.c - modload support for PPP AHDLC STREAMS module
4 * Copyright (c) 2011 Bayard G. Bell. All rights reserved.
5 * Use is subject to license terms.
7 * CONTRIBUTOR MAKES NO REPRESENTATION OR WARRANTIES ABOUT THE SUITABILITY
8 * OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
9 * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
10 * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. CONTRIBUTOR SHALL NOT BE LIABLE
11 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
12 * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES
14 * Permission to use, copy, modify, and distribute this software and its
15 * documentation is hereby granted, provided that the above copyright
16 * notice appears in all copies.
18 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
19 * Use is subject to license terms.
21 * Permission to use, copy, modify, and distribute this software and its
22 * documentation is hereby granted, provided that the above copyright
23 * notice appears in all copies.
25 * SUN MAKES NO REPRESENTATION OR WARRANTIES ABOUT THE SUITABILITY OF
26 * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
27 * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
28 * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
29 * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
30 * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES
32 * Copyright (c) 1994 The Australian National University.
33 * All rights reserved.
35 * Permission to use, copy, modify, and distribute this software and its
36 * documentation is hereby granted, provided that the above copyright
37 * notice appears in all copies. This software is provided without any
38 * warranty, express or implied. The Australian National University
39 * makes no representations about the suitability of this software for
42 * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
43 * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
44 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
45 * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
48 * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
49 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
50 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
51 * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
52 * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
55 * $Id: ppp_mod.c,v 1.3 1999/02/26 10:53:28 paulus Exp $
58 #include <sys/types.h>
62 #include <sys/modctl.h>
63 #include <net/pppio.h>
66 * Globals for PPP AHDLC loadable module wrapper
68 extern struct streamtab spppasyn_tab
;
69 extern const char spppasyn_module_description
[];
72 * Module linkage information for the kernel.
74 static struct fmodsw mod_fsw
= {
75 AHDLC_MOD_NAME
, /* f_name */
76 &spppasyn_tab
, /* f_str */
77 D_MP
| D_MTPERQ
/* f_flag */
80 static struct modlstrmod modlstrmod
= {
81 &mod_strmodops
, /* strmod_modops */
82 (char *)spppasyn_module_description
, /* strmod_linkinfo */
83 &mod_fsw
/* strmod_fmodsw */
86 static struct modlinkage modlinkage
= {
87 MODREV_1
, /* ml_rev, has to be MODREV_1 */
88 &modlstrmod
, /* ml_linkage, NULL-terminated list */
89 NULL
/* of linkage structures */
95 return (mod_install(&modlinkage
));
101 return (mod_remove(&modlinkage
));
105 _info(struct modinfo
*modinfop
)
107 return (mod_info(&modlinkage
, modinfop
));