1 /* The `struct utmp' type, describing entries in the utmp file. GNU version.
2 Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
26 #include <sys/types.h>
29 #define UT_UNKNOWN 0 /* for ut_type field */
36 #define INIT_PROCESS 5
37 #define LOGIN_PROCESS 6
38 #define USER_PROCESS 7
39 #define DEAD_PROCESS 8
42 #define UT_LINESIZE 32
43 #define UT_NAMESIZE 32
44 #define UT_HOSTSIZE 256
51 char ll_line
[UT_LINESIZE
];
52 char ll_host
[UT_HOSTSIZE
];
56 /* XXX We are not ready to use this now. It needs some more research.
57 Simly copying the behaviour of other implementations is no big
60 /* Which program created the record. */
73 /* More could be added here. */
80 short int e_termination
; /* Process termination status. */
81 short int e_exit
; /* Process exit status. */
87 short int ut_type
; /* Type of login. */
88 pid_t ut_pid
; /* Pid of login process. */
89 char ut_line
[UT_LINESIZE
]; /* NUL-terminated devicename of tty. */
90 char ut_id
[4]; /* Inittab id. */
91 char ut_user
[UT_NAMESIZE
]; /* Username (not NUL terminated). */
92 #define ut_name ut_user /* Compatible field name for same. */
93 char ut_host
[UT_HOSTSIZE
]; /* Hostname for remote login. */
94 struct exit_status ut_exit
; /* The exit status of a process marked
96 long ut_session
; /* Session ID, used for windowing. */
97 struct timeval ut_tv
; /* Time entry was made. */
98 int32_t ut_addr_v6
[4]; /* Internet address of remote host. */
99 char pad
[20]; /* Reserved for future use. */
102 /* Backwards compatibility hacks. */
104 /* We have a problem here: `ut_time' is also used otherwise. Define
105 _NO_UT_TIME if the compiler complains. */
106 # define ut_time ut_tv.tv_sec
108 #define ut_xtime ut_tv.tv_sec
109 #define ut_addr ut_addr_v6[0]
111 /* Tell the user that we have a modern system with UT_HOST, UT_PID,
112 UT_TYPE, UT_ID and UT_TV fields. */
113 #define _HAVE_UT_TYPE 1
114 #define _HAVE_UT_PID 1
115 #define _HAVE_UT_ID 1
116 #define _HAVE_UT_TV 1
117 #define _HAVE_UT_HOST 1
121 #endif /* !_UTMP_H_ */