1 /* $NetBSD: isclib.h,v 1.1.1.2 2014/07/12 11:57:57 spz Exp $ */
4 connections to the isc and dns libraries */
7 * Copyright (c) 2009,2013 by Internet Systems Consortium, Inc. ("ISC")
9 * Permission to use, copy, modify, and distribute this software for any
10 * purpose with or without fee is hereby granted, provided that the above
11 * copyright notice and this permission notice appear in all copies.
13 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
19 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 * Internet Systems Consortium, Inc.
23 * Redwood City, CA 94063
38 #include <sys/types.h>
39 #include <sys/socket.h>
41 #include <netinet/in.h>
43 #include <arpa/inet.h>
52 #include <isc/buffer.h>
57 #include <isc/parseint.h>
58 #include <isc/socket.h>
59 #include <isc/sockaddr.h>
61 #include <isc/timer.h>
63 #include <isc/random.h>
65 #include <irs/resconf.h>
67 #include <dns/client.h>
68 #include <dns/fixedname.h>
69 #include <dns/keyvalues.h>
72 #include <dns/rdata.h>
73 #include <dns/rdataclass.h>
74 #include <dns/rdatalist.h>
75 #include <dns/rdataset.h>
76 #include <dns/rdatastruct.h>
77 #include <dns/rdatatype.h>
78 #include <dns/result.h>
79 #include <dns/secalg.h>
88 * DHCP context structure
89 * This holds the libisc information for a dhcp entity
92 typedef struct dhcp_context
{
96 isc_taskmgr_t
*taskmgr
;
98 isc_socketmgr_t
*socketmgr
;
99 isc_timermgr_t
*timermgr
;
100 #if defined (NSUPDATE)
101 dns_client_t
*dnsclient
;
105 extern dhcp_context_t dhcp_gbl_ctx
;
107 #define DHCP_MAXDNS_WIRE 256
109 #define DHCP_HMAC_MD5_NAME "HMAC-MD5.SIG-ALG.REG.INT."
111 isc_result_t
dhcp_isc_name(unsigned char *namestr
,
112 dns_fixedname_t
*namefix
,
116 isclib_make_dst_key(char *inname
,
118 unsigned char *secret
,
122 #define DHCP_CONTEXT_PRE_DB 1
123 #define DHCP_CONTEXT_POST_DB 2
124 isc_result_t
dhcp_context_create(int flags
,
125 struct in_addr
*local4
,
126 struct in6_addr
*local6
);
127 void isclib_cleanup(void);
129 void dhcp_signal_handler(int signal
);
130 extern int shutdown_signal
;
132 #endif /* ISCLIB_H */