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"
36 #define _(x) gettext(x)
38 #define UNKNOWN 1 /* flags */
39 #define PRESENT 2 /* flags */
40 #define REGISTERED 4 /* flags */
41 #define CONNECTED 8 /* flags */
42 #define DISCONNECTED 0x10 /* flags */
45 #define TTYMUX_OFFLINE 1
46 #define TTYMUX_ONLINE 2
47 #define TTYMUX_REMOVE 3
48 #define TTYMUX_SUSPEND 4
49 #define TTYMUX_RESUME 5
52 * Representation of a resource.
53 * All resources are placed in a cache structured as a doubly linked list
54 * (ie the next and prev fields).
55 * The dependencies list identifies which resources this resource is
64 struct link
*dependencies
;
68 * Representation of a pair of resources participating in a
69 * dependency relationship
70 * The dependency is cast in terms of a resource that is using
71 * another resource in order to provide a service.
72 * This structure is used to represent a ttymux minor node that
73 * has another serial device multiplexed under it. In this
74 * case user resource would correspond to the ttymux minor node and the
75 * the used resource would correspond to the multiplexed serial device.
76 * The linkid field refers to the STREAM's link identifier.
79 rsrc_t
*user
; /* the using resource */
80 rsrc_t
*used
; /* the used resource */
81 int linkid
; /* STREAM's link identifier */
84 int (*connect
)(struct link
*);
85 int (*disconnect
)(struct link
*);
89 #define MUXCTLLINK "/devices/multiplexer@0,0:ctl"
90 #define MUXCONLINK "/devices/multiplexer@0,0:con"
96 #endif /* _TTYMUX_RCM_IMPL_H */