Back to index

glibc  2.9
nss.h
Go to the documentation of this file.
00001 /* Copyright (C) 1996, 1997, 1999, 2008 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 /* Define interface to NSS.  This is meant for the interface functions
00020    and for implementors of new services.  */
00021 
00022 #ifndef _NSS_H
00023 #define _NSS_H       1
00024 
00025 #include <features.h>
00026 #include <stdint.h>
00027 
00028 
00029 __BEGIN_DECLS
00030 
00031 /* Possible results of lookup using a nss_* function.  */
00032 enum nss_status
00033 {
00034   NSS_STATUS_TRYAGAIN = -2,
00035   NSS_STATUS_UNAVAIL,
00036   NSS_STATUS_NOTFOUND,
00037   NSS_STATUS_SUCCESS,
00038   NSS_STATUS_RETURN
00039 };
00040 
00041 
00042 /* Data structure used for the 'gethostbyname4_r' function.  */
00043 struct gaih_addrtuple
00044   {
00045     struct gaih_addrtuple *next;
00046     char *name;
00047     int family;
00048     uint32_t addr[4];
00049     uint32_t scopeid;
00050   };
00051 
00052 
00053 /* Overwrite service selection for database DBNAME using specification
00054    in STRING.
00055    This function should only be used by system programs which have to
00056    work around non-existing services (e.e., while booting).
00057    Attention: Using this function repeatedly will slowly eat up the
00058    whole memory since previous selection data cannot be freed.  */
00059 extern int __nss_configure_lookup (__const char *__dbname,
00060                                __const char *__string) __THROW;
00061 
00062 __END_DECLS
00063 
00064 #endif /* nss.h */