The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

utmpx.h - user accounting database definitions

 SYNOPSIS



#include <utmpx.h>

 DESCRIPTION

The <utmpx.h> header defines the utmpx structure that includes at least the following members:

char           ut_user[]  user login name
char           ut_id[]    unspecified initialisation process identifier
char           ut_line[]  device name
pid_t          ut_pid     process id
short int      ut_type    type of entry
struct timeval ut_tv      time entry was made

The pid_t type is defined through typedef as described in <sys/types.h>.

The timeval structure is defined as described in <sys/time.h>.

Inclusion of the <utmpx.h> header may also make visible all symbols from <sys/time.h>.

The following symbolic constants are defined as possible values for the ut_type member of the utmpx structure:

EMPTY
No valid user accounting information.
BOOT_TIME
Identifies time of system boot.
OLD_TIME
Identifies time when system clock changed.
NEW_TIME
Identifies time after system clock changed.
USER_PROCESS
Identifies a process.
INIT_PROCESS
Identifies a process spawned by the init process.
LOGIN_PROCESS
Identifies the session leader of a logged in user.
DEAD_PROCESS
Identifies a session leader who has exited.

The following are declared as functions and may also be defined as macros. Function prototypes must be provided for use with an ISO C compiler.


void          endutxent(void);
struct utmpx *getutxent(void);
struct utmpx *getutxid(const struct utmpx *);
struct utmpx *getutxline(const struct utmpx *);
struct utmpx *pututxline(const struct utmpx *);
void          setutxent(void);

 APPLICATION USAGE

None.

 FUTURE DIRECTIONS

None.

 SEE ALSO

endutxent().

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]