utmp.h 889 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. struct lastlog {
  11. time_t ll_time;
  12. char ll_line[UT_LINESIZE];
  13. char ll_host[UT_HOSTSIZE];
  14. };
  15. #define ut_time ut_tv.tv_sec
  16. #define ut_name ut_user
  17. #define ut_addr ut_addr_v6[0]
  18. #define utmp utmpx
  19. #define utmpname(x) (-1)
  20. void endutent(void);
  21. struct utmp *getutent(void);
  22. struct utmp *getutid(const struct utmp *);
  23. struct utmp *getutline(const struct utmp *);
  24. struct utmp *pututline(const struct utmp *);
  25. void setutent(void);
  26. void updwtmp(const char *, const struct utmp *);
  27. #define _PATH_UTMP "/dev/null/utmp"
  28. #define _PATH_WTMP "/dev/null/wtmp"
  29. #define UTMP_FILE _PATH_UTMP
  30. #define WTMP_FILE _PATH_WTMP
  31. #define UTMP_FILENAME _PATH_UTMP
  32. #define WTMP_FILENAME _PATH_WTMP
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif