Get the repository a bit closer to what will be released
[mpls-ppp.git] / svr4 / ppp_comp_mod.c
blob0889572899adaf946b9c3641447913f89869c675
1 /*
2 * ppp_comp_mod.c - modload support for PPP compression STREAMS module.
4 * Copyright (c) 1994 Paul Mackerras. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
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.
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.
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>".
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.
35 * $Id: ppp_comp_mod.c,v 1.3 2002/12/06 09:49:16 paulus Exp $
39 * This file is used under Solaris 2.
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>
47 extern struct streamtab ppp_compinfo;
49 static struct fmodsw fsw = {
50 "ppp_comp",
51 &ppp_compinfo,
52 D_NEW | D_MP | D_MTQPAIR
55 extern struct mod_ops mod_strmodops;
57 static struct modlstrmod modlstrmod = {
58 &mod_strmodops,
59 "PPP compression module",
60 &fsw
63 static struct modlinkage modlinkage = {
64 MODREV_1,
65 (void *) &modlstrmod,
66 NULL
70 * Entry points for modloading.
72 int
73 _init(void)
75 return mod_install(&modlinkage);
78 int
79 _fini(void)
81 return mod_remove(&modlinkage);
84 int
85 _info(mip)
86 struct modinfo *mip;
88 return mod_info(&modlinkage, mip);