butmph.inc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. const
  2. UT_LINESIZE = 32;
  3. UT_NAMESIZE = 32;
  4. UT_HOSTSIZE = 256;
  5. type
  6. Plastlog = ^lastlog;
  7. lastlog = record
  8. ll_time : __time_t;
  9. ll_line : array[0..(UT_LINESIZE)-1] of char;
  10. ll_host : array[0..(UT_HOSTSIZE)-1] of char;
  11. end;
  12. Pexit_status = ^exit_status;
  13. exit_status = record
  14. e_termination : smallint;
  15. e_exit : smallint;
  16. end;
  17. Putmp = ^utmp;
  18. utmp = record
  19. ut_type : smallint;
  20. ut_pid : pid_t;
  21. ut_line : array[0..(UT_LINESIZE)-1] of char;
  22. ut_id : array[0..3] of char;
  23. ut_user : array[0..(UT_NAMESIZE)-1] of char;
  24. ut_host : array[0..(UT_HOSTSIZE)-1] of char;
  25. ut_exit : exit_status;
  26. ut_session : longint;
  27. ut_tv : timeval;
  28. ut_addr_v6 : array[0..3] of int32_t;
  29. __unused : array[0..19] of char;
  30. end;
  31. PPutmp = ^Putmp;
  32. const
  33. EMPTY = 0;
  34. RUN_LVL = 1;
  35. BOOT_TIME = 2;
  36. NEW_TIME = 3;
  37. OLD_TIME = 4;
  38. INIT_PROCESS = 5;
  39. LOGIN_PROCESS = 6;
  40. USER_PROCESS = 7;
  41. DEAD_PROCESS = 8;
  42. ACCOUNTING = 9;
  43. UT_UNKNOWN = EMPTY;
  44. _HAVE_UT_TYPE = 1;
  45. _HAVE_UT_PID = 1;
  46. _HAVE_UT_ID = 1;
  47. _HAVE_UT_TV = 1;
  48. _HAVE_UT_HOST = 1;
  49. { ---------------------------------------------------------------------
  50. Borland compatibility types
  51. ---------------------------------------------------------------------}
  52. Type
  53. TUserTmp = utmp;
  54. PUserTmp = ^TUserTmp;