123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- #ifndef _SYS_ACCT_H
- #define _SYS_ACCT_H 1
- #include <features.h>
- #include <endian.h>
- #define __need_time_t
- #include <time.h>
- #include <sys/types.h>
- __BEGIN_DECLS
- #define ACCT_COMM 16
- typedef u_int16_t comp_t;
- struct acct
- {
- char ac_flag;
- u_int16_t ac_uid;
- u_int16_t ac_gid;
- u_int16_t ac_tty;
- u_int32_t ac_btime;
- comp_t ac_utime;
- comp_t ac_stime;
- comp_t ac_etime;
- comp_t ac_mem;
- comp_t ac_io;
- comp_t ac_rw;
- comp_t ac_minflt;
- comp_t ac_majflt;
- comp_t ac_swaps;
- u_int32_t ac_exitcode;
- char ac_comm[ACCT_COMM+1];
- char ac_pad[10];
- };
- #if 0
- struct acct_v3
- {
- char ac_flag;
- char ac_version;
- u_int16_t ac_tty;
- u_int32_t ac_exitcode;
- u_int32_t ac_uid;
- u_int32_t ac_gid;
- u_int32_t ac_pid;
- u_int32_t ac_ppid;
- u_int32_t ac_btime;
- float ac_etime;
- comp_t ac_utime;
- comp_t ac_stime;
- comp_t ac_mem;
- comp_t ac_io;
- comp_t ac_rw;
- comp_t ac_minflt;
- comp_t ac_majflt;
- comp_t ac_swaps;
- char ac_comm[ACCT_COMM];
- };
- #endif
- enum
- {
- AFORK = 0x01,
- ASU = 0x02,
- ACORE = 0x08,
- AXSIG = 0x10
- };
- #if __BYTE_ORDER == __BIG_ENDIAN
- # define ACCT_BYTEORDER 0x80
- #else
- # define ACCT_BYTEORDER 0x00
- #endif
- #define AHZ 100
- extern int acct (const char *__filename) __THROW;
- __END_DECLS
- #endif
|