ttyent.h revision 24891
1131962Smp/* 259243Sobrien * Copyright (c) 1989, 1993 359243Sobrien * The Regents of the University of California. All rights reserved. 459243Sobrien * 559243Sobrien * Redistribution and use in source and binary forms, with or without 659243Sobrien * modification, are permitted provided that the following conditions 759243Sobrien * are met: 859243Sobrien * 1. Redistributions of source code must retain the above copyright 959243Sobrien * notice, this list of conditions and the following disclaimer. 1059243Sobrien * 2. Redistributions in binary form must reproduce the above copyright 1159243Sobrien * notice, this list of conditions and the following disclaimer in the 1259243Sobrien * documentation and/or other materials provided with the distribution. 1359243Sobrien * 3. All advertising materials mentioning features or use of this software 1459243Sobrien * must display the following acknowledgement: 1559243Sobrien * This product includes software developed by the University of 1659243Sobrien * California, Berkeley and its contributors. 17100616Smp * 4. Neither the name of the University nor the names of its contributors 1859243Sobrien * may be used to endorse or promote products derived from this software 1959243Sobrien * without specific prior written permission. 2059243Sobrien * 2159243Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2259243Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2359243Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2459243Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2559243Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2659243Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2759243Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2859243Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2959243Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3059243Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3159243Sobrien * SUCH DAMAGE. 3259243Sobrien * 3359243Sobrien * @(#)ttyent.h 8.1 (Berkeley) 6/2/93 3459243Sobrien */ 3559243Sobrien 36131962Smp#ifndef _TTYENT_H_ 3769408Sache#define _TTYENT_H_ 3859243Sobrien 3969408Sache#define _PATH_TTYS "/etc/ttys" 40131962Smp 4159243Sobrien#define _TTYS_OFF "off" 4259243Sobrien#define _TTYS_ON "on" 4359243Sobrien#define _TTYS_SECURE "secure" 4459243Sobrien#define _TTYS_INSECURE "insecure" 4559243Sobrien#define _TTYS_WINDOW "window" 4659243Sobrien#define _TTYS_GROUP "group" 4759243Sobrien#define _TTYS_NOGROUP "none" 4859243Sobrien#define _TTYS_DIALUP "dialup" 4959243Sobrien#define _TTYS_NETWORK "network" 5059243Sobrien 5159243Sobrienstruct ttyent { 5269408Sache char *ty_name; /* terminal device name */ 53131962Smp char *ty_getty; /* command to execute, usually getty */ 54131962Smp char *ty_type; /* terminal type for termcap */ 5569408Sache#define TTY_ON 0x01 /* enable logins (start ty_getty program) */ 5669408Sache#define TTY_SECURE 0x02 /* allow uid of 0 to login */ 5769408Sache#define TTY_DIALUP 0x04 /* is a dialup tty */ 5859243Sobrien#define TTY_NETWORK 0x08 /* is a network tty */ 5959243Sobrien int ty_status; /* status flags */ 6059243Sobrien char *ty_window; /* command to start up window manager */ 6159243Sobrien char *ty_comment; /* comment field */ 6259243Sobrien char *ty_group; /* tty group */ 6359243Sobrien}; 6459243Sobrien 6559243Sobrien#include <sys/cdefs.h> 6659243Sobrien 6759243Sobrien__BEGIN_DECLS 6859243Sobrienstruct ttyent *getttyent __P((void)); 6959243Sobrienstruct ttyent *getttynam __P((const char *)); 7059243Sobrienint setttyent __P((void)); 7159243Sobrienint endttyent __P((void)); 7259243Sobrienint isdialuptty __P((const char *)); 7359243Sobrienint isnettty __P((const char *)); 7459243Sobrien__END_DECLS 7559243Sobrien 7659243Sobrien#endif /* !_TTYENT_H_ */ 7759243Sobrien