Usermode - POSIX and C conformance changes
[tpg/acess2.git] / Usermode / Libraries / libposix.so_src / include_exp / utmpx.h
1 /*
2  * Acess2 POSIX Emulation
3  * - By John Hodge (thePowersGang)
4  *
5  * utmpx.h
6  * - User login records
7  */
8 #ifndef _LIBPOSIX__UTMPX_H_
9 #define _LIBPOSIX__UTMPX_H_
10
11 #include <sys/time.h>   // struct timeval
12
13 #define UTMPX_FILE      "/Acess/var/utmpx"
14
15 enum e_utmpx_type_vals
16 {
17         EMPTY,  //!< No information
18         BOOT_TIME,      //!< Identifies time of system boot
19         OLD_TIME,       //!< Old time when system time was changed
20         NEW_TIME,       //!< New time when system time was changed
21         USER_PROCESS,   //!< Any process
22         INIT_PROCESS,   //!< Process spawned by init
23         LOGIN_PROCESS,  //!< Session leader for a logged-in user
24         DEAD_PROCESS    //!< Exited session leader
25 };
26
27 #define UT_USER_MAX     32
28 #define UT_ID_MAX       8
29 #define UT_LINE_MAX     32
30
31 struct utmpx
32 {
33         char    ut_user[UT_USER_MAX];
34         char    ut_id[UT_ID_MAX];
35         char    ut_line[UT_LINE_MAX];
36         pid_t   ut_pid;
37         short   ut_type;
38         struct timeval  ut_tv;
39 };
40
41 extern void     endutxent(void);
42 extern struct utmpx     *getutxent(void);
43 extern struct utmpx     *getutxid(const struct utmpx *);
44 extern struct utmpx     *getutxline(const struct utmpx *);
45 extern struct utmpx     *pututxline(const struct utmpx *);
46 extern void     setutxent(void);
47
48 #endif
49

UCC git Repository :: git.ucc.asn.au