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