Home | History | Annotate | Line # | Download | only in rpcsvc
ypclnt.h revision 1.12
      1  1.12       agc /*	$NetBSD: ypclnt.h,v 1.12 2003/12/10 12:06:25 agc Exp $	*/
      2   1.6       cgd 
      3   1.1   deraadt /*
      4   1.5   deraadt  * Copyright (c) 1992, 1993 Theo de Raadt <deraadt (at) fsa.ca>
      5   1.2   deraadt  * All rights reserved.
      6   1.2   deraadt  *
      7   1.2   deraadt  * Redistribution and use in source and binary forms, with or without
      8   1.2   deraadt  * modification, are permitted provided that the following conditions
      9   1.2   deraadt  * are met:
     10   1.2   deraadt  * 1. Redistributions of source code must retain the above copyright
     11   1.2   deraadt  *    notice, this list of conditions and the following disclaimer.
     12   1.2   deraadt  * 2. Redistributions in binary form must reproduce the above copyright
     13   1.2   deraadt  *    notice, this list of conditions and the following disclaimer in the
     14   1.2   deraadt  *    documentation and/or other materials provided with the distribution.
     15   1.2   deraadt  *
     16   1.2   deraadt  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
     17   1.2   deraadt  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     18   1.2   deraadt  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     19   1.2   deraadt  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
     20   1.2   deraadt  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     21   1.2   deraadt  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     22   1.2   deraadt  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     23   1.2   deraadt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     24   1.2   deraadt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25   1.2   deraadt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26   1.2   deraadt  * SUCH DAMAGE.
     27   1.2   deraadt  */
     28   1.2   deraadt 
     29   1.7  christos #ifndef _RPCSVC_YPCLNT_H_
     30   1.7  christos #define _RPCSVC_YPCLNT_H_
     31   1.2   deraadt 
     32   1.2   deraadt #define YPERR_BADARGS	1		/* args to function are bad */
     33   1.2   deraadt #define YPERR_RPC	2		/* RPC failure */
     34   1.2   deraadt #define YPERR_DOMAIN	3		/* can't bind to a server for domain */
     35   1.2   deraadt #define YPERR_MAP	4		/* no such map in server's domain */
     36   1.2   deraadt #define YPERR_KEY	5		/* no such key in map */
     37   1.2   deraadt #define YPERR_YPERR	6		/* some internal YP server or client error */
     38   1.2   deraadt #define YPERR_RESRC	7		/* local resource allocation failure */
     39   1.2   deraadt #define YPERR_NOMORE	8		/* no more records in map database */
     40   1.2   deraadt #define YPERR_PMAP	9		/* can't communicate with portmapper */
     41   1.2   deraadt #define YPERR_YPBIND	10		/* can't communicate with ypbind */
     42   1.2   deraadt #define YPERR_YPSERV	11		/* can't communicate with ypserv */
     43   1.2   deraadt #define YPERR_NODOM	12		/* local domain name not set */
     44   1.2   deraadt #define YPERR_BADDB	13		/* YP data base is bad */
     45   1.2   deraadt #define YPERR_VERS	14		/* YP version mismatch */
     46   1.2   deraadt #define YPERR_ACCESS	15		/* access violation */
     47   1.2   deraadt #define YPERR_BUSY	16		/* database is busy */
     48   1.1   deraadt 
     49   1.1   deraadt /*
     50   1.1   deraadt  * Types of update operations
     51   1.1   deraadt  */
     52   1.2   deraadt #define YPOP_CHANGE	1		/* change, do not add */
     53   1.2   deraadt #define YPOP_INSERT	2		/* add, do not change */
     54   1.2   deraadt #define YPOP_DELETE	3		/* delete this entry */
     55   1.2   deraadt #define YPOP_STORE 	4		/* add, or change */
     56   1.1   deraadt 
     57   1.1   deraadt struct ypall_callback {
     58   1.7  christos 	/* return non-0 to stop getting called */
     59   1.9   thorpej 	int (*foreach) __P((int, char *, int, char *, int, char *));
     60   1.2   deraadt 	char *data;		/* opaque pointer for use of callback fn */
     61   1.1   deraadt };
     62   1.1   deraadt 
     63   1.7  christos __BEGIN_DECLS
     64   1.7  christos int	yp_bind		__P((const char *));
     65   1.4   deraadt struct dom_binding;
     66   1.7  christos int	_yp_dobind	__P((const char *, struct dom_binding **));
     67   1.8  christos int	_yp_check	__P((char **));
     68   1.7  christos void	yp_unbind	__P((const char *));
     69   1.7  christos int	yp_get_default_domain __P((char **));
     70   1.8  christos struct ypmaplist;
     71   1.8  christos int	yp_maplist	__P((const char *, struct ypmaplist **));
     72   1.7  christos int	yp_match 	__P((const char *, const char *, const char *,
     73   1.7  christos 			     int , char **, int *));
     74   1.7  christos int	yp_first 	__P((const char *, const char *, char **, int *,
     75   1.7  christos 			     char **, int *));
     76   1.7  christos int	yp_next		__P((const char *, const char *, const char *,
     77   1.7  christos 			     int, char **, int *, char **, int *));
     78   1.7  christos int	yp_master	__P((const char *, const char *, char **));
     79   1.7  christos int	yp_order	__P((const char *, const char *, int *));
     80   1.7  christos int	yp_all		__P((const char *, const char *,
     81   1.7  christos 			     struct ypall_callback *));
     82   1.7  christos char *	yperr_string	__P((int));
     83  1.11     lukem int	ypprot_err	__P((unsigned int));
     84   1.7  christos __END_DECLS
     85   1.1   deraadt 
     86   1.7  christos #endif /* _RPCSVC_YPCLNT_H_ */
     87