/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _TTYMUX_H
#define _TTYMUX_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/ttymuxuser.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef
struct sm_iocdata {
int sm_iocid;
} sm_iocdata_t;
/*
* Each minor (refered to as a logical device) created by the multiplexor
* maps onto multiple real devices.
* I/O on a logical device is duplicated across multiple real devices.
* i.e. input from any of the real devices (identified by lqs) is funneled
* through the queue identified in the ttycommon field of a logical unit.
* output arriving on the queue identified in the ttycommon field of a logical
* unit is distributed to all real devices identified by lqs.
*
* When a logical unit is open there is a unique queue upstream (identified
* by ttycommon).
* When a real unit is open there is a unique lower queue to the h/w driver
* (identified by ttycommon).
*
* If the control lines on RS232 port for a physical unit are unknown and
* a request for their status has been issued then flags contains the bits
* TIOCM_PEND and tiocmgetid contains the id of the M_IOCTL streams message
* sent down the write queue to obtain the current status (placed in mbits).
*/
typedef
struct sm_uqi {
int sm_nlqs;
/* queue common data when is open */
} sm_uqi_t;
typedef
struct sm_lqi {
int sm_ctrla_abort_on;
int sm_break_abort_on;
int sm_unit;
unsigned char *sm_hadkadbchar;
char *sm_nachar;
int sm_piocid;
/* queue common data when open */
} sm_lqi_t;
/*
* This structure maintains the state of the console.
*/
typedef struct console {
} sm_console_t;
/*
* This structure contains the information for an open device.
* If an instance of it exists it is available as a named pointer:
*/
typedef struct mux_state {
/* protects ttymux configuration */
/* Information about the standard I/O devices */
/* List of multiplexed serial consoles */
char *sm_ialias;
char *sm_oalias;
/*
* Driver instance private information.
*/
typedef
struct sm_ss
{
int sm_min_redundancy;
} sm_ss_t;
#ifdef __cplusplus
}
#endif
#endif /* _TTYMUX_H */