1GETTTYENT(3)               Library Functions 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 struct ttyent (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
33
34   The ttyent structure
35       struct ttyent {
36               char    *ty_name;       /* terminal device name */
37               char    *ty_getty;      /* command to execute, usually getty */
38               char    *ty_type;       /* terminal type for termcap */
39               int     ty_status;      /* status flags */
40               char    *ty_window;     /* command to start up window manager */
41               char    *ty_comment;    /* comment field */
42       };
43
44       ty_status can be
45       #define TTY_ON       0x01   /* enable logins (start ty_getty program) */
46       #define TTY_SECURE   0x02   /* allow UID 0 to login */
47

NOTES

49       Under Linux the file /etc/ttys, and the functions described above,  are
50       not used.
51

CONFORMING TO

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

SEE ALSO

56       ttyname(3), ttyslot(3)
57
58
59
60glibc                             2002-07-18                      GETTTYENT(3)
Impressum