11590Srgrimes/*	$NetBSD: yplib_host.h,v 1.3 2003/12/10 12:06:26 agc Exp $	*/
239230Sgibbs
339230Sgibbs/*
439230Sgibbs * Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
539230Sgibbs * All rights reserved.
639230Sgibbs *
739230Sgibbs * Redistribution and use in source and binary forms, with or without
839230Sgibbs * modification, are permitted provided that the following conditions
939230Sgibbs * are met:
1039230Sgibbs * 1. Redistributions of source code must retain the above copyright
1139230Sgibbs *    notice, this list of conditions and the following disclaimer.
1239230Sgibbs * 2. Redistributions in binary form must reproduce the above copyright
1339230Sgibbs *    notice, this list of conditions and the following disclaimer in the
1439230Sgibbs *    documentation and/or other materials provided with the distribution.
1539230Sgibbs *
1639230Sgibbs * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
1739230Sgibbs * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1839230Sgibbs * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1939230Sgibbs * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
2039230Sgibbs * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2139230Sgibbs * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2239230Sgibbs * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2339230Sgibbs * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2439230Sgibbs * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2539230Sgibbs * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2639230Sgibbs * SUCH DAMAGE.
2739230Sgibbs */
2839230Sgibbs
291590Srgrimes#ifndef _YPLIB_HOST_H_
301590Srgrimes#define _YPLIB_HOST_H_
311590Srgrimes
321590Srgrimesint	yp_match_host(CLIENT *client, char *indomain, char *inmap,
331590Srgrimes		      const char *inkey, int inkeylen, char **outval,
341590Srgrimes		      int *outvallen);
351590Srgrimesint	yp_first_host(CLIENT *client, char *indomain, char *inmap,
361590Srgrimes		      char **outkey, int *outkeylen, char **outval,
371590Srgrimes		      int *outvallen);
381590Srgrimesint	yp_next_host(CLIENT *client, char *indomain, char *inmap,
391590Srgrimes		     char *inkey, int inkeylen, char **outkey,
401590Srgrimes		     int *outkeylen, char **outval, int *outvallen);
411590Srgrimesint	yp_master_host(CLIENT *client,
421590Srgrimes		       char *indomain, char *inmap, char **outname);
431590Srgrimesint	yp_order_host(CLIENT *client,
441590Srgrimes		      char *indomain, char *inmap, int *outorder);
451590Srgrimesint	yp_all_host(CLIENT *client, const char *indomain, const char *inmap,
461590Srgrimes		    struct ypall_callback *incallback);
471590Srgrimesint	yp_maplist_host(CLIENT *client, char *indomain,
481590Srgrimes		        struct ypmaplist **outmaplist);
491590SrgrimesCLIENT *yp_bind_local(u_int program, u_int version);
501590SrgrimesCLIENT *yp_bind_host(char *server, u_int program, u_int version,
511590Srgrimes		     u_short port, int usetcp);
521590Srgrimes
531590Srgrimes#endif /* _YPLIB_HOST_H_ */
541590Srgrimes