123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- #ifndef _UTMP_H
- # error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
- #endif
- #include <paths.h>
- #include <sys/time.h>
- #include <sys/types.h>
- #define UT_LINESIZE 32
- #define UT_NAMESIZE 32
- #define UT_HOSTSIZE 256
- struct lastlog
- {
- __time_t ll_time;
- char ll_line[UT_LINESIZE];
- char ll_host[UT_HOSTSIZE];
- };
- struct exit_status
- {
- short int e_termination;
- short int e_exit;
- };
- struct utmp
- {
- 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;
- long int ut_session;
- struct timeval ut_tv;
- int32_t ut_addr_v6[4];
- char __unused[20];
- };
- #define ut_name ut_user
- #ifndef _NO_UT_TIME
- # define ut_time ut_tv.tv_sec
- #endif
- #define ut_xtime ut_tv.tv_sec
- #define ut_addr ut_addr_v6[0]
- #define EMPTY 0
- #define RUN_LVL 1
- #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
- #define ACCOUNTING 9
- #define UT_UNKNOWN EMPTY
- #define _HAVE_UT_TYPE 1
- #define _HAVE_UT_PID 1
- #define _HAVE_UT_ID 1
- #define _HAVE_UT_TV 1
- #define _HAVE_UT_HOST 1
|