1*d3d3aa62Slukem /* $NetBSD: yplib_host.h,v 1.4 2009/04/19 06:06:39 lukem Exp $ */ 260aa689cSthorpej 360aa689cSthorpej /* 460aa689cSthorpej * Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com> 560aa689cSthorpej * All rights reserved. 660aa689cSthorpej * 760aa689cSthorpej * Redistribution and use in source and binary forms, with or without 860aa689cSthorpej * modification, are permitted provided that the following conditions 960aa689cSthorpej * are met: 1060aa689cSthorpej * 1. Redistributions of source code must retain the above copyright 1160aa689cSthorpej * notice, this list of conditions and the following disclaimer. 1260aa689cSthorpej * 2. Redistributions in binary form must reproduce the above copyright 1360aa689cSthorpej * notice, this list of conditions and the following disclaimer in the 1460aa689cSthorpej * documentation and/or other materials provided with the distribution. 1560aa689cSthorpej * 1660aa689cSthorpej * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 1760aa689cSthorpej * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 1860aa689cSthorpej * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1960aa689cSthorpej * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 2060aa689cSthorpej * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2160aa689cSthorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2260aa689cSthorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2360aa689cSthorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2460aa689cSthorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2560aa689cSthorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2660aa689cSthorpej * SUCH DAMAGE. 2760aa689cSthorpej */ 2860aa689cSthorpej 2960aa689cSthorpej #ifndef _YPLIB_HOST_H_ 3060aa689cSthorpej #define _YPLIB_HOST_H_ 3160aa689cSthorpej 325c90fa67Swiz int yp_match_host(CLIENT *client, char *indomain, char *inmap, 3360aa689cSthorpej const char *inkey, int inkeylen, char **outval, 345c90fa67Swiz int *outvallen); 355c90fa67Swiz int yp_first_host(CLIENT *client, char *indomain, char *inmap, 3660aa689cSthorpej char **outkey, int *outkeylen, char **outval, 375c90fa67Swiz int *outvallen); 385c90fa67Swiz int yp_next_host(CLIENT *client, char *indomain, char *inmap, 3960aa689cSthorpej char *inkey, int inkeylen, char **outkey, 405c90fa67Swiz int *outkeylen, char **outval, int *outvallen); 415c90fa67Swiz int yp_master_host(CLIENT *client, 425c90fa67Swiz char *indomain, char *inmap, char **outname); 435c90fa67Swiz int yp_order_host(CLIENT *client, 445c90fa67Swiz char *indomain, char *inmap, int *outorder); 45*d3d3aa62Slukem int yp_all_host(CLIENT *client, const char *indomain, const char *inmap, 465c90fa67Swiz struct ypall_callback *incallback); 475c90fa67Swiz int yp_maplist_host(CLIENT *client, char *indomain, 485c90fa67Swiz struct ypmaplist **outmaplist); 495c90fa67Swiz CLIENT *yp_bind_local(u_int program, u_int version); 505c90fa67Swiz CLIENT *yp_bind_host(char *server, u_int program, u_int version, 515c90fa67Swiz u_short port, int usetcp); 5260aa689cSthorpej 5360aa689cSthorpej #endif /* _YPLIB_HOST_H_ */ 54