utmp.h 724 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 utmp utmpx
  18. #define utmpname(x) (-1)
  19. void endutent(void);
  20. struct utmp *getutent(void);
  21. struct utmp *getutid(const struct utmp *);
  22. struct utmp *getutline(const struct utmp *);
  23. struct utmp *pututline(const struct utmp *);
  24. void setutent(void);
  25. void updwtmp(const char *, const struct utmp *);
  26. #define _PATH_UTMP "/dev/null"
  27. #define _PATH_WTMP "/dev/null"
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif