Home | History | Annotate | Line # | Download | only in include
hesiod.h revision 1.5.10.2
      1  1.5.10.2  martin /*	$NetBSD: hesiod.h,v 1.5.10.2 2008/04/28 20:22:55 martin Exp $	*/
      2  1.5.10.2  martin 
      3  1.5.10.2  martin /*-
      4  1.5.10.2  martin  * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
      5  1.5.10.2  martin  * All rights reserved.
      6  1.5.10.2  martin  *
      7  1.5.10.2  martin  * Redistribution and use in source and binary forms, with or without
      8  1.5.10.2  martin  * modification, are permitted provided that the following conditions
      9  1.5.10.2  martin  * are met:
     10  1.5.10.2  martin  * 1. Redistributions of source code must retain the above copyright
     11  1.5.10.2  martin  *    notice, this list of conditions and the following disclaimer.
     12  1.5.10.2  martin  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.5.10.2  martin  *    notice, this list of conditions and the following disclaimer in the
     14  1.5.10.2  martin  *    documentation and/or other materials provided with the distribution.
     15  1.5.10.2  martin  *
     16  1.5.10.2  martin  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     17  1.5.10.2  martin  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     18  1.5.10.2  martin  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19  1.5.10.2  martin  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     20  1.5.10.2  martin  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21  1.5.10.2  martin  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22  1.5.10.2  martin  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23  1.5.10.2  martin  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24  1.5.10.2  martin  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25  1.5.10.2  martin  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     26  1.5.10.2  martin  * POSSIBILITY OF SUCH DAMAGE.
     27  1.5.10.2  martin  */
     28  1.5.10.2  martin 
     29  1.5.10.2  martin /*
     30  1.5.10.2  martin  * Copyright (c) 1996 by Internet Software Consortium.
     31  1.5.10.2  martin  *
     32  1.5.10.2  martin  * Permission to use, copy, modify, and distribute this software for any
     33  1.5.10.2  martin  * purpose with or without fee is hereby granted, provided that the above
     34  1.5.10.2  martin  * copyright notice and this permission notice appear in all copies.
     35  1.5.10.2  martin  *
     36  1.5.10.2  martin  * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
     37  1.5.10.2  martin  * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
     38  1.5.10.2  martin  * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
     39  1.5.10.2  martin  * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
     40  1.5.10.2  martin  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
     41  1.5.10.2  martin  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
     42  1.5.10.2  martin  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
     43  1.5.10.2  martin  * SOFTWARE.
     44  1.5.10.2  martin  */
     45  1.5.10.2  martin 
     46  1.5.10.2  martin #ifndef _HESIOD_H_
     47  1.5.10.2  martin #define _HESIOD_H_
     48  1.5.10.2  martin 
     49  1.5.10.2  martin 	/* Application-visible indication that we have the new interfaces */
     50  1.5.10.2  martin 
     51  1.5.10.2  martin #define HESIOD_INTERFACES
     52  1.5.10.2  martin 
     53  1.5.10.2  martin 	/* Configuration information. */
     54  1.5.10.2  martin 
     55  1.5.10.2  martin #ifndef _PATH_HESIOD_CONF			/* Configuration file. */
     56  1.5.10.2  martin #define _PATH_HESIOD_CONF	"/etc/hesiod.conf"
     57  1.5.10.2  martin #endif
     58  1.5.10.2  martin 
     59  1.5.10.2  martin #define DEF_RHS		""			/* Defaults if HESIOD_CONF */
     60  1.5.10.2  martin #define DEF_LHS		""			/*    file is not present. */
     61  1.5.10.2  martin 
     62  1.5.10.2  martin 	/* Error codes (for backwards compatibility) */
     63  1.5.10.2  martin 
     64  1.5.10.2  martin #define	HES_ER_UNINIT	-1	/* uninitialized */
     65  1.5.10.2  martin #define	HES_ER_OK	0	/* no error */
     66  1.5.10.2  martin #define	HES_ER_NOTFOUND	1	/* Hesiod name not found by server */
     67  1.5.10.2  martin #define HES_ER_CONFIG	2	/* local problem (no config file?) */
     68  1.5.10.2  martin #define HES_ER_NET	3	/* network problem */
     69  1.5.10.2  martin 
     70  1.5.10.2  martin 	/* Declaration of routines */
     71  1.5.10.2  martin 
     72  1.5.10.2  martin #include <sys/cdefs.h>
     73  1.5.10.2  martin 
     74  1.5.10.2  martin __BEGIN_DECLS
     75  1.5.10.2  martin int	hesiod_init	(void **);
     76  1.5.10.2  martin char  **hesiod_resolve	(void *, const char *, const char *);
     77  1.5.10.2  martin void	hesiod_free_list(void *, char **);
     78  1.5.10.2  martin char   *hesiod_to_bind	(void *, const char *, const char *);
     79  1.5.10.2  martin void	hesiod_end	(void *);
     80  1.5.10.2  martin 
     81  1.5.10.2  martin 				/* backwards compatibility */
     82  1.5.10.2  martin int	hes_init	(void);
     83  1.5.10.2  martin char   *hes_to_bind	(const char *, const char *);
     84  1.5.10.2  martin char  **hes_resolve	(const char *, const char *);
     85  1.5.10.2  martin int	hes_error	(void);
     86  1.5.10.2  martin void	hes_free	(char **);
     87  1.5.10.2  martin __END_DECLS
     88  1.5.10.2  martin 
     89  1.5.10.2  martin #endif /* ! _HESIOD_H_ */
     90