xref: /minix3/include/ttyent.h (revision 84d9c625bfea59e274550651111ae9edfdc40fbd)
1*84d9c625SLionel Sambuc /*	$NetBSD: ttyent.h,v 1.15 2013/04/27 21:35:25 joerg Exp $	*/
29865aeaaSBen Gras 
32fe8fb19SBen Gras /*
42fe8fb19SBen Gras  * Copyright (c) 1989, 1993
52fe8fb19SBen Gras  *	The Regents of the University of California.  All rights reserved.
62fe8fb19SBen Gras  *
72fe8fb19SBen Gras  * Redistribution and use in source and binary forms, with or without
82fe8fb19SBen Gras  * modification, are permitted provided that the following conditions
92fe8fb19SBen Gras  * are met:
102fe8fb19SBen Gras  * 1. Redistributions of source code must retain the above copyright
112fe8fb19SBen Gras  *    notice, this list of conditions and the following disclaimer.
122fe8fb19SBen Gras  * 2. Redistributions in binary form must reproduce the above copyright
132fe8fb19SBen Gras  *    notice, this list of conditions and the following disclaimer in the
142fe8fb19SBen Gras  *    documentation and/or other materials provided with the distribution.
152fe8fb19SBen Gras  * 3. Neither the name of the University nor the names of its contributors
162fe8fb19SBen Gras  *    may be used to endorse or promote products derived from this software
172fe8fb19SBen Gras  *    without specific prior written permission.
182fe8fb19SBen Gras  *
192fe8fb19SBen Gras  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
202fe8fb19SBen Gras  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
212fe8fb19SBen Gras  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
222fe8fb19SBen Gras  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
232fe8fb19SBen Gras  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
242fe8fb19SBen Gras  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
252fe8fb19SBen Gras  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
262fe8fb19SBen Gras  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
272fe8fb19SBen Gras  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
282fe8fb19SBen Gras  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
292fe8fb19SBen Gras  * SUCH DAMAGE.
302fe8fb19SBen Gras  *
312fe8fb19SBen Gras  *	@(#)ttyent.h	8.1 (Berkeley) 6/2/93
322fe8fb19SBen Gras  */
332fe8fb19SBen Gras 
342fe8fb19SBen Gras #ifndef	_TTYENT_H_
352fe8fb19SBen Gras #define	_TTYENT_H_
362fe8fb19SBen Gras 
372fe8fb19SBen Gras #include <sys/cdefs.h>
38*84d9c625SLionel Sambuc #include <sys/featuretest.h>
392fe8fb19SBen Gras 
402fe8fb19SBen Gras #define	_PATH_TTYS	"/etc/ttys"
412fe8fb19SBen Gras 
422fe8fb19SBen Gras #define	_TTYS_OFF	"off"
432fe8fb19SBen Gras #define	_TTYS_ON	"on"
442fe8fb19SBen Gras #define	_TTYS_SECURE	"secure"
452fe8fb19SBen Gras #define	_TTYS_WINDOW	"window"
462fe8fb19SBen Gras #define	_TTYS_CLASS	"class"
472fe8fb19SBen Gras #define	_TTYS_LOCAL	"local"
482fe8fb19SBen Gras #define	_TTYS_RTSCTS	"rtscts"
492fe8fb19SBen Gras #define	_TTYS_DTRCTS    "dtrcts"
502fe8fb19SBen Gras #define	_TTYS_SOFTCAR	"softcar"
512fe8fb19SBen Gras #define	_TTYS_MDMBUF	"mdmbuf"
529865aeaaSBen Gras 
539865aeaaSBen Gras struct ttyent {
542fe8fb19SBen Gras 	__aconst char *ty_name;	/* terminal device name */
552fe8fb19SBen Gras 	__aconst char *ty_getty;/* command to execute, usually getty */
562fe8fb19SBen Gras 	__aconst char *ty_type;	/* terminal type for termcap */
572fe8fb19SBen Gras #define	TTY_ON		0x01	/* enable logins (start ty_getty program) */
582fe8fb19SBen Gras #define	TTY_SECURE	0x02	/* allow uid of 0 to login */
592fe8fb19SBen Gras #define	TTY_LOCAL	0x04	/* set 'CLOCAL' on open (dev. specific) */
602fe8fb19SBen Gras #define	TTY_RTSCTS	0x08	/* set 'CRTSCTS' on open (dev. specific) */
612fe8fb19SBen Gras #define	TTY_SOFTCAR	0x10	/* ignore hardware carrier (dev. spec.) */
622fe8fb19SBen Gras #define	TTY_MDMBUF	0x20	/* set 'MDMBUF' on open (dev. specific) */
632fe8fb19SBen Gras #define TTY_DTRCTS      0x40    /* set 'CDTRCTS' on open (dev. specific) */
642fe8fb19SBen Gras 	int	ty_status;	/* status flags */
652fe8fb19SBen Gras 	__aconst char *ty_window;/* command to start up window manager */
662fe8fb19SBen Gras 	__aconst char *ty_comment;/* comment field */
672fe8fb19SBen Gras 	__aconst char *ty_class;/* category of tty usage */
689865aeaaSBen Gras };
699865aeaaSBen Gras 
702fe8fb19SBen Gras __BEGIN_DECLS
712fe8fb19SBen Gras struct ttyent *getttyent(void);
722fe8fb19SBen Gras struct ttyent *getttynam(const char *);
732fe8fb19SBen Gras #if defined(_NETBSD_SOURCE)
742fe8fb19SBen Gras int setttyentpath(const char *);
752fe8fb19SBen Gras #endif /* defined(_NETBSD_SOURCE) */
762fe8fb19SBen Gras int setttyent(void);
772fe8fb19SBen Gras int endttyent(void);
782fe8fb19SBen Gras __END_DECLS
799865aeaaSBen Gras 
802fe8fb19SBen Gras #endif /* !_TTYENT_H_ */
81