1
0

utmp.h 974 B

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