00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef ISCLIB_H
00029 #define ISCLIB_H
00030
00031 #include "config.h"
00032
00033 #include <syslog.h>
00034
00035 #define MAXWIRE 256
00036
00037 #include <sys/types.h>
00038 #include <sys/socket.h>
00039
00040 #include <netinet/in.h>
00041
00042 #include <arpa/inet.h>
00043
00044 #include <unistd.h>
00045 #include <ctype.h>
00046 #include <stdio.h>
00047 #include <stdlib.h>
00048 #include <string.h>
00049 #include <netdb.h>
00050
00051 #include <isc/buffer.h>
00052 #include <isc/lex.h>
00053 #include <isc/lib.h>
00054 #include <isc/app.h>
00055 #include <isc/mem.h>
00056 #include <isc/parseint.h>
00057 #include <isc/socket.h>
00058 #include <isc/sockaddr.h>
00059 #include <isc/task.h>
00060 #include <isc/timer.h>
00061 #include <isc/heap.h>
00062 #include <isc/random.h>
00063
00064 #include <irs/resconf.h>
00065
00066 #include <dns/client.h>
00067 #include <dns/fixedname.h>
00068 #include <dns/keyvalues.h>
00069 #include <dns/lib.h>
00070 #include <dns/name.h>
00071 #include <dns/rdata.h>
00072 #include <dns/rdataclass.h>
00073 #include <dns/rdatalist.h>
00074 #include <dns/rdataset.h>
00075 #include <dns/rdatastruct.h>
00076 #include <dns/rdatatype.h>
00077 #include <dns/result.h>
00078 #include <dns/secalg.h>
00079 #include <dns/tsec.h>
00080
00081 #include <dst/dst.h>
00082
00083 #include "result.h"
00084
00085
00086
00087
00088
00089
00090
00091 typedef struct dhcp_context {
00092 isc_mem_t *mctx;
00093 isc_appctx_t *actx;
00094 int actx_started;
00095 isc_taskmgr_t *taskmgr;
00096 isc_task_t *task;
00097 isc_socketmgr_t *socketmgr;
00098 isc_timermgr_t *timermgr;
00099 #if defined (NSUPDATE)
00100 dns_client_t *dnsclient;
00101 #endif
00102 } dhcp_context_t;
00103
00104 extern dhcp_context_t dhcp_gbl_ctx;
00105
00106 #define DHCP_MAXDNS_WIRE 256
00107 #define DHCP_MAXNS 3
00108 #define DHCP_HMAC_MD5_NAME "HMAC-MD5.SIG-ALG.REG.INT."
00109
00110 isc_result_t dhcp_isc_name(unsigned char *namestr,
00111 dns_fixedname_t *namefix,
00112 dns_name_t **name);
00113
00114 isc_result_t
00115 isclib_make_dst_key(char *inname,
00116 char *algorithm,
00117 unsigned char *secret,
00118 int length,
00119 dst_key_t **dstkey);
00120
00121 #define DHCP_CONTEXT_PRE_DB 1
00122 #define DHCP_CONTEXT_POST_DB 2
00123 isc_result_t dhcp_context_create(int flags,
00124 struct in_addr *local4,
00125 struct in6_addr *local6);
00126 void isclib_cleanup(void);
00127
00128 void dhcp_signal_handler(int signal);
00129 extern int shutdown_signal;
00130
00131 #endif