7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #pragma ident "%Z%%M% %I% %E% SMI"
28
29 /*
30 * This module implements the services provided by the rlogin daemon
31 * after the connection is set up. Mainly this means responding to
32 * interrupts and window size changes. It begins operation in "disabled"
33 * state, and sends a T_DATA_REQ to the daemon to indicate that it is
34 * in place and ready to be enabled. The daemon can then know when all
35 * data which sneaked passed rlmod (before it was pushed) has been received.
36 * The daemon may process this data, or send data back to be inserted in
37 * the read queue at the head with the RL_IOC_ENABLE ioctl.
38 */
39
40 #include <sys/types.h>
41 #include <sys/param.h>
42 #include <sys/stream.h>
43 #include <sys/stropts.h>
44 #include <sys/strsun.h>
45 #include <sys/kmem.h>
46 #include <sys/errno.h>
47 #include <sys/ddi.h>
48 #include <sys/sunddi.h>
61
62 extern struct streamtab rloginmodinfo;
63
64 static struct fmodsw fsw = {
65 "rlmod",
66 &rloginmodinfo,
67 D_MTQPAIR | D_MP
68 };
69
70 /*
71 * Module linkage information for the kernel.
72 */
73
74 static struct modlstrmod modlstrmod = {
75 &mod_strmodops,
76 "rloginmod module",
77 &fsw
78 };
79
80 static struct modlinkage modlinkage = {
81 MODREV_1, &modlstrmod, NULL
82 };
83
84
85 int
86 _init(void)
87 {
88 return (mod_install(&modlinkage));
89 }
90
91 int
92 _fini(void)
93 {
94 return (mod_remove(&modlinkage));
95 }
96
97 int
98 _info(struct modinfo *modinfop)
99 {
100 return (mod_info(&modlinkage, modinfop));
101 }
|
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /*
28 * This module implements the services provided by the rlogin daemon
29 * after the connection is set up. Mainly this means responding to
30 * interrupts and window size changes. It begins operation in "disabled"
31 * state, and sends a T_DATA_REQ to the daemon to indicate that it is
32 * in place and ready to be enabled. The daemon can then know when all
33 * data which sneaked passed rlmod (before it was pushed) has been received.
34 * The daemon may process this data, or send data back to be inserted in
35 * the read queue at the head with the RL_IOC_ENABLE ioctl.
36 */
37
38 #include <sys/types.h>
39 #include <sys/param.h>
40 #include <sys/stream.h>
41 #include <sys/stropts.h>
42 #include <sys/strsun.h>
43 #include <sys/kmem.h>
44 #include <sys/errno.h>
45 #include <sys/ddi.h>
46 #include <sys/sunddi.h>
59
60 extern struct streamtab rloginmodinfo;
61
62 static struct fmodsw fsw = {
63 "rlmod",
64 &rloginmodinfo,
65 D_MTQPAIR | D_MP
66 };
67
68 /*
69 * Module linkage information for the kernel.
70 */
71
72 static struct modlstrmod modlstrmod = {
73 &mod_strmodops,
74 "rloginmod module",
75 &fsw
76 };
77
78 static struct modlinkage modlinkage = {
79 MODREV_1, { &modlstrmod, NULL }
80 };
81
82
83 int
84 _init(void)
85 {
86 return (mod_install(&modlinkage));
87 }
88
89 int
90 _fini(void)
91 {
92 return (mod_remove(&modlinkage));
93 }
94
95 int
96 _info(struct modinfo *modinfop)
97 {
98 return (mod_info(&modlinkage, modinfop));
99 }
|