123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #ifndef _UTMPX_H
- # error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead."
- #endif
- #include <bits/types.h>
- #include <sys/time.h>
- #include <bits/wordsize.h>
- #ifdef __USE_GNU
- # include <paths.h>
- # define _PATH_UTMPX _PATH_UTMP
- # define _PATH_WTMPX _PATH_WTMP
- #endif
- #define __UT_LINESIZE 32
- #define __UT_NAMESIZE 32
- #define __UT_HOSTSIZE 256
- struct __exit_status
- {
- #ifdef __USE_GNU
- short int e_termination;
- short int e_exit;
- #else
- short int __e_termination;
- short int __e_exit;
- #endif
- };
- struct utmpx
- {
- short int ut_type;
- __pid_t ut_pid;
- char ut_line[__UT_LINESIZE];
- char ut_id[4];
- char ut_user[__UT_NAMESIZE];
- char ut_host[__UT_HOSTSIZE];
- struct __exit_status ut_exit;
- #ifdef __WORDSIZE_TIME64_COMPAT32
- __int32_t ut_session;
- struct
- {
- __int32_t tv_sec;
- __int32_t tv_usec;
- } ut_tv;
- #else
- long int ut_session;
- struct timeval ut_tv;
- #endif
- __int32_t ut_addr_v6[4];
- char __unused[20];
- };
- #define EMPTY 0
- #ifdef __USE_GNU
- # define RUN_LVL 1
- #endif
- #define BOOT_TIME 2
- #define NEW_TIME 3
- #define OLD_TIME 4
- #define INIT_PROCESS 5
- #define LOGIN_PROCESS 6
- #define USER_PROCESS 7
- #define DEAD_PROCESS 8
- #ifdef __USE_GNU
- # define ACCOUNTING 9
- #endif
|