]> git.ozlabs.org Git - ppp.git/blob - svr4/ppp_comp_mod.c
Get the repository a bit closer to what will be released
[ppp.git] / svr4 / ppp_comp_mod.c
1 /*
2  * ppp_comp_mod.c - modload support for PPP compression STREAMS module.
3  *
4  * Copyright (c) 1994 Paul Mackerras. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in
15  *    the documentation and/or other materials provided with the
16  *    distribution.
17  *
18  * 3. The name(s) of the authors of this software must not be used to
19  *    endorse or promote products derived from this software without
20  *    prior written permission.
21  *
22  * 4. Redistributions of any form whatsoever must retain the following
23  *    acknowledgment:
24  *    "This product includes software developed by Paul Mackerras
25  *     <paulus@samba.org>".
26  *
27  * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
28  * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
29  * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
30  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
31  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
32  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
33  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
34  *
35  * $Id: ppp_comp_mod.c,v 1.3 2002/12/06 09:49:16 paulus Exp $
36  */
37
38 /*
39  * This file is used under Solaris 2.
40  */
41 #include <sys/types.h>
42 #include <sys/param.h>
43 #include <sys/conf.h>
44 #include <sys/modctl.h>
45 #include <sys/sunddi.h>
46
47 extern struct streamtab ppp_compinfo;
48
49 static struct fmodsw fsw = {
50     "ppp_comp",
51     &ppp_compinfo,
52     D_NEW | D_MP | D_MTQPAIR
53 };
54
55 extern struct mod_ops mod_strmodops;
56
57 static struct modlstrmod modlstrmod = {
58     &mod_strmodops,
59     "PPP compression module",
60     &fsw
61 };
62
63 static struct modlinkage modlinkage = {
64     MODREV_1,
65     (void *) &modlstrmod,
66     NULL
67 };
68
69 /*
70  * Entry points for modloading.
71  */
72 int
73 _init(void)
74 {
75     return mod_install(&modlinkage);
76 }
77
78 int
79 _fini(void)
80 {
81     return mod_remove(&modlinkage);
82 }
83
84 int
85 _info(mip)
86     struct modinfo *mip;
87 {
88     return mod_info(&modlinkage, mip);
89 }