]>
Commit | Line | Data |
---|---|---|
8a523922 | 1 | /* Internal definitions and declarations for UTMP functions. |
04277e02 | 2 | Copyright (C) 1996-2019 Free Software Foundation, Inc. |
8a523922 UD |
3 | This file is part of the GNU C Library. |
4 | Contributed by Ulrich Drepper <drepper@cygnus.com> | |
5 | and Paul Janzen <pcj@primenet.com>, 1996. | |
6 | ||
7 | The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
8 | modify it under the terms of the GNU Lesser General Public |
9 | License as published by the Free Software Foundation; either | |
10 | version 2.1 of the License, or (at your option) any later version. | |
8a523922 UD |
11 | |
12 | The GNU C Library is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 15 | Lesser General Public License for more details. |
8a523922 | 16 | |
41bdb6e2 | 17 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 PE |
18 | License along with the GNU C Library; if not, see |
19 | <http://www.gnu.org/licenses/>. */ | |
8a523922 UD |
20 | |
21 | #ifndef _UTMP_PRIVATE_H | |
22 | #define _UTMP_PRIVATE_H 1 | |
23 | ||
24 | #include <utmp.h> | |
ec999b8e | 25 | #include <libc-lock.h> |
8a523922 | 26 | |
8f2ece69 | 27 | /* The structure describing the functions in a backend. */ |
8a523922 UD |
28 | struct utfuncs |
29 | { | |
8f2ece69 | 30 | int (*setutent) (void); |
8a523922 UD |
31 | int (*getutent_r) (struct utmp *, struct utmp **); |
32 | int (*getutid_r) (const struct utmp *, struct utmp *, struct utmp **); | |
33 | int (*getutline_r) (const struct utmp *, struct utmp *, struct utmp **); | |
34 | struct utmp *(*pututline) (const struct utmp *); | |
35 | void (*endutent) (void); | |
76b87c03 | 36 | int (*updwtmp) (const char *, const struct utmp *); |
8a523922 UD |
37 | }; |
38 | ||
76b87c03 | 39 | /* The tables from the services. */ |
b2637a22 UD |
40 | extern const struct utfuncs __libc_utmp_file_functions attribute_hidden; |
41 | extern const struct utfuncs __libc_utmp_unknown_functions attribute_hidden; | |
76b87c03 UD |
42 | |
43 | /* Currently selected backend. */ | |
b2637a22 | 44 | extern const struct utfuncs *__libc_utmp_jump_table attribute_hidden; |
76b87c03 UD |
45 | |
46 | /* Current file name. */ | |
ab26a24a | 47 | extern const char *__libc_utmp_file_name attribute_hidden; |
76b87c03 | 48 | |
abe7b661 RM |
49 | /* Locks access to the global data. */ |
50 | __libc_lock_define (extern, __libc_utmp_lock attribute_hidden) | |
51 | ||
52 | ||
8a523922 | 53 | #endif /* utmp-private.h */ |