11.4Slukem/*	$NetBSD: yplib_host.h,v 1.4 2009/04/19 06:06:39 lukem Exp $	*/
21.1Sthorpej
31.1Sthorpej/*
41.1Sthorpej * Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
51.1Sthorpej * All rights reserved.
61.1Sthorpej *
71.1Sthorpej * Redistribution and use in source and binary forms, with or without
81.1Sthorpej * modification, are permitted provided that the following conditions
91.1Sthorpej * are met:
101.1Sthorpej * 1. Redistributions of source code must retain the above copyright
111.1Sthorpej *    notice, this list of conditions and the following disclaimer.
121.1Sthorpej * 2. Redistributions in binary form must reproduce the above copyright
131.1Sthorpej *    notice, this list of conditions and the following disclaimer in the
141.1Sthorpej *    documentation and/or other materials provided with the distribution.
151.1Sthorpej *
161.1Sthorpej * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
171.1Sthorpej * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
181.1Sthorpej * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
191.1Sthorpej * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
201.1Sthorpej * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
211.1Sthorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
221.1Sthorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
231.1Sthorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
241.1Sthorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
251.1Sthorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
261.1Sthorpej * SUCH DAMAGE.
271.1Sthorpej */
281.1Sthorpej
291.1Sthorpej#ifndef _YPLIB_HOST_H_
301.1Sthorpej#define _YPLIB_HOST_H_
311.1Sthorpej
321.2Swizint	yp_match_host(CLIENT *client, char *indomain, char *inmap,
331.2Swiz		      const char *inkey, int inkeylen, char **outval,
341.2Swiz		      int *outvallen);
351.2Swizint	yp_first_host(CLIENT *client, char *indomain, char *inmap,
361.2Swiz		      char **outkey, int *outkeylen, char **outval,
371.2Swiz		      int *outvallen);
381.2Swizint	yp_next_host(CLIENT *client, char *indomain, char *inmap,
391.2Swiz		     char *inkey, int inkeylen, char **outkey,
401.2Swiz		     int *outkeylen, char **outval, int *outvallen);
411.2Swizint	yp_master_host(CLIENT *client,
421.2Swiz		       char *indomain, char *inmap, char **outname);
431.2Swizint	yp_order_host(CLIENT *client,
441.2Swiz		      char *indomain, char *inmap, int *outorder);
451.4Slukemint	yp_all_host(CLIENT *client, const char *indomain, const char *inmap,
461.2Swiz		    struct ypall_callback *incallback);
471.2Swizint	yp_maplist_host(CLIENT *client, char *indomain,
481.2Swiz		        struct ypmaplist **outmaplist);
491.2SwizCLIENT *yp_bind_local(u_int program, u_int version);
501.2SwizCLIENT *yp_bind_host(char *server, u_int program, u_int version,
511.2Swiz		     u_short port, int usetcp);
521.1Sthorpej
531.1Sthorpej#endif /* _YPLIB_HOST_H_ */
54