update from main archive 970619
[glibc/history.git] / login / utmp-private.h
blobc5e7742a4dd03ce5ee13b25e6ed179552ca3f399
1 /* Internal definitions and declarations for UTMP functions.
2 Copyright (C) 1996 Free Software Foundation, Inc.
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.
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
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
15 Library General Public License for more details.
17 You should have received a copy of the GNU Library General Public
18 License along with the GNU C Library; see the file COPYING.LIB. If not,
19 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 #ifndef _UTMP_PRIVATE_H
23 #define _UTMP_PRIVATE_H 1
25 #include <utmp.h>
27 /* The extra `int' argument for each function shows whether locking is
28 wanted or not. */
29 struct utfuncs
31 int (*setutent) (int);
32 int (*getutent_r) (struct utmp *, struct utmp **);
33 int (*getutid_r) (const struct utmp *, struct utmp *, struct utmp **);
34 int (*getutline_r) (const struct utmp *, struct utmp *, struct utmp **);
35 struct utmp *(*pututline) (const struct utmp *);
36 void (*endutent) (void);
37 int (*updwtmp) (const char *, const struct utmp *);
40 /* The tables from the services. */
41 extern struct utfuncs __libc_utmp_file_functions;
42 extern struct utfuncs __libc_utmp_daemon_functions;
43 extern struct utfuncs __libc_utmp_unknown_functions;
45 /* Currently selected backend. */
46 extern struct utfuncs *__libc_utmp_jump_table;
48 /* Current file name. */
49 extern const char *__libc_utmp_file_name;
51 #endif /* utmp-private.h */