utmp.h 998 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 e_exit __e_exit
  21. #define e_termination __e_termination
  22. void endutent(void);
  23. struct utmp *getutent(void);
  24. struct utmp *getutid(const struct utmp *);
  25. struct utmp *getutline(const struct utmp *);
  26. struct utmp *pututline(const struct utmp *);
  27. void setutent(void);
  28. void updwtmp(const char *, const struct utmp *);
  29. int utmpname(const char *);
  30. int login_tty(int);
  31. #define _PATH_UTMP "/dev/null/utmp"
  32. #define _PATH_WTMP "/dev/null/wtmp"
  33. #define UTMP_FILE _PATH_UTMP
  34. #define WTMP_FILE _PATH_WTMP
  35. #define UTMP_FILENAME _PATH_UTMP
  36. #define WTMP_FILENAME _PATH_WTMP
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif