vt.h revision ceeba6f9f0adf370c2a0f5c81a0d6ef1ba146cb4
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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
*/
/*
*/
#ifndef _SYS_VT_H
#define _SYS_VT_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Public IOCTLs supported by the VT, which are shared with
* other operating systems.
*/
/*
* Solaris specific public IOCTL.
* Inquires if the vt functionality is available.
*/
/* get/set the target of /dev/vt/console_user symbol link */
struct vt_mode {
char mode; /* mode to set vt into, VT_AUTO or VT_PROCESS */
char waitv; /* if != 0, vt hangs on writes when not active */
short relsig; /* signal to use for release request */
short acqsig; /* signal to use for display acquired */
short frsig; /* signal to use for forced release */
};
/* vt switching mode */
enum {
VT_AUTO = 0, /* this vt switching is automatic */
VT_PROCESS /* this vt switching controlled by process */
};
/*
* structure used by VT_GETSTATE ioctl
*/
struct vt_stat {
unsigned short v_active;
unsigned short v_signal;
unsigned short v_state;
};
/* project private IOCTLs */
/*
* setting target console is only used by vtdaemon
* to set target console while vtdaemon is authenticating
* for it, which is returned in VT_GETSTATE. At that
* time, the real active console is the vtdaemon special console,
* but VT_GETSTATE should not be aware of it. Instead, VT_GETACTIVE
* is used to get the real active console for vtdaemon.
*/
/*
* Used by cn to convert a VT_SET_CONSUSER to a internal interface
*/
/*
* structure used by VT_GETDISPINFO
*/
struct vt_dispinfo {
int v_dispnum; /* display number associated with vt */
int v_login; /* if the user logged in the display */
};
#ifdef __cplusplus
}
#endif
#endif /* _SYS_VT_H */