home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
- *
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
- * SANTA CRUZ OPERATION INC.
- *
- * The copyright notice above does not evidence any actual or intended
- * publication of such source code.
- */
-
- #ifndef _UTMP_H
- #define _UTMP_H
- #ident "@(#)sgs-head:common/head/utmp.h 1.5.2.6"
-
- /* This header is included by <utmpx.h> for XPG4 V2 */
-
- #include <sys/types.h>
-
- struct ut_exit_status {
- short ut_e_termination; /* Process termination status */
- short ut_e_exit; /* Process exit status */
- };
-
- #if !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE_EXTENDED - 0 < 1
-
- #define UTMP_FILE "/var/adm/utmp"
- #define WTMP_FILE "/var/adm/wtmp"
-
- struct utmp {
- char ut_user[8]; /* User login name */
- char ut_id[4]; /* /etc/inittab id(usually line #) */
- char ut_line[12]; /* device name (console, lnxx) */
- #if #machine(m88k)
- pid_t ut_pid; /* OCS 1.0 - process id */
- #else
- short ut_pid; /* for compatiblity - process id */
- #endif
- short ut_type; /* type of entry */
- #if #machine(m88k)
- short ut_pad; /* OCS 1.0 */
- #endif
- struct ut_exit_status ut_exit; /* The exit status of a process
- * marked as DEAD_PROCESS.
- */
- time_t ut_time; /* time entry was made */
- #if #machine(m88k)
- char ut_host[24]; /* host name, if remote OCS 1.0 */
- #endif
- };
-
- #define exit_status ut_exit_status
- #define e_exit ut_e_exit
- #define e_termination ut_e_termination
-
- #endif /* !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE_EXTENDED - 0 < 1*/
-
- #define ut_name ut_user
-
- /* Definitions for ut_type */
-
- #define EMPTY 0
- #define BOOT_TIME 2
- #define OLD_TIME 3
- #define NEW_TIME 4
- #define INIT_PROCESS 5 /* Process spawned by "init" */
- #define LOGIN_PROCESS 6 /* A "getty" process waiting for login */
- #define USER_PROCESS 7 /* A user process */
- #define DEAD_PROCESS 8
-
- #if !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE_EXTENDED - 0 < 1
-
- #define RUN_LVL 1
- #define ACCOUNTING 9
-
- #if #machine(m88k)
- #define FTP 128
- #define REMOTE_LOGIN 129
- #define REMOTE_PROCESS 130
- #define UTMAXTYPE REMOTE_PROCESS /* Largest legal value of ut_type */
- #else
- #define UTMAXTYPE ACCOUNTING /* Largest legal value of ut_type */
- #endif
-
- /* Special strings or formats used in the "ut_line" field when */
- /* accounting for something other than a process. */
- /* No string for the ut_line field can be more than 11 chars + */
- /* a NULL in length. */
-
- #define RUNLVL_MSG "run-level %c"
- #define BOOT_MSG "system boot"
- #define OTIME_MSG "old time"
- #define NTIME_MSG "new time"
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern void endutent(void);
- struct utmp *getutent(void);
- struct utmp *getutid(const struct utmp *);
- struct utmp *getutline(const struct utmp *);
- struct utmp *pututline(const struct utmp *);
- extern void setutent(void);
- extern int utmpname(const char *);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE_EXTENDED - 0 < 1*/
-
- #endif /*_UTMP_H*/
-