1 #ifndef _UTMP_H 2 #define _UTMP_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #include <utmpx.h> 9 10 #define ACCOUNTING 9 11 #define UT_NAMESIZE 32 12 #define UT_HOSTSIZE 256 13 #define UT_LINESIZE 32 14 15 struct lastlog { 16 time_t ll_time; 17 char ll_line[UT_LINESIZE]; 18 char ll_host[UT_HOSTSIZE]; 19 }; 20 21 #define ut_time ut_tv.tv_sec 22 #define ut_name ut_user 23 #define ut_addr ut_addr_v6[0] 24 #define utmp utmpx 25 #define e_exit __e_exit 26 #define e_termination __e_termination 27 28 void endutent(void); 29 struct utmp *getutent(void); 30 struct utmp *pututline(const struct utmp *); 31 void setutent(void); 32 33 int utmpname(const char *); 34 35 int login_tty(int); 36 37 #define _PATH_UTMP "/dev/null/utmp" 38 #define _PATH_WTMP "/dev/null/wtmp" 39 40 #define UTMP_FILE _PATH_UTMP 41 #define WTMP_FILE _PATH_WTMP 42 #define UTMP_FILENAME _PATH_UTMP 43 #define WTMP_FILENAME _PATH_WTMP 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif 50