2006-01-07 Roland McGrath <roland@redhat.com>
[glibc-ports.git] / sysdeps / unix / sysv / aix / bits / utmp.h
blobb78a2afdaf162b596a884baef21db2b735f576a4
1 /* The `struct utmp' type, describing entries in the utmp file. AIX.
2 Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #ifndef _UTMP_H
21 # error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
22 #endif
24 #include <paths.h>
25 #include <sys/time.h>
26 #include <sys/types.h>
29 #define UT_LINESIZE 12
30 #define UT_NAMESIZE 8
31 #define UT_HOSTSIZE 16
34 struct utmp
36 #define ut_name ut_user
37 char ut_user[UT_NAMESIZE];
38 char ut_id[14];
39 char ut_line[UT_LINESIZE];
40 short int ut_type;
41 short int ut_pid;
42 struct exit_status
44 short int e_termination;
45 short int e_exit;
46 } ut_exit;
47 __time_t ut_time;
48 char ut_host[UT_HOSTSIZE];
52 /* Values for the `ut_type' field of a `struct utmp'. */
53 #define EMPTY 0 /* No valid user accounting information. */
55 #define RUN_LVL 1 /* The system's runlevel. */
56 #define BOOT_TIME 2 /* Time of system boot. */
57 #define OLD_TIME 3 /* Time when system clock changed. */
58 #define NEW_TIME 4 /* Time after system clock changed. */
60 #define INIT_PROCESS 5 /* Process spawned by the init process. */
61 #define LOGIN_PROCESS 6 /* Session leader of a logged in user. */
62 #define USER_PROCESS 7 /* Normal process. */
63 #define DEAD_PROCESS 8 /* Terminated process. */
65 #define ACCOUNTING 9
68 /* Tell the user that we have a modern system with UT_HOST, UT_TYPE, and
69 UT_ID fields. */
70 #define _HAVE_UT_TYPE 1
71 #define _HAVE_UT_PID 1
72 #define _HAVE_UT_ID 1
73 #define _HAVE_UT_HOST 1