]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Hack private resolver namespace to avoid link clashes.
authorTed Lemon <source@isc.org>
Wed, 2 Feb 2000 08:01:52 +0000 (08:01 +0000)
committerTed Lemon <source@isc.org>
Wed, 2 Feb 2000 08:01:52 +0000 (08:01 +0000)
common/execute.c
common/tree.c
includes/minires/minires.h
includes/site.h
minires/Makefile.dist

index d64f889dd93b24c6ea8ab709f5b22d3e7b7dadc2..8f3a4e22112c57fa160364e0a9101b15a889045a 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: execute.c,v 1.26 2000/01/27 22:40:49 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: execute.c,v 1.27 2000/02/02 08:01:45 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -167,7 +167,7 @@ int execute_statements (packet, lease, in_options, out_options, scope,
                                                dfree (nut -> r_dname, MDL);
                                                nut -> r_dname = (char *)0;
                                        }
-                                       res_freeupdrec (nut);
+                                       minires_freeupdrec (nut);
                                }
 #endif
                        } else {
index 8958969492a0cfa47110c9b5b6101b9054d1ec22..f0dd0283e9d4cbda5ef0b7be700980d35e379174 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: tree.c,v 1.72 2000/02/02 07:22:33 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: tree.c,v 1.73 2000/02/02 08:01:45 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -471,11 +471,13 @@ int evaluate_dns_expression (result, packet, lease, in_options,
                } else
                        r2 = 0;
                if (r0 && r1 && (r2 || expr -> op != expr_ns_add)) {
-                   *result = res_mkupdrec (((expr -> op == expr_ns_add ||
-                                             expr -> op == expr_ns_delete)
-                                            ? S_UPDATE : S_PREREQ),
-                                           tname, expr -> data.ns_add.rrclass,
-                                           expr -> data.ns_add.rrtype, ttl);
+                   *result = minires_mkupdrec (((expr -> op == expr_ns_add ||
+                                                 expr -> op == expr_ns_delete)
+                                                ? S_UPDATE : S_PREREQ),
+                                               tname,
+                                               expr -> data.ns_add.rrclass,
+                                               expr -> data.ns_add.rrtype,
+                                               ttl);
                    if (!*result) {
                          ngood:
                            if (r2) {
@@ -508,7 +510,7 @@ int evaluate_dns_expression (result, packet, lease, in_options,
                                                                   MDL);
                                    if (!(*result) -> r_data) {
                                      dpngood: /* double plus ungood. */
-                                       res_freeupdrec (*result);
+                                       minires_freeupdrec (*result);
                                        *result = 0;
                                        goto ngood;
                                    }
@@ -1768,7 +1770,7 @@ int evaluate_numeric_expression (result, packet, lease,
                return 0;
 #else
                if (!inited) {
-                       res_ninit (&res);
+                       minires_ninit (&res);
                        inited = 1;
                }
                ISC_LIST_INIT (uq);
@@ -1787,7 +1789,7 @@ int evaluate_numeric_expression (result, packet, lease,
 
                /* Do the update and record the error code, if there was
                   an error; otherwise set it to NOERROR. */
-               if (res_nupdate (&res, ISC_LIST_HEAD (uq), NULL))
+               if (minires_nupdate (&res, ISC_LIST_HEAD (uq), NULL))
                        *result = NOERROR;
                else
                        /* The resolver doesn't return any actual error
@@ -1806,7 +1808,7 @@ int evaluate_numeric_expression (result, packet, lease,
                                dfree (tmp -> r_data, MDL);
                                tmp -> r_data = (char *)0;
                        }
-                       res_freeupdrec (tmp);
+                       minires_freeupdrec (tmp);
                }
                return status;
 #endif /* NSUPDATE */
index e43daaf506edafadcbc9c03d9f9c15a648fba1bb..e888720e927281c9357ff473be58b51a31c6dbd4 100644 (file)
  * <viraj_bais@ccm.fm.intel.com>
  */
 
+int minires_mkupdate (ns_updrec *, unsigned char *, unsigned);
+int minires_update (ns_updrec *);
+ns_updrec *minires_mkupdrec (int, const char *, unsigned int,
+                            unsigned int, unsigned long);
+void minires_freeupdrec (ns_updrec *);
+int minires_nmkupdate (res_state, ns_updrec *, unsigned char *, unsigned);
+int minires_nupdate (res_state, ns_updrec *, ns_tsig_key *);
+int minires_ninit (res_state);
+
+#if defined (MINIRES_LIB)
+#define res_update minires_update
+#define res_mkupdate minires_mkupdate
+#define res_mkupdrec minires_mkupdrec
+#define res_freeupdrec minires_freeupdrec
+#define res_nmkupdate minires_nmkupdate
+#define res_nupdate minires_nupdate
+#define __p_type_syms MR__p_type_syms
+#define dn_comp MRdn_comp
+#define loc_aton MRloc_aton
+#define sym_ston MRsym_ston
+#define res_buildservicelist MRres_buildservicelist
+#define res_destroyservicelist MRres_destroyservicelist
+#define res_buildprotolist MRres_buildprotolist
+#define res_destroyprotolist MRres_destroyprotolist
+#define res_servicenumber MRres_servicenumber
+#define res_protocolnumber MRres_protocolnumber
+#define res_protocolname MRres_protocolname
+#define res_servicename MRres_servicename
+#define ns_datetosecs MRns_datetosecs
+#define b64_pton MRb64_pton
+#define res_ninit minires_ninit
+#define res_randomid MRres_randomid
+#define res_findzonecut MRres_findzonecut
+#define res_nsend MRres_nsend
+#define res_nsendsigned MRres_nsendsigned
+#define ns_samename MRns_samename
+#define res_nameinquery MRres_nameinquery
+#define res_queriesmatch MRres_queriesmatch
+#define dn_expand MRdn_expand
+#define ns_get16 MRns_get16
+#define res_close MRres_close
+#define res_nclose MRres_nclose
+#define res_ourserver_p MRres_ourserver_p
+#define ns_sign MRns_sign
+#define p_class MRp_class
+#define p_section MRp_section
+#define ns_makecanon MRns_makecanon
+#define ns_parserr MRns_parserr
+#define ns_samedomain MRns_samedomain
+#define ns_name_uncompress MRns_name_uncompress
+#define res_nmkquery MRres_nmkquery
+#define ns_initparse MRns_initparse
+#define res_nquery MRres_nquery
+#define res_nsearch MRres_nsearch
+#define res_hostalias MRres_hostalias
+#define res_nquerydomain MRres_nquerydomain
+#define ns_skiprr MRns_skiprr
+#define dn_skipname MRdn_skipname
+#define ns_name_ntol MRns_name_ntol
+#define ns_sign_tcp_init MRns_sign_tcp_init
+#define ns_sign_tcp MRns_sign_tcp
+#define ns_name_ntop MRns_name_ntop
+#define ns_name_pton MRns_name_pton
+#define ns_name_unpack MRns_name_unpack
+#define ns_name_pack MRns_name_pack
+#define ns_name_compress MRns_name_compress
+#define ns_name_skip MRns_name_skip
+#define ns_subdomain MRns_subdomain
+#define ns_find_tsig MRns_find_tsig
+#define ns_verify MRns_verify
+#define ns_verify_tcp_init MRns_verify_tcp_init
+#define ns_verify_tcp MRns_verify_tcp
+#define b64_ntop MRb64_ntop
+
 extern const struct res_sym __p_type_syms[];
 extern time_t cur_time;
 
@@ -43,7 +117,6 @@ const char *res_protocolname(int);
 const char *res_servicename(u_int16_t, const char *);
 u_int32_t ns_datetosecs (const char *cp, int *errp);
 int b64_pton (char const *, unsigned char *, size_t);
-int res_ninit (res_state);
 unsigned int res_randomid (void);
 int res_findzonecut (res_state, const char *, ns_class, int,
                     char *, size_t, struct in_addr *, int);
@@ -84,13 +157,6 @@ const char *res_hostalias (const res_state, const char *, char *, size_t);
 int res_nquerydomain(res_state, const char *, const char *,
                     ns_class class, ns_class type, unsigned char *, unsigned);
 
-int res_mkupdate (ns_updrec *, unsigned char *, unsigned);
-int res_update (ns_updrec *);
-ns_updrec *res_mkupdrec (int, const char *, unsigned int,
-                        unsigned int, unsigned long);
-void res_freeupdrec (ns_updrec *);
-int res_nmkupdate (res_state, ns_updrec *, unsigned char *, unsigned);
-int res_nupdate (res_state, ns_updrec *, ns_tsig_key *);
 int ns_skiprr(const unsigned char *, const unsigned char *, ns_sect, int);
 int dn_skipname (const unsigned char *, const unsigned char *);
 u_int32_t getULong (const unsigned char *);
@@ -135,3 +201,4 @@ int b64_ntop (unsigned char const *, size_t, char *, size_t);
 #define DPRINTF(x)
 
 #define USE_MD5
+#endif
index dc38922e44ea6309d5cbad6fbc162a01d645007f..fe396353f1fd6c2c505fc5defd1dc050f2571125 100644 (file)
 /* Define this if you want to track memory usage for the purpose of
    noticing memory leaks quickly. */
 
-/* #define DEBUG_MEMORY_LEAKAGE */
+#define DEBUG_MEMORY_LEAKAGE
 
 /* Define this if you want exhaustive (and very slow) checking of the
    malloc pool for corruption. */
 
-/* #define DEBUG_MALLOC_POOL */
+#define DEBUG_MALLOC_POOL
 
 /* Define this if you want to maintain a history of the last N operations
    that changed reference counts on objects.   This can be used to debug
    cases where an object is dereferenced too often, or not often enough. */
 
-/* #define DEBUG_RC_HISTORY */
+#define DEBUG_RC_HISTORY
 
+/* Define this if you want to see the history every cycle. */
+
+/* #define DEBUG_RC_HISTORY_EXHAUSTIVELY */
 /* This is the number of history entries to maintain - by default, 256. */
 
-/* #define RC_HISTORY_MAX 1024 */
+#define RC_HISTORY_MAX 1024
 
 /* Define this if you want dhcpd to dump core when a non-fatal memory
    allocation error is detected (i.e., something that would cause a
    memory leak rather than a memory smash). */
 
-/* #define POINTER_DEBUG */
+#define POINTER_DEBUG
 
 /* Define this if you want debugging output for DHCP failover protocol
    messages. */
index 62177f34803517d0ade80d27c083e57a93a2574c..cb9a9e4e6fe25a7c4aea26d4b72e522f8958815d 100644 (file)
@@ -30,7 +30,7 @@ OBJ    = res_mkupdate.o res_init.o res_update.o res_send.o res_comp.o \
 
 DEBUG  = -g
 INCLUDES = $(BINDINC) -I../includes
-CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) -DHMAC_MD5
+CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) -DHMAC_MD5 -DMINIRES_LIB
 
 all:   libres.a