1 /* The `struct utmp' type, describing entries in the utmp file. GNU version.
2 Copyright (C) 1993, 1996 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
16 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
25 #include <sys/types.h>
27 #define _PATH_UTMP "/var/run/utmp"
28 #define _PATH_WTMP "/var/log/wtmp"
29 #define _PATH_LASTLOG "/var/log/lastlog"
31 #define UT_UNKNOWN 0 /* for ut_type field */
38 #define INIT_PROCESS 5
39 #define LOGIN_PROCESS 6
40 #define USER_PROCESS 7
41 #define DEAD_PROCESS 8
43 #define UT_LINESIZE 32
44 #define UT_NAMESIZE 32
45 #define UT_HOSTSIZE 256
52 char ll_line
[UT_LINESIZE
];
53 char ll_host
[UT_HOSTSIZE
];
58 short int ut_type
; /* Type of login. */
59 pid_t ut_pid
; /* Pid of login process. */
60 char ut_line
[UT_LINESIZE
]; /* NUL-terminated devicename of tty. */
61 char ut_id
[4]; /* Inittab id. */
62 char ut_user
[UT_NAMESIZE
]; /* Username (not NUL terminated). */
63 #define ut_name ut_user /* Compatible field name for same. */
64 char ut_host
[UT_HOSTSIZE
]; /* Hostname for remote login. */
65 int ut_exit
; /* Process termination/exit status. */
66 long ut_session
; /* Session ID, used for windowing. */
67 struct timeval ut_tv
; /* Time entry was made. */
68 int32_t ut_addr
; /* Internet address of remote host. */
69 char pad
[32]; /* Reserved for future use. */
72 #define ut_time ut_tv.tv_sec /* Backwards compatibility. */
74 /* Tell the user that we have a modern system with UT_HOST, UT_TYPE, UT_ID
76 #define _HAVE_UT_TYPE 1
79 #define _HAVE_UT_HOST 1
83 #endif /* !_UTMP_H_ */