Back to index

glibc  2.9
utmp-private.h
Go to the documentation of this file.
00001 /* Internal definitions and declarations for UTMP functions.
00002    Copyright (C) 1996, 2000, 2002, 2004 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004    Contributed by Ulrich Drepper <drepper@cygnus.com>
00005    and Paul Janzen <pcj@primenet.com>, 1996.
00006 
00007    The GNU C Library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Lesser General Public
00009    License as published by the Free Software Foundation; either
00010    version 2.1 of the License, or (at your option) any later version.
00011 
00012    The GNU C Library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Lesser General Public License for more details.
00016 
00017    You should have received a copy of the GNU Lesser General Public
00018    License along with the GNU C Library; if not, write to the Free
00019    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00020    02111-1307 USA.  */
00021 
00022 #ifndef _UTMP_PRIVATE_H
00023 #define _UTMP_PRIVATE_H     1
00024 
00025 #include <utmp.h>
00026 #include <bits/libc-lock.h>
00027 
00028 /* The structure describing the functions in a backend.  */
00029 struct utfuncs
00030 {
00031   int (*setutent) (void);
00032   int (*getutent_r) (struct utmp *, struct utmp **);
00033   int (*getutid_r) (const struct utmp *, struct utmp *, struct utmp **);
00034   int (*getutline_r) (const struct utmp *, struct utmp *, struct utmp **);
00035   struct utmp *(*pututline) (const struct utmp *);
00036   void (*endutent) (void);
00037   int (*updwtmp) (const char *, const struct utmp *);
00038 };
00039 
00040 /* The tables from the services.  */
00041 extern const struct utfuncs __libc_utmp_file_functions attribute_hidden;
00042 extern const struct utfuncs __libc_utmp_unknown_functions attribute_hidden;
00043 
00044 /* Currently selected backend.  */
00045 extern const struct utfuncs *__libc_utmp_jump_table attribute_hidden;
00046 
00047 /* Current file name.  */
00048 extern const char *__libc_utmp_file_name attribute_hidden;
00049 
00050 /* Locks access to the global data.  */
00051 __libc_lock_define (extern, __libc_utmp_lock attribute_hidden)
00052 
00053 
00054 #endif /* utmp-private.h */