These functions, described in the X/Open Portability Guide, are declared in the header file `utmpx.h'.
utmpx
data structure contains at least the following members:
short int ut_type
EMPTY
, RUN_LVL
,
BOOT_TIME
, OLD_TIME
, NEW_TIME
, INIT_PROCESS
,
LOGIN_PROCESS
, USER_PROCESS
or DEAD_PROCESS
.
pid_t ut_pid
char ut_line[]
char ut_id[]
char ut_user[]
struct timeval ut_tv
OLD_TIME
this is
the time when the system clock changed, and for entries of type
NEW_TIME
this is the time the system clock was set to.
On the GNU system, struct utmpx
is identical to struct
utmp
except for the fact that including `utmpx.h' does not make
visible the declaration of struct exit_status
.
The following macros are defined for use as values for the
ut_type
member of the utmpx
structure. The values are
integer constants and are, on the GNU system, identical to the
definitions in `utmp.h'.
EMPTY
RUN_LVL
BOOT_TIME
OLD_TIME
NEW_TIME
INIT_PROCESS
LOGIN_PROCESS
USER_PROCESS
DEAD_PROCESS
The size of the ut_line
, ut_id
and ut_user
arrays
can be found using the sizeof
operator.
setutent
. On the GNU system it is
simply an alias for setutent
.
getutxent
function is similar to getutent
, but returns
a pointer to a struct utmpx
instead of struct utmp
. On
the GNU system it simply is an alias for getutent
.
endutent
. On the GNU system it is
simply an alias for endutent
.
getutid
, but uses struct utmpx
instead of struct utmp
. On the GNU system it is simply an alias
for getutid
.
getutid
, but uses struct utmpx
instead of struct utmp
. On the GNU system it is simply an alias
for getutline
.
pututxline
function provides functionality identical to
pututline
, but uses struct utmpx
instead of struct
utmp
. On the GNU system pututxline
is simply an alias for
pututline
.
Go to the first, previous, next, last section, table of contents.