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 _UTMPX_H
- #define _UTMPX_H
- #ident "@(#)sgs-head:common/head/utmpx.h 1.11"
-
- /*
- * Copyright (c) 1982, 1986, 1988
- * The Regents of the University of California
- * All Rights Reserved.
- * Portions of this document are derived from
- * software developed by the University of
- * California, Berkeley, and its contributors.
- */
-
- /*******************************************************************
-
- PROPRIETARY NOTICE (Combined)
-
- This source code is unpublished proprietary information
- constituting, or derived under license from AT&T's UNIX(r) System V.
- In addition, portions of such source code were derived from Berkeley
- 4.3 BSD under license from the Regents of the University of
- California.
-
-
-
- Copyright Notice
-
- Notice of copyright on this source code product does not indicate
- publication.
-
- (c) 1986,1987,1988,1989 Sun Microsystems, Inc
- (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
- All rights reserved.
- ********************************************************************/
-
- #include <sys/types.h>
- #include <utmp.h>
-
- #if !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE_EXTENDED - 0 < 1
- #define UTMPX_FILE "/var/adm/utmpx"
- #define WTMPX_FILE "/var/adm/wtmpx"
- #define MOD_WIN 10
- #endif
-
- #ifndef _TIMEVAL_STR
- #define _TIMEVAL_STR
- struct timeval {
- long tv_sec; /* seconds */
- long tv_usec; /* and microseconds */
- };
- #endif
-
- struct utmpx {
- char ut_user[32]; /* user login name */
- char ut_id[4]; /* inittab id */
- char ut_line[32]; /* device name (console, lnxx) */
- pid_t ut_pid; /* process id */
- short ut_type; /* type of entry */
- struct ut_exit_status ut_exit; /* process termination/exit status */
- struct timeval ut_tv; /* time entry was made */
- long ut_session; /* session ID, used for windowing */
- long ut_pad[5]; /* reserved for future use */
- short ut_syslen; /* significant length of ut_host */
- /* including terminating null */
- char ut_host[257]; /* remote host name */
- };
-
- #define ut_xtime ut_tv.tv_sec
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern void endutxent(void);
- struct utmpx *getutxent(void);
- struct utmpx *getutxid(const struct utmpx *);
- struct utmpx *getutxline(const struct utmpx *);
- struct utmpx *pututxline(const struct utmpx *);
- extern void setutxent(void);
-
- #if !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE_EXTENDED - 0 < 1
-
- extern int utmpxname(const char *);
- struct utmpx *makeutx(struct utmpx *);
- struct utmpx *modutx(const struct utmpx *);
- extern void getutmp(const struct utmpx *, struct utmp *);
- extern void getutmpx(const struct utmp *, struct utmpx *);
- extern void updwtmp(const char *, struct utmp *);
- extern void updwtmpx(const char *, struct utmpx *);
-
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /*_UTMPX_H*/
-
-
-
-