Home | History | Annotate | Line # | Download | only in ypserv
      1 /*	$NetBSD: ypserv.h,v 1.6 2008/04/28 20:24:18 martin Exp $	*/
      2 
      3 /*-
      4  * Copyright (c) 1996 The NetBSD Foundation, Inc.
      5  * All rights reserved.
      6  *
      7  * This code is derived from software contributed to The NetBSD Foundation
      8  * by Jason R. Thorpe.
      9  *
     10  * Redistribution and use in source and binary forms, with or without
     11  * modification, are permitted provided that the following conditions
     12  * are met:
     13  * 1. Redistributions of source code must retain the above copyright
     14  *    notice, this list of conditions and the following disclaimer.
     15  * 2. Redistributions in binary form must reproduce the above copyright
     16  *    notice, this list of conditions and the following disclaimer in the
     17  *    documentation and/or other materials provided with the distribution.
     18  *
     19  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29  * POSSIBILITY OF SUCH DAMAGE.
     30  */
     31 
     32 struct ypresp_all {
     33 	bool_t more;
     34 	union {
     35 		struct ypresp_key_val val;
     36 	} ypresp_all_u;
     37 };
     38 
     39 extern	int _yp_invalid_domain(const char *);	/* from libc */
     40 	int _yp_invalid_map(const char *);
     41 
     42 void	*ypproc_null_2_svc(void *, struct svc_req *);
     43 void	*ypproc_domain_2_svc(void *, struct svc_req *);
     44 void	*ypproc_domain_nonack_2_svc(void *, struct svc_req *);
     45 void	*ypproc_match_2_svc(void *, struct svc_req *);
     46 void	*ypproc_first_2_svc(void *, struct svc_req *);
     47 void	*ypproc_next_2_svc(void *, struct svc_req *);
     48 void	*ypproc_xfr_2_svc(void *, struct svc_req *);
     49 void	*ypproc_clear_2_svc(void *, struct svc_req *);
     50 void	*ypproc_all_2_svc(void *, struct svc_req *);
     51 void	*ypproc_master_2_svc(void *, struct svc_req *);
     52 void	*ypproc_order_2_svc(void *, struct svc_req *);
     53 void	*ypproc_maplist_2_svc(void *, struct svc_req *);
     54 
     55 bool_t	xdr_ypresp_all(XDR *, struct ypresp_all *);
     56 
     57 struct ypresp_val ypdb_get_record(const char *, const char *, datum, int);
     58 struct ypresp_key_val ypdb_get_first(const char *, const char *, int);
     59 struct ypresp_key_val ypdb_get_next(const char *, const char *, datum, int);
     60 struct ypresp_order ypdb_get_order(const char *, const char *);
     61 struct ypresp_master ypdb_get_master(const char *, const char *);
     62 
     63 void	ypdb_close_all(void);
     64 void	ypdb_init(void);
     65 int	ypdb_secure(const char *, const char *);
     66 bool_t	ypdb_xdr_get_all(XDR *, struct ypreq_nokey *);
     67 
     68 #ifdef LIBWRAP
     69 /* from ypserv.c */
     70 extern	int lflag;
     71 extern	int allow_severity;
     72 extern	const char *clientstr;
     73 #endif
     74