utmp.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* The `struct utmp' type, describing entries in the utmp file. Generic/BSDish
  2. Copyright (C) 1993-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef _UTMP_H
  16. # error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
  17. #endif
  18. #include <paths.h>
  19. #include <time.h>
  20. #define UT_NAMESIZE 8
  21. #define UT_LINESIZE 8
  22. #define UT_HOSTSIZE 16
  23. struct lastlog
  24. {
  25. time_t ll_time;
  26. char ll_line[UT_LINESIZE];
  27. char ll_host[UT_HOSTSIZE];
  28. };
  29. struct utmp
  30. {
  31. char ut_line[UT_LINESIZE];
  32. char ut_user[UT_NAMESIZE];
  33. #define ut_name ut_user
  34. char ut_host[UT_HOSTSIZE];
  35. long int ut_time;
  36. };
  37. #define _HAVE_UT_HOST 1 /* We have the ut_host field. */