1 .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
4 .TH GETTTYENT 3 2002-07-18 "GNU" "Linux Programmer's Manual"
6 getttyent, getttynam, setttyent, endttyent \- get ttys file entry
8 .B "#include <ttyent.h>"
10 .B "struct ttyent *getttyent(void);"
12 .BI "struct ttyent *getttynam(const char *" name );
14 .B "int setttyent(void);"
16 .B "int endttyent(void);"
18 These functions provide an interface to the file
25 opens the file or rewinds it if already open.
33 searches for a given ttyname in the file.
34 It returns a pointer to a
36 structure (description below).
42 (if necessary) and returns the first entry.
43 If the file is already open, the next entry.
46 structure has the form:
51 char *ty_name; /* terminal device name */
52 char *ty_getty; /* command to execute, usually getty */
53 char *ty_type; /* terminal type for termcap */
54 int ty_status; /* status flags */
55 char *ty_window; /* command to start up window manager */
56 char *ty_comment; /* comment field */
66 #define TTY_ON 0x01 /* enable logins (start ty_getty program) */
67 #define TTY_SECURE 0x02 /* allow UID 0 to login */
71 Present on the BSDs, and perhaps other systems.
75 and the functions described above, are not used.