Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #ifndef _UTMPX_H |
| 2 | #define _UTMPX_H |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "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 | |
| 14 | struct 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 | |
| 32 | void endutxent(void); |
| 33 | struct utmpx *getutxent(void); |
| 34 | struct utmpx *getutxid(const struct utmpx *); |
| 35 | struct utmpx *getutxline(const struct utmpx *); |
| 36 | struct utmpx *pututxline(const struct utmpx *); |
| 37 | void 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 |