ttyent.h revision 22734
1238106Sdes/*
2238106Sdes * Copyright (c) 1989, 1993
3238106Sdes *	The Regents of the University of California.  All rights reserved.
4238106Sdes *
5238106Sdes * Redistribution and use in source and binary forms, with or without
6238106Sdes * modification, are permitted provided that the following conditions
7238106Sdes * are met:
8238106Sdes * 1. Redistributions of source code must retain the above copyright
9238106Sdes *    notice, this list of conditions and the following disclaimer.
10238106Sdes * 2. Redistributions in binary form must reproduce the above copyright
11238106Sdes *    notice, this list of conditions and the following disclaimer in the
12238106Sdes *    documentation and/or other materials provided with the distribution.
13238106Sdes * 3. All advertising materials mentioning features or use of this software
14238106Sdes *    must display the following acknowledgement:
15238106Sdes *	This product includes software developed by the University of
16238106Sdes *	California, Berkeley and its contributors.
17238106Sdes * 4. Neither the name of the University nor the names of its contributors
18238106Sdes *    may be used to endorse or promote products derived from this software
19238106Sdes *    without specific prior written permission.
20238106Sdes *
21238106Sdes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22238106Sdes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23238106Sdes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24269257Sdes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25269257Sdes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26269257Sdes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27269257Sdes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28269257Sdes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29269257Sdes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30269257Sdes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31269257Sdes * SUCH DAMAGE.
32269257Sdes *
33269257Sdes *	@(#)ttyent.h	8.1 (Berkeley) 6/2/93
34238106Sdes */
35238106Sdes
36238106Sdes#ifndef	_TTYENT_H_
37238106Sdes#define	_TTYENT_H_
38238106Sdes
39238106Sdes#define	_PATH_TTYS	"/etc/ttys"
40238106Sdes
41238106Sdes#define	_TTYS_OFF	"off"
42238106Sdes#define	_TTYS_ON	"on"
43238106Sdes#define	_TTYS_SECURE	"secure"
44238106Sdes#define	_TTYS_INSECURE	"insecure"
45238106Sdes#define	_TTYS_WINDOW	"window"
46238106Sdes#define	_TTYS_GROUP	"group"
47238106Sdes#define _TTYS_NOGROUP	"none"
48238106Sdes
49238106Sdesstruct ttyent {
50238106Sdes	char	*ty_name;	/* terminal device name */
51238106Sdes	char	*ty_getty;	/* command to execute, usually getty */
52238106Sdes	char	*ty_type;	/* terminal type for termcap */
53238106Sdes#define	TTY_ON		0x01	/* enable logins (start ty_getty program) */
54238106Sdes#define	TTY_SECURE	0x02	/* allow uid of 0 to login */
55238106Sdes	int	ty_status;	/* status flags */
56238106Sdes	char 	*ty_window;	/* command to start up window manager */
57238106Sdes	char	*ty_comment;	/* comment field */
58238106Sdes	char	*ty_group;	/* tty group */
59238106Sdes};
60238106Sdes
61238106Sdes#include <sys/cdefs.h>
62238106Sdes
63238106Sdes__BEGIN_DECLS
64238106Sdesstruct ttyent *getttyent __P((void));
65238106Sdesstruct ttyent *getttynam __P((const char *));
66238106Sdesint setttyent __P((void));
67238106Sdesint endttyent __P((void));
68238106Sdes__END_DECLS
69238106Sdes
70238106Sdes#endif /* !_TTYENT_H_ */
71238106Sdes