4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
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.
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]
23 * Copyright (c) 2001 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _TTYMUX_RCM_IMPL_H
28 #define _TTYMUX_RCM_IMPL_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
37 #define _(x) gettext(x)
42 #define UNKNOWN 1 /* flags */
43 #define PRESENT 2 /* flags */
44 #define REGISTERED 4 /* flags */
45 #define CONNECTED 8 /* flags */
46 #define DISCONNECTED 0x10 /* flags */
49 #define TTYMUX_OFFLINE 1
50 #define TTYMUX_ONLINE 2
51 #define TTYMUX_REMOVE 3
52 #define TTYMUX_SUSPEND 4
53 #define TTYMUX_RESUME 5
56 * Representation of a resource.
57 * All resources are placed in a cache structured as a doubly linked list
58 * (ie the next and prev fields).
59 * The dependencies list identifies which resources this resource is
68 struct link
*dependencies
;
72 * Representation of a pair of resources participating in a
73 * dependency relationship
74 * The dependency is cast in terms of a resource that is using
75 * another resource in order to provide a service.
76 * This structure is used to represent a ttymux minor node that
77 * has another serial device multiplexed under it. In this
78 * case user resource would correspond to the ttymux minor node and the
79 * the used resource would correspond to the multiplexed serial device.
80 * The linkid field refers to the STREAM's link identifier.
83 rsrc_t
*user
; /* the using resource */
84 rsrc_t
*used
; /* the used resource */
85 int linkid
; /* STREAM's link identifier */
88 int (*connect
)(struct link
*);
89 int (*disconnect
)(struct link
*);
93 #define MUXCTLLINK "/devices/multiplexer@0,0:ctl"
94 #define MUXCONLINK "/devices/multiplexer@0,0:con"
100 #endif /* _TTYMUX_RCM_IMPL_H */