bwtmps(3C)bwtmps(3C)NAME
bwtmps: bwtmpname(), updatebwdb(), getbwent(), setbwent(), endbwent()-
access and update routines for the wtmps and btmps databases
SYNOPSISDESCRIPTION
returns a pointer to a structure. The key members of structure are :
char ut_user[] User login name
char ut_id[] Unique Id to distinguish an entry
char ut_line[] Device name
pid_t ut_pid Process Id
short ut_type Type of Entry
struct ut_exit The exit status of a process
struct timeval ut_tv Time entry was made
char ut_host[] Host name, if remote
uint8_t ut_addr[] Internet Address of the Host,
if remote
short ut_addr_type Flag to identify type of address
in ut_addr
Routines
The following routines are provided:
Allows the user to set the database being examined to either
or does not open the database -- it merely
closes the old file if it is currently open,
and saves the new file name. and are macros
defined in header file, which refer to and
files respectively .
Reads in the next entry from either
or depending on the previous call to If the
database is not already open, opens it. If it
reaches end of file, fails.
Appends the structure pointed to by to either or as set by
the previous call to
Resets the requests for
to begin from the start of the database, as
specified by a previous call to
Closes the handle of the currently open database.
RETURN VALUE
returns pointer to structure of type on success. If size is not one of
the supported structure sizes , returns NULL and sets errno to On
reaching end of database, returns NULL.
returns 0 if append to the database is successful. returns -1 on fail‐
ure to append to database.
ERRORS
[EINVAL] The size parameter passed to the bwtmps(3C) func‐
tions does not match any of the structure sizes
supported .
WARNINGS
Applications should not access the and databases directly, but should
use these functions as the structure written to these databases is a
superset of the structure. does not update and files.
bwtmps(3C) interfaces load shared library
Compile/link for Archive Applications (PA-RISC only)
If you use bwtmps(3C) interfaces and compile/link your application ar‐
chive, please note that bwtmps(3C) interfaces have a dependency on that
will require a change to the compile/link command:
Compile :
Or compile with and
The option is positionally dependent and should occur at the beginning
of the compile line. For optimum compatibility in future releases, you
should avoid using archive libc with other shared libraries except for
as needed above.
AUTHOR
The routines were developed by Hewlett-Packard Company.
FILESSEE ALSOgetuts(3C), thread_safety(5).
bwtmps(3C)