ttyent.h revision 93032
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.
131539Srgrimes * 3. All advertising materials mentioning features or use of this software
141539Srgrimes *    must display the following acknowledgement:
151539Srgrimes *	This product includes software developed by the University of
161539Srgrimes *	California, Berkeley and its contributors.
171539Srgrimes * 4. Neither the name of the University nor the names of its contributors
181539Srgrimes *    may be used to endorse or promote products derived from this software
191539Srgrimes *    without specific prior written permission.
201539Srgrimes *
211539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241539Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311539Srgrimes * SUCH DAMAGE.
321539Srgrimes *
331539Srgrimes *	@(#)ttyent.h	8.1 (Berkeley) 6/2/93
3493032Simp * $FreeBSD: head/include/ttyent.h 93032 2002-03-23 17:24:55Z imp $
351539Srgrimes */
361539Srgrimes
371539Srgrimes#ifndef	_TTYENT_H_
381539Srgrimes#define	_TTYENT_H_
391539Srgrimes
401539Srgrimes#define	_PATH_TTYS	"/etc/ttys"
411539Srgrimes
421539Srgrimes#define	_TTYS_OFF	"off"
431539Srgrimes#define	_TTYS_ON	"on"
441539Srgrimes#define	_TTYS_SECURE	"secure"
4522734Sdavidn#define	_TTYS_INSECURE	"insecure"
461539Srgrimes#define	_TTYS_WINDOW	"window"
4721189Sdavidn#define	_TTYS_GROUP	"group"
4824923Sbde#define	_TTYS_NOGROUP	"none"
4924891Sdavidn#define	_TTYS_DIALUP	"dialup"
5024891Sdavidn#define	_TTYS_NETWORK	"network"
511539Srgrimes
521539Srgrimesstruct ttyent {
531539Srgrimes	char	*ty_name;	/* terminal device name */
541539Srgrimes	char	*ty_getty;	/* command to execute, usually getty */
551539Srgrimes	char	*ty_type;	/* terminal type for termcap */
561539Srgrimes#define	TTY_ON		0x01	/* enable logins (start ty_getty program) */
571539Srgrimes#define	TTY_SECURE	0x02	/* allow uid of 0 to login */
5824891Sdavidn#define	TTY_DIALUP	0x04	/* is a dialup tty */
5924891Sdavidn#define	TTY_NETWORK	0x08	/* is a network tty */
601539Srgrimes	int	ty_status;	/* status flags */
611539Srgrimes	char 	*ty_window;	/* command to start up window manager */
621539Srgrimes	char	*ty_comment;	/* comment field */
6321189Sdavidn	char	*ty_group;	/* tty group */
641539Srgrimes};
651539Srgrimes
661539Srgrimes#include <sys/cdefs.h>
671539Srgrimes
681539Srgrimes__BEGIN_DECLS
6993032Simpstruct ttyent *getttyent(void);
7093032Simpstruct ttyent *getttynam(const char *);
7193032Simpint setttyent(void);
7293032Simpint endttyent(void);
7393032Simpint isdialuptty(const char *);
7493032Simpint isnettty(const char *);
751539Srgrimes__END_DECLS
761539Srgrimes
771539Srgrimes#endif /* !_TTYENT_H_ */
78