1GETTTYENT(3)               Linux Programmer's Manual              GETTTYENT(3)
2
3
4

NAME

6       getttyent, getttynam, setttyent, endttyent - get ttys file entry
7

SYNOPSIS

9       #include <ttyent.h>
10
11       struct ttyent *getttyent(void);
12
13       struct ttyent *getttynam(const char *name);
14
15       int setttyent(void);
16
17       int endttyent(void);
18

DESCRIPTION

20       These  functions  provide  an  interface  to the file _PATH_TTYS (e.g.,
21       /etc/ttys).
22
23       The function setttyent() opens the file or rewinds it if already open.
24
25       The function endttyent() closes the file.
26
27       The function getttynam() searches for a given ttyname in the file.   It
28       returns a pointer to a ttyent structure (description below).
29
30       The  function  getttyent() opens the file _PATH_TTYS (if necessary) and
31       returns the first entry.  If the file is already open, the next  entry.
32       The ttyent structure has the form:
33
34           struct ttyent {
35               char *ty_name;     /* terminal device name */
36               char *ty_getty;    /* command to execute, usually getty */
37               char *ty_type;     /* terminal type for termcap */
38               int   ty_status;   /* status flags */
39               char *ty_window;   /* command to start up window manager */
40               char *ty_comment;  /* comment field */
41           };
42
43       ty_status can be:
44
45       #define TTY_ON     0x01  /* enable logins (start ty_getty program) */
46       #define TTY_SECURE 0x02  /* allow UID 0 to login */
47

CONFORMING TO

49       Not in POSIX.1-2001.  Present on the BSDs, and perhaps other systems.
50

NOTES

52       Under  Linux the file /etc/ttys, and the functions described above, are
53       not used.
54

SEE ALSO

56       ttyname(3), ttyslot(3)
57

COLOPHON

59       This page is part of release 3.25 of the Linux  man-pages  project.   A
60       description  of  the project, and information about reporting bugs, can
61       be found at http://www.kernel.org/doc/man-pages/.
62
63
64
65GNU                               2002-07-18                      GETTTYENT(3)
Impressum