Loading...
gen/getttyent.3 Libc-1725.40.4 Libc-320
--- Libc/Libc-1725.40.4/gen/getttyent.3
+++ Libc/Libc-320/gen/getttyent.3
@@ -41,6 +41,9 @@
 .Nm setttyent ,
 .Nm endttyent
 .Nd get ttys file entry
+.Nm isdialuptty ,
+.Nm isnettty
+.Nd determine tty type from ttys file entry
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -53,6 +56,10 @@
 .Fn setttyent void
 .Ft int
 .Fn endttyent void
+.Ft int
+.Fn isdialuptty "const char *name"
+.Ft int
+.Fn isnettty "const char *name"
 .Sh DESCRIPTION
 The
 .Fn getttyent ,
@@ -83,7 +90,8 @@
 .It Fa ty_name
 The name of the character-special file.
 .It Fa ty_getty
-The name of the command invoked 
+The name of the command invoked by
+.Xr init 8
 to initialize tty line characteristics.
 .It Fa ty_type
 The name of the default terminal type connected to this tty line.
@@ -93,13 +101,23 @@
 The possible flags are as follows:
 .Bl -tag -width TTY_NETWORK
 .It Dv TTY_ON
-Enables logins
+Enables logins (i.e.,
+.Xr init 8
+will start the command referenced by
+.Fa ty_getty
+on this entry).
 .It Dv TTY_SECURE
 Allow users with a uid of 0 to login on this terminal.
 .It Dv TTY_DIALUP
 Identifies a tty as a dialin line.
+If this flag is set, then
+.Fn isdialuptty
+will return a non-zero value.
 .It Dv TTY_NETWORK
 Identifies a tty used for network connections.
+If this flag is set, then
+.Fn isnettty
+will return a non-zero value.
 .El
 .It Fa ty_window
 The command to execute for a window system associated with the line.
@@ -159,6 +177,14 @@
 and
 .Fn endttyent
 return 0 on failure and 1 on success.
+.Pp
+The routines
+.Fn isdialuptty
+and
+.Fn isnettty
+return non-zero if the dialup or network flag is set for the
+tty entry relating to the tty named by the parameter, and
+zero otherwise.
 .Sh FILES
 .Bl -tag -width /etc/ttys -compact
 .It Pa /etc/ttys
@@ -170,6 +196,7 @@
 .Xr termcap 5 ,
 .Xr ttys 5 ,
 .Xr getty 8 ,
+.Xr init 8
 .Sh HISTORY
 The
 .Fn getttyent ,