summaryrefslogtreecommitdiffstats
path: root/man0p/utmpx.h.0p
blob: 16d3a78b96d91be17c7b92e9a7314a3eff628fe2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "<utmpx.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" <utmpx.h> 
.SH NAME
utmpx.h \- user accounting database definitions
.SH SYNOPSIS
.LP
\fB#include <utmpx.h> \fP
.SH DESCRIPTION
.LP
The \fI<utmpx.h>\fP header shall define the \fButmpx\fP structure
that shall include at least the following members:
.sp
.RS
.nf

\fBchar            ut_user[] \fP User login name. \fB
char            ut_id[]   \fP Unspecified initialization process identifier. \fB
char            ut_line[] \fP Device name. \fB
pid_t           ut_pid    \fP Process ID. \fB
short           ut_type   \fP Type of entry. \fB
struct timeval  ut_tv     \fP Time entry was made. \fB
\fP
.fi
.RE
.LP
The \fBpid_t\fP type shall be defined through \fBtypedef\fP as described
in \fI<sys/types.h>\fP .
.LP
The \fBtimeval\fP structure shall be defined as described in \fI<sys/time.h>\fP
\&.
.LP
Inclusion of the \fI<utmpx.h>\fP header may also make visible all
symbols from \fI<sys/time.h>\fP.
.LP
The following symbolic constants shall be defined as possible values
for the \fIut_type\fP member of the \fButmpx\fP
structure:
.TP 7
EMPTY
No valid user accounting information.
.TP 7
BOOT_TIME
Identifies time of system boot.
.TP 7
OLD_TIME
Identifies time when system clock changed.
.TP 7
NEW_TIME
Identifies time after system clock changed.
.TP 7
USER_PROCESS
Identifies a process.
.TP 7
INIT_PROCESS
Identifies a process spawned by the init process.
.TP 7
LOGIN_PROCESS
Identifies the session leader of a logged-in user.
.TP 7
DEAD_PROCESS
Identifies a session leader who has exited.
.sp
.LP
The following shall be declared as functions and may also be defined
as macros. Function prototypes shall be provided.
.sp
.RS
.nf

\fBvoid          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);
\fP
.fi
.RE
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
None.
.SH RATIONALE
.LP
None.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fI<sys/time.h>\fP , \fI<sys/types.h>\fP , the System
Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIendutxent\fP()
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .