ttyent.h revision 24923
1126355Smlaier/* 2126353Smlaier * Copyright (c) 1989, 1993 3126353Smlaier * The Regents of the University of California. All rights reserved. 4126353Smlaier * 5126353Smlaier * Redistribution and use in source and binary forms, with or without 6126353Smlaier * modification, are permitted provided that the following conditions 7126353Smlaier * are met: 8126353Smlaier * 1. Redistributions of source code must retain the above copyright 9126353Smlaier * notice, this list of conditions and the following disclaimer. 10126353Smlaier * 2. Redistributions in binary form must reproduce the above copyright 11126353Smlaier * notice, this list of conditions and the following disclaimer in the 12126353Smlaier * documentation and/or other materials provided with the distribution. 13126353Smlaier * 3. All advertising materials mentioning features or use of this software 14126353Smlaier * must display the following acknowledgement: 15126353Smlaier * This product includes software developed by the University of 16126353Smlaier * California, Berkeley and its contributors. 17126353Smlaier * 4. Neither the name of the University nor the names of its contributors 18126353Smlaier * may be used to endorse or promote products derived from this software 19126353Smlaier * without specific prior written permission. 20126353Smlaier * 21126353Smlaier * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22126353Smlaier * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23126353Smlaier * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24126353Smlaier * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25126353Smlaier * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26126353Smlaier * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27126353Smlaier * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28126353Smlaier * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29126353Smlaier * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30126353Smlaier * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31126353Smlaier * SUCH DAMAGE. 32126353Smlaier * 33126353Smlaier * @(#)ttyent.h 8.1 (Berkeley) 6/2/93 34126353Smlaier */ 35126353Smlaier 36126353Smlaier#ifndef _TTYENT_H_ 37126353Smlaier#define _TTYENT_H_ 38126353Smlaier 39126353Smlaier#define _PATH_TTYS "/etc/ttys" 40126353Smlaier 41126353Smlaier#define _TTYS_OFF "off" 42126353Smlaier#define _TTYS_ON "on" 43126353Smlaier#define _TTYS_SECURE "secure" 44126353Smlaier#define _TTYS_INSECURE "insecure" 45126353Smlaier#define _TTYS_WINDOW "window" 46126353Smlaier#define _TTYS_GROUP "group" 47126353Smlaier#define _TTYS_NOGROUP "none" 48126353Smlaier#define _TTYS_DIALUP "dialup" 49126353Smlaier#define _TTYS_NETWORK "network" 50126353Smlaier 51126353Smlaierstruct ttyent { 52126353Smlaier char *ty_name; /* terminal device name */ 53126353Smlaier char *ty_getty; /* command to execute, usually getty */ 54126353Smlaier char *ty_type; /* terminal type for termcap */ 55126353Smlaier#define TTY_ON 0x01 /* enable logins (start ty_getty program) */ 56126353Smlaier#define TTY_SECURE 0x02 /* allow uid of 0 to login */ 57126353Smlaier#define TTY_DIALUP 0x04 /* is a dialup tty */ 58126353Smlaier#define TTY_NETWORK 0x08 /* is a network tty */ 59126353Smlaier int ty_status; /* status flags */ 60126353Smlaier char *ty_window; /* command to start up window manager */ 61126353Smlaier char *ty_comment; /* comment field */ 62126353Smlaier char *ty_group; /* tty group */ 63126353Smlaier}; 64126353Smlaier 65126353Smlaier#include <sys/cdefs.h> 66126353Smlaier 67126353Smlaier__BEGIN_DECLS 68126353Smlaierstruct ttyent *getttyent __P((void)); 69126353Smlaierstruct ttyent *getttynam __P((const char *)); 70126353Smlaierint setttyent __P((void)); 71126353Smlaierint endttyent __P((void)); 72126353Smlaierint isdialuptty __P((const char *)); 73126353Smlaierint isnetworktty __P((const char *)); 74126353Smlaier__END_DECLS 75126353Smlaier 76126353Smlaier#endif /* !_TTYENT_H_ */ 77126353Smlaier