]>
git.saurik.com Git - apple/libc.git/blob - gen/utmpx-darwin.h
2 * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * "Portions Copyright (c) 2004 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.0 (the 'License'). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
26 #define UTMP_COMPAT_UTMP0 0x01
27 #define UTMP_COMPAT_UTMP1 0x02
28 #define UTMP_COMPAT_WTMP 0x04
29 #define UTMP_COMPAT_LASTLOG 0x08
30 #endif /* UTMP_COMPAT */
32 #define LASTLOG_FACILITY "com.apple.system.lastlog"
33 #define UTMPX_FACILITY "com.apple.system.utmpx"
35 extern int utfile_system
; /* are we using _PATH_UTMPX? */
38 #define __need_struct_timeval32
42 * these structures assume natural alignment so they are the same size
43 * and layout as their 32-bit counterpart
48 char ll_line
[UT_LINESIZE
];
49 char ll_host
[UT_HOSTSIZE
];
53 char ut_line
[UT_LINESIZE
];
54 char ut_name
[UT_NAMESIZE
];
55 char ut_host
[UT_HOSTSIZE
];
58 #endif /* UTMP_COMPAT */
61 char ut_user
[_UTX_USERSIZE
]; /* login name */
62 char ut_id
[_UTX_IDSIZE
]; /* id */
63 char ut_line
[_UTX_LINESIZE
]; /* tty name */
64 pid_t ut_pid
; /* process id creating the entry */
65 short ut_type
; /* type of this entry */
66 struct timeval32 ut_tv
; /* time entry was created */
67 char ut_host
[_UTX_HOSTSIZE
]; /* host name */
68 __uint32_t ut_pad
[16]; /* reserved for future use */
72 struct utmpx
*_pututxline(const struct utmpx
*);
74 void _utmpx32_64(const struct utmpx32
*, struct utmpx
*);
75 void _utmpx64_32(const struct utmpx
*, struct utmpx32
*);
77 void _utmpx_asl(const struct utmpx
*);
78 const struct utmpx
*_utmpx_working_copy(const struct utmpx
*, struct utmpx
*, int);
82 void _getutmp32(const struct utmpx
*, struct utmp32
*);
83 int _utmp_compat(const struct utmpx
*, struct utmp32
*);
84 void _write_lastlog(const struct utmp32
*, const struct utmpx
*);
85 void _write_utmp(const struct utmp32
*, int);
87 int _utmp_compat(const struct utmpx
*, struct utmp
*);
88 void _write_lastlog(const struct utmp
*, const struct utmpx
*);
89 void _write_utmp(const struct utmp
*, int);
91 void _write_utmp_compat(const struct utmpx
*);
93 void _write_wtmp(const struct utmp32
*);
95 void _write_wtmp(const struct utmp
*);
97 #endif /* UTMP_COMPAT */