Back to index

glibc  2.9
ypclnt.h
Go to the documentation of this file.
00001 /* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 
00021 #ifndef       __RPCSVC_YPCLNT_H__
00022 #define       __RPCSVC_YPCLNT_H__
00023 
00024 #include <features.h>
00025 
00026 /* Some defines */
00027 #define YPERR_SUCCESS       0             /* There is no error */
00028 #define       YPERR_BADARGS 1             /* Args to function are bad */
00029 #define       YPERR_RPC     2             /* RPC failure */
00030 #define       YPERR_DOMAIN  3             /* Can't bind to a server with this domain */
00031 #define       YPERR_MAP     4             /* No such map in server's domain */
00032 #define       YPERR_KEY     5             /* No such key in map */
00033 #define       YPERR_YPERR   6             /* Internal yp server or client error */
00034 #define       YPERR_RESRC   7             /* Local resource allocation failure */
00035 #define       YPERR_NOMORE  8             /* No more records in map database */
00036 #define       YPERR_PMAP    9             /* Can't communicate with portmapper */
00037 #define       YPERR_YPBIND  10            /* Can't communicate with ypbind */
00038 #define       YPERR_YPSERV  11            /* Can't communicate with ypserv */
00039 #define       YPERR_NODOM   12            /* Local domain name not set */
00040 #define       YPERR_BADDB   13            /* yp data base is bad */
00041 #define       YPERR_VERS    14            /* YP version mismatch */
00042 #define       YPERR_ACCESS  15            /* Access violation */
00043 #define       YPERR_BUSY    16            /* Database is busy */
00044 
00045 /* Types of update operations */
00046 #define       YPOP_CHANGE   1             /* Change, do not add */
00047 #define       YPOP_INSERT   2             /* Add, do not change */
00048 #define       YPOP_DELETE   3             /* Delete this entry */
00049 #define       YPOP_STORE    4             /* Add, or change */
00050 
00051 __BEGIN_DECLS
00052 
00053 /* struct ypall_callback * is the arg which must be passed to yp_all.  */
00054 struct ypall_callback
00055   {
00056     int (*foreach) (int __status, char *__key, int __keylen,
00057                   char *__val, int __vallen, char *__data);
00058     char *data;
00059   };
00060 
00061 /* External NIS client function references.  */
00062 extern int yp_bind (__const char *) __THROW;
00063 extern void yp_unbind (__const char *) __THROW;
00064 extern int yp_get_default_domain (char **) __THROW;
00065 extern int yp_match (__const char *, __const char *, __const char *,
00066                    __const int, char **, int *) __THROW;
00067 extern int yp_first (__const char *, __const char *, char **,
00068                    int *, char **, int *) __THROW;
00069 extern int yp_next (__const char *, __const char *, __const char *,
00070                   __const int, char **, int *, char **, int *) __THROW;
00071 extern int yp_master (__const char *, __const char *, char **) __THROW;
00072 extern int yp_order (__const char *, __const char *, unsigned int *) __THROW;
00073 extern int yp_all (__const char *, __const char *,
00074                  __const struct ypall_callback *) __THROW;
00075 extern __const char *yperr_string (__const int) __THROW;
00076 extern __const char *ypbinderr_string (__const int) __THROW;
00077 extern int ypprot_err (__const int) __THROW;
00078 extern int yp_update (char *, char *, unsigned int,  char *,
00079                     int, char *, int) __THROW;
00080 #if 0
00081 extern int yp_maplist (__const char *, struct ypmaplist **) __THROW;
00082 #endif
00083 
00084 /* This functions exists only under BSD and Linux systems.  */
00085 extern int __yp_check (char **) __THROW;
00086 
00087 __END_DECLS
00088 
00089 #endif /* __RPCSVC_YPCLNT_H__ */