|
NAMEgetttyent , getttynam ,
setttyent , endttyent ,
isdialuptty , isnettty —
ttys(5)
file routines
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <ttyent.h>
struct ttyent *
struct ttyent *
int
int
int
int
DESCRIPTIONThegetttyent (), and getttynam ()
functions each return a pointer to an object, with the following structure,
containing the broken-out fields of a line from the tty description file.
struct ttyent { char *ty_name; /* terminal device name */ char *ty_getty; /* command to execute, usually getty */ char *ty_type; /* terminal type for termcap */ #define TTY_ON 0x01 /* enable logins (start ty_getty program) */ #define TTY_SECURE 0x02 /* allow uid of 0 to login */ #define TTY_DIALUP 0x04 /* is a dialup tty */ #define TTY_NETWORK 0x08 /* is a network tty */ #define TTY_IFEXISTS 0x10 /* configured as "onifexists" */ #define TTY_IFCONSOLE 0x20 /* configured as "onifconsole" */ int ty_status; /* status flags */ char *ty_window; /* command to start up window manager */ char *ty_comment; /* comment field */ char *ty_group; /* tty group name */ }; The fields are as follows:
If any of the fields pointing to character strings are unspecified, they are returned as null pointers. The field ty_status will be zero if no flag values are specified. See ttys(5) for a more complete discussion of the meaning and usage of the fields. The The RETURN VALUESThe routinesgetttyent () and
getttynam () return a null pointer on
EOF or error. The setttyent ()
function and endttyent () return 0 on failure and 1 on
success.
The routines FILES
SEE ALSOlogin(1), gettytab(5), termcap(5), ttys(5), getty(8), init(8)HISTORYThegetttyent (), getttynam (),
setttyent (), and endttyent ()
functions appeared in 4.3BSD.
BUGSThese functions use static data storage; if the data is needed for future use, it should be copied before any subsequent calls overwrite it.
Visit the GSP FreeBSD Man Page Interface. |