blob: 9a2e3075b878adf93b9b60dc2ee5560f8c79f34e [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#ifndef _UTMPX_H
2#define _UTMPX_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#define __NEED_pid_t
9#define __NEED_time_t
10#define __NEED_struct_timeval
11
12#include <bits/alltypes.h>
13
14struct utmpx
15{
16 short ut_type;
17 pid_t ut_pid;
18 char ut_line[32];
19 char ut_id[4];
20 char ut_user[32];
21 char ut_host[256];
22 struct {
23 short __e_termination;
24 short __e_exit;
25 } __ut_exit;
26 long ut_session;
27 struct timeval ut_tv;
28 unsigned ut_addr_v6[4];
29 char __unused[20];
30};
31
32void endutxent(void);
33struct utmpx *getutxent(void);
34struct utmpx *getutxid(const struct utmpx *);
35struct utmpx *getutxline(const struct utmpx *);
36struct utmpx *pututxline(const struct utmpx *);
37void setutxent(void);
38
39#define EMPTY 0
40#define BOOT_TIME 2
41#define NEW_TIME 3
42#define OLD_TIME 4
43#define INIT_PROCESS 5
44#define LOGIN_PROCESS 6
45#define USER_PROCESS 7
46#define DEAD_PROCESS 8
47
48#ifdef __cplusplus
49}
50#endif
51
52#endif