10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*8770SJordan.Vaughan@Sun.com * Common Development and Distribution License (the "License"). 6*8770SJordan.Vaughan@Sun.com * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*8770SJordan.Vaughan@Sun.com * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _SYS_ZCONS_H 270Sstevel@tonic-gate #define _SYS_ZCONS_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate #include <sys/types.h> 300Sstevel@tonic-gate 310Sstevel@tonic-gate #ifdef __cplusplus 320Sstevel@tonic-gate extern "C" { 330Sstevel@tonic-gate #endif 340Sstevel@tonic-gate 350Sstevel@tonic-gate /* 360Sstevel@tonic-gate * Minor node name of the global zone side (often called the "master" side) 370Sstevel@tonic-gate * of the zcons driver. 380Sstevel@tonic-gate */ 390Sstevel@tonic-gate #define ZCONS_MASTER_NAME "masterconsole" 400Sstevel@tonic-gate 410Sstevel@tonic-gate /* 420Sstevel@tonic-gate * Minor node name of the non-global zone side (often called the "slave" 430Sstevel@tonic-gate * side) of the zcons driver. We name it "zoneconsole" since that nameo 440Sstevel@tonic-gate * will show up in 'ps' output, and will make some sense to the global zone 450Sstevel@tonic-gate * user. Inside the zone, it will simply show up as "console" due to the 460Sstevel@tonic-gate * links we create. 470Sstevel@tonic-gate */ 480Sstevel@tonic-gate #define ZCONS_SLAVE_NAME "zoneconsole" 490Sstevel@tonic-gate 50*8770SJordan.Vaughan@Sun.com /* 51*8770SJordan.Vaughan@Sun.com * ZC_IOC forms the base for all zcons ioctls. 52*8770SJordan.Vaughan@Sun.com */ 53*8770SJordan.Vaughan@Sun.com #define ZC_IOC (('Z' << 24) | ('o' << 16) | ('n' << 8)) 54*8770SJordan.Vaughan@Sun.com 55*8770SJordan.Vaughan@Sun.com /* 56*8770SJordan.Vaughan@Sun.com * These ioctls instruct the master side of the console to hold or release 57*8770SJordan.Vaughan@Sun.com * a reference to the slave side's vnode. They are meant to be issued by 58*8770SJordan.Vaughan@Sun.com * zoneadmd after the console device node is created and before it is destroyed 59*8770SJordan.Vaughan@Sun.com * so that the slave's STREAMS anchor, ptem, is preserved when ttymon starts 60*8770SJordan.Vaughan@Sun.com * popping STREAMS modules from within the associated zone. This guarantees 61*8770SJordan.Vaughan@Sun.com * that the zone slave console will always have terminal semantics while the 62*8770SJordan.Vaughan@Sun.com * zone is running. 63*8770SJordan.Vaughan@Sun.com * 64*8770SJordan.Vaughan@Sun.com * A more detailed description can be found in uts/common/io/zcons.c. 65*8770SJordan.Vaughan@Sun.com */ 66*8770SJordan.Vaughan@Sun.com #define ZC_HOLDSLAVE (ZC_IOC | 0) /* get and save slave side reference */ 67*8770SJordan.Vaughan@Sun.com #define ZC_RELEASESLAVE (ZC_IOC | 1) /* release slave side reference */ 68*8770SJordan.Vaughan@Sun.com 690Sstevel@tonic-gate #ifdef __cplusplus 700Sstevel@tonic-gate } 710Sstevel@tonic-gate #endif 720Sstevel@tonic-gate 730Sstevel@tonic-gate #endif /* _SYS_ZCONS_H */ 74