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