3 connections to the isc and dns libraries */
6 * Copyright (c) 2009-2019 by Internet Systems Consortium, Inc. ("ISC")
8 * This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
13 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
18 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 * Internet Systems Consortium, Inc.
22 * Redwood City, CA 94063
37 #include <sys/types.h>
38 #include <sys/socket.h>
40 #include <netinet/in.h>
42 #include <arpa/inet.h>
51 #include <isc/boolean.h>
54 #include <isc/buffer.h>
59 #include <isc/parseint.h>
60 #include <isc/socket.h>
61 #include <isc/sockaddr.h>
63 #include <isc/timer.h>
65 #include <isc/random.h>
67 #include <irs/resconf.h>
69 #include <dns/client.h>
70 #include <dns/fixedname.h>
71 #include <dns/keyvalues.h>
74 #include <dns/rdata.h>
75 #include <dns/rdataclass.h>
76 #include <dns/rdatalist.h>
77 #include <dns/rdataset.h>
78 #include <dns/rdatastruct.h>
79 #include <dns/rdatatype.h>
80 #include <dns/result.h>
81 #include <dns/secalg.h>
90 * DHCP context structure
91 * This holds the libisc information for a dhcp entity
94 typedef struct dhcp_context
{
97 int actx_started
; // ISC_TRUE if ctxstart has been called
98 int actx_running
; // ISC_TRUE if ctxrun has been called
99 isc_taskmgr_t
*taskmgr
;
101 isc_socketmgr_t
*socketmgr
;
102 isc_timermgr_t
*timermgr
;
103 #if defined (NSUPDATE)
104 dns_client_t
*dnsclient
;
106 isc_sockaddr_t local4_sockaddr
;
108 isc_sockaddr_t local6_sockaddr
;
112 extern dhcp_context_t dhcp_gbl_ctx
;
114 #define DHCP_MAXDNS_WIRE 256
116 #define DHCP_HMAC_MD5_NAME "HMAC-MD5.SIG-ALG.REG.INT."
117 #define DHCP_HMAC_SHA1_NAME "HMAC-SHA1.SIG-ALG.REG.INT."
118 #define DHCP_HMAC_SHA224_NAME "HMAC-SHA224.SIG-ALG.REG.INT."
119 #define DHCP_HMAC_SHA256_NAME "HMAC-SHA256.SIG-ALG.REG.INT."
120 #define DHCP_HMAC_SHA384_NAME "HMAC-SHA384.SIG-ALG.REG.INT."
121 #define DHCP_HMAC_SHA512_NAME "HMAC-SHA512.SIG-ALG.REG.INT."
123 isc_result_t
dhcp_isc_name(unsigned char *namestr
,
124 dns_fixedname_t
*namefix
,
128 isclib_make_dst_key(char *inname
,
130 unsigned char *secret
,
134 #define DHCP_CONTEXT_PRE_DB 1
135 #define DHCP_CONTEXT_POST_DB 2
136 #define DHCP_DNS_CLIENT_LAZY_INIT 4
137 isc_result_t
dhcp_context_create(int flags
,
138 struct in_addr
*local4
,
139 struct in6_addr
*local6
);
140 void isclib_cleanup(void);
142 void dhcp_signal_handler(int signal
);
143 extern int shutdown_signal
;
145 #if defined (NSUPDATE)
146 isc_result_t
dns_client_init();
147 #endif /* defined NSUPDATE */
150 #endif /* ISCLIB_H */