11539Srgrimes/*
21539Srgrimes * Copyright (c) 1989, 1993
31539Srgrimes *	The Regents of the University of California.  All rights reserved.
41539Srgrimes *
51539Srgrimes * Redistribution and use in source and binary forms, with or without
61539Srgrimes * modification, are permitted provided that the following conditions
71539Srgrimes * are met:
81539Srgrimes * 1. Redistributions of source code must retain the above copyright
91539Srgrimes *    notice, this list of conditions and the following disclaimer.
101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111539Srgrimes *    notice, this list of conditions and the following disclaimer in the
121539Srgrimes *    documentation and/or other materials provided with the distribution.
13203964Simp * 3. Neither the name of the University nor the names of its contributors
141539Srgrimes *    may be used to endorse or promote products derived from this software
151539Srgrimes *    without specific prior written permission.
161539Srgrimes *
171539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
181539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
191539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
201539Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
211539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
221539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
231539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
251539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
261539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
271539Srgrimes * SUCH DAMAGE.
281539Srgrimes *
291539Srgrimes *	@(#)ttyent.h	8.1 (Berkeley) 6/2/93
3093032Simp * $FreeBSD$
311539Srgrimes */
321539Srgrimes
331539Srgrimes#ifndef	_TTYENT_H_
341539Srgrimes#define	_TTYENT_H_
351539Srgrimes
361539Srgrimes#define	_PATH_TTYS	"/etc/ttys"
371539Srgrimes
381539Srgrimes#define	_TTYS_OFF	"off"
391539Srgrimes#define	_TTYS_ON	"on"
401539Srgrimes#define	_TTYS_SECURE	"secure"
4122734Sdavidn#define	_TTYS_INSECURE	"insecure"
421539Srgrimes#define	_TTYS_WINDOW	"window"
4321189Sdavidn#define	_TTYS_GROUP	"group"
4424923Sbde#define	_TTYS_NOGROUP	"none"
4524891Sdavidn#define	_TTYS_DIALUP	"dialup"
4624891Sdavidn#define	_TTYS_NETWORK	"network"
471539Srgrimes
481539Srgrimesstruct ttyent {
491539Srgrimes	char	*ty_name;	/* terminal device name */
501539Srgrimes	char	*ty_getty;	/* command to execute, usually getty */
511539Srgrimes	char	*ty_type;	/* terminal type for termcap */
521539Srgrimes#define	TTY_ON		0x01	/* enable logins (start ty_getty program) */
531539Srgrimes#define	TTY_SECURE	0x02	/* allow uid of 0 to login */
5424891Sdavidn#define	TTY_DIALUP	0x04	/* is a dialup tty */
5524891Sdavidn#define	TTY_NETWORK	0x08	/* is a network tty */
561539Srgrimes	int	ty_status;	/* status flags */
571539Srgrimes	char 	*ty_window;	/* command to start up window manager */
581539Srgrimes	char	*ty_comment;	/* comment field */
5921189Sdavidn	char	*ty_group;	/* tty group */
601539Srgrimes};
611539Srgrimes
621539Srgrimes#include <sys/cdefs.h>
631539Srgrimes
641539Srgrimes__BEGIN_DECLS
6593032Simpstruct ttyent *getttyent(void);
6693032Simpstruct ttyent *getttynam(const char *);
6793032Simpint setttyent(void);
6893032Simpint endttyent(void);
6993032Simpint isdialuptty(const char *);
7093032Simpint isnettty(const char *);
711539Srgrimes__END_DECLS
721539Srgrimes
731539Srgrimes#endif /* !_TTYENT_H_ */
74