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]
22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23 /* All Rights Reserved */
26 #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.7 */
33 #define FAILURE -1 /* initialize device failed */
34 #define LOCKED -2 /* device is locked by others */
35 #define SESSION -3 /* device has active session */
36 #define UNACCESS -4 /* device not accessible */
43 * flags to indicate the field of /etc/ttydefs
44 * Note: order is important because it corresponds to
45 * the order of fields in the file
54 * flags to indicate the field of pmtab
55 * Note: order is important because it corresponds to
56 * the order of fields in the file
79 #define RAW 0x1 /* raw mode */
80 #define CANON 0x2 /* canonical mode */
83 * return value for peeking input data
89 #define MAXID 15 /* Maximum length the "g_id" and "g_nextid" \
90 * strings can take. Longer ones will be \
94 #define MAXARGS 64 /* Maximum number of arguments that can be \
98 #define SPAWN_LIMIT 15 /* respawn allowed within SPAWN_INTERVAL */
99 #define SPAWN_INTERVAL (2*60)
101 #define UUCP "uucp" /* owner of bi-directional devices */
102 #define TTY "tty" /* group name of all devices */
103 #define ROOTUID 0 /* root uid */
105 #define LOGDIR "/var/saf/" /* home dir of all saf log */
106 #define LOGFILE "log" /* log file */
107 #define OLOGFILE "o.log" /* saved log file */
108 #define TLOGFILE "t.log" /* temp log file */
109 #define PIDFILE "_pid" /* pid file */
110 #define PMTABFILE "_pmtab" /* pmtab file */
111 #define PMPIPE "_pmpipe" /* pmpipe */
112 #define SACPIPE "../_sacpipe" /* sacpipe */
113 #define TTYDEFS "/etc/ttydefs" /* ttydefs file */
114 #define CONSOLE "/dev/syscon" /* /dev/console */
117 #define DBGFILE "debug" /* debug file */
118 #define EX_DBG "/var/saf/tm_debug"
119 /* debug file for ttymon express*/
123 #define ISSUEFILE "/etc/issue" /*file to print before prompt */
126 #define PMTAB_VERS 1 /* pmtab version number */
127 #define TTYDEFS_VERS 1 /* /etc/ttydefs version number */
129 #define MAXDEFS 100 /* max entries Gdef table can have */
132 * - ttymon reserves 7 fd for the following use:
133 * - pid, log, pmpipe, sacpipe, pmtab, PCpipe[0], PCpipe[1].
134 * - if DEBUG is on, reserve one more for debug file
143 * pmtab floating, any fd will do
146 #define FILE_RESERVED 8
148 #define FILE_RESERVED 7
151 #define TM_MAXCLASS 1 /* maxclass of SAC msg ttymon understands */
154 * flag value for strcheck()