includes/omapip/isclib.h

Go to the documentation of this file.
00001 /* isclib.h
00002 
00003    connections to the isc and dns libraries */
00004 
00005 /*
00006  * Copyright (c) 2009,2013 by Internet Systems Consortium, Inc. ("ISC")
00007  *
00008  * Permission to use, copy, modify, and distribute this software for any
00009  * purpose with or without fee is hereby granted, provided that the above
00010  * copyright notice and this permission notice appear in all copies.
00011  *
00012  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
00013  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00014  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
00015  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00016  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00017  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
00018  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00019  *
00020  *   Internet Systems Consortium, Inc.
00021  *   950 Charter Street
00022  *   Redwood City, CA 94063
00023  *   <info@isc.org>
00024  *   http://www.isc.org/
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  * DHCP context structure
00088  * This holds the libisc information for a dhcp entity
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 /* ISCLIB_H */

Generated on 5 Apr 2014 for ISC DHCP by  doxygen 1.6.1