etc/protocols - sync with NetBSD-8
[minix.git] / external / bsd / dhcp / dist / includes / omapip / isclib.h
blobbfff58f067b5733adb752c01ba17c930ed54b2ee
1 /* $NetBSD: isclib.h,v 1.1.1.2 2014/07/12 11:57:57 spz Exp $ */
2 /* isclib.h
4 connections to the isc and dns libraries */
6 /*
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.
22 * 950 Charter Street
23 * Redwood City, CA 94063
24 * <info@isc.org>
25 * http://www.isc.org/
29 #ifndef ISCLIB_H
30 #define ISCLIB_H
32 #include "config.h"
34 #include <syslog.h>
36 #define MAXWIRE 256
38 #include <sys/types.h>
39 #include <sys/socket.h>
41 #include <netinet/in.h>
43 #include <arpa/inet.h>
45 #include <unistd.h>
46 #include <ctype.h>
47 #include <stdio.h>
48 #include <stdlib.h>
49 #include <string.h>
50 #include <netdb.h>
52 #include <isc/buffer.h>
53 #include <isc/lex.h>
54 #include <isc/lib.h>
55 #include <isc/app.h>
56 #include <isc/mem.h>
57 #include <isc/parseint.h>
58 #include <isc/socket.h>
59 #include <isc/sockaddr.h>
60 #include <isc/task.h>
61 #include <isc/timer.h>
62 #include <isc/heap.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>
70 #include <dns/lib.h>
71 #include <dns/name.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>
80 #include <dns/tsec.h>
82 #include <dst/dst.h>
84 #include "result.h"
88 * DHCP context structure
89 * This holds the libisc information for a dhcp entity
92 typedef struct dhcp_context {
93 isc_mem_t *mctx;
94 isc_appctx_t *actx;
95 int actx_started;
96 isc_taskmgr_t *taskmgr;
97 isc_task_t *task;
98 isc_socketmgr_t *socketmgr;
99 isc_timermgr_t *timermgr;
100 #if defined (NSUPDATE)
101 dns_client_t *dnsclient;
102 #endif
103 } dhcp_context_t;
105 extern dhcp_context_t dhcp_gbl_ctx;
107 #define DHCP_MAXDNS_WIRE 256
108 #define DHCP_MAXNS 3
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,
113 dns_name_t **name);
115 isc_result_t
116 isclib_make_dst_key(char *inname,
117 char *algorithm,
118 unsigned char *secret,
119 int length,
120 dst_key_t **dstkey);
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 */