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