Update.
[glibc.git] / login / programs / xtmp.h
blob25949ef6dd3ed3b615d29dc3d0a3d8023bdf79be
1 /* The `struct xtmp' type, describing the old linux utmp format.
2 Copyright (C) 1997 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public
17 License along with the GNU C Library; see the file COPYING.LIB. If not,
18 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 #ifndef _XTMP_H
22 #define _XTMP_H 1
24 #include <sys/time.h>
25 #include <sys/types.h>
28 #define XT_LINESIZE 12
29 #define XT_NAMESIZE 8
30 #define XT_HOSTSIZE 16
32 struct xtmp
34 short int xt_type; /* Type of login. */
35 pid_t xt_pid; /* Pid of login process. */
36 char xt_line[XT_LINESIZE]; /* NUL-terminated devicename of tty. */
37 char xt_id[4]; /* Inittab id. */
38 time_t xt_time; /* Time entry was made. */
39 char xt_user[XT_NAMESIZE]; /* Username (not NUL terminated). */
40 char xt_host[XT_HOSTSIZE]; /* Hostname for remote login. */
41 long xt_addr; /* Internet adress of remote host. */
44 #define _HAVE_XT_TYPE 1
45 #define _HAVE_XT_PID 1
46 #define _HAVE_XT_ID 1
47 #define _HAVE_XT_HOST 1
50 extern void xtmp_to_utmp (const struct xtmp *xtmp, struct utmp *utmp);
51 extern void utmp_to_xtmp (const struct utmp *utmp, struct xtmp *xtmp);
52 extern int compare_entry (const struct utmp *xtmp,
53 const struct utmp *utmp);
55 #endif /* xtmp.h */