Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:37

0001 /* Copyright (C) 1996-2014 Free Software Foundation, Inc.
0002    This file is part of the GNU C Library.
0003    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
0004 
0005    The GNU C Library is free software; you can redistribute it and/or
0006    modify it under the terms of the GNU Lesser General Public
0007    License as published by the Free Software Foundation; either
0008    version 2.1 of the License, or (at your option) any later version.
0009 
0010    The GNU C Library is distributed in the hope that it will be useful,
0011    but WITHOUT ANY WARRANTY; without even the implied warranty of
0012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013    Lesser General Public License for more details.
0014 
0015    You should have received a copy of the GNU Lesser General Public
0016    License along with the GNU C Library; if not, see
0017    <http://www.gnu.org/licenses/>.  */
0018 
0019 
0020 #ifndef __RPCSVC_YPCLNT_H__
0021 #define __RPCSVC_YPCLNT_H__
0022 
0023 /* Some defines */
0024 #define YPERR_SUCCESS   0       /* There is no error */
0025 #define YPERR_BADARGS   1       /* Args to function are bad */
0026 #define YPERR_RPC   2       /* RPC failure */
0027 #define YPERR_DOMAIN    3       /* Can't bind to a server with this domain */
0028 #define YPERR_MAP   4       /* No such map in server's domain */
0029 #define YPERR_KEY   5       /* No such key in map */
0030 #define YPERR_YPERR 6       /* Internal yp server or client error */
0031 #define YPERR_RESRC 7       /* Local resource allocation failure */
0032 #define YPERR_NOMORE    8       /* No more records in map database */
0033 #define YPERR_PMAP  9       /* Can't communicate with portmapper */
0034 #define YPERR_YPBIND    10      /* Can't communicate with ypbind */
0035 #define YPERR_YPSERV    11      /* Can't communicate with ypserv */
0036 #define YPERR_NODOM 12      /* Local domain name not set */
0037 #define YPERR_BADDB 13      /* yp data base is bad */
0038 #define YPERR_VERS  14      /* YP version mismatch */
0039 #define YPERR_ACCESS    15      /* Access violation */
0040 #define YPERR_BUSY  16      /* Database is busy */
0041 
0042 /* Types of update operations */
0043 #define YPOP_CHANGE 1       /* Change, do not add */
0044 #define YPOP_INSERT 2       /* Add, do not change */
0045 #define YPOP_DELETE 3       /* Delete this entry */
0046 #define YPOP_STORE  4       /* Add, or change */
0047 
0048 #ifdef  __cplusplus
0049 extern "C" {
0050 #endif
0051 
0052 /* struct ypall_callback * is the arg which must be passed to yp_all.  */
0053 struct ypall_callback
0054   {
0055     int (*foreach) (int __status, char *__key, int __keylen,
0056             char *__val, int __vallen, char *__data);
0057     char *data;
0058   };
0059 
0060 /* External NIS client function references.  */
0061 extern int yp_bind (const char *);
0062 extern void yp_unbind (const char *);
0063 extern int yp_get_default_domain (char **);
0064 extern int yp_match (const char *, const char *, const char *,
0065              const int, char **, int *);
0066 extern int yp_first (const char *, const char *, char **,
0067              int *, char **, int *);
0068 extern int yp_next (const char *, const char *, const char *,
0069             const int, char **, int *, char **, int *);
0070 extern int yp_master (const char *, const char *, char **);
0071 extern int yp_order (const char *, const char *, unsigned int *);
0072 extern int yp_all (const char *, const char *,
0073            const struct ypall_callback *);
0074 extern const char *yperr_string (const int);
0075 extern const char *ypbinderr_string (const int);
0076 extern int ypprot_err (const int);
0077 extern int yp_update (char *, char *, unsigned int,  char *,
0078               int, char *, int);
0079 
0080 #if 0
0081 extern int yp_maplist (const char *, struct ypmaplist **);
0082 #endif
0083 
0084 /* This functions exists only under BSD and Linux systems.  */
0085 extern int __yp_check (char **);
0086 
0087 #ifdef  __cplusplus
0088 }
0089 #endif
0090 
0091 #endif  /* __RPCSVC_YPCLNT_H__ */