Gets a tty description file entry.
#include <ttyent.h>
struct ttyent *getttyent()
struct ttyent *getttynam( Name)
char *Name;
void setttyent()
void endttyent()
Attention: Do not use the getttyent, getttynam, setttyent, or endttyent subroutine in a multithreaded environment.
The getttyent and
getttynam subroutines each return a pointer to an object with the
ttyent structure. This structure contains the broken-out
fields of a line from the tty description file. The ttyent
structure is in the /usr/include/sys/ttyent.h file and
contains the following fields:
The getttyent subroutine reads the next line from the tty file, opening the file if necessary. The setttyent subroutine rewinds the file. The endttyent subroutine closes it.
The getttynam subroutine searches from the beginning of the file until a matching name (specified by the Name parameter) is found (or until the EOF is encountered).
Name | Specifies the name of a tty description file. |
These subroutines return a null pointer when they encounter an EOF (end-of-file) character or an error.
These subroutines are part of Base Operating System (BOS) Runtime.
/usr/lib/libodm.a | Specifies the ODM (Object Data Manager) library. |
/usr/lib/libcfg.a | Archives device configuration subroutines. |
/etc/termcap | Defines terminal capabilities. |
The ttyslot subroutine.
The getty command, init command, login command.
List of Files and Directories Subroutines in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.