]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
doc update, added make snaphost target
authorMiek Gieben <miekg@NLnetLabs.nl>
Tue, 15 Feb 2005 09:32:06 +0000 (09:32 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Tue, 15 Feb 2005 09:32:06 +0000 (09:32 +0000)
Makefile.in
doc/overview
rdata.c
run-test1.c

index a6767c2add83d5e60a8e87c52cbb4f7b6fa3526d..6d9f62f2ec9ce9bf42549b47047417d5ef29ab6f 100644 (file)
@@ -13,6 +13,7 @@ CFLAGS                = @CFLAGS@
 LDFLAGS                = @LDFLAGS@
 LIBS           = @LIBS@
 LIBOBJS                = @LIBOBJS@
+DATE           = $(shell date +%Y%m%d)
 
 LINT           = splint
 LINTFLAGS      = +quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t 
@@ -54,6 +55,12 @@ LINK         = $(CC) $(CFLAGS) $(LDFLAGS)
 all:   run-test0 run-test1 run-test2 run-test3 run-test4 run-test5 run-test6 run-test7\
        run-test8
 
+snapshot:      clean testclean
+               (rm -rf ../ldns-snap-$(DATE)/)
+               (cd .. ; cp -r libdns/ ldns-snap-$(DATE)/)
+               (cd .. ; tar --verbose  --exclude ".svn" --create --file ldns-snap-$(DATE).tar.gz --gzip ldns-snap-$(DATE)/)
+               (rm -rf ../ldns-snap-$(DATE)/)
+
 run-test0:     run-test0.o $(LIBDNS_OBJECTS) $(LIBOBJS)
                $(LINK) ${LIBS} -o $@ $+
 
@@ -91,8 +98,13 @@ clean:
        rm -f run-test2
        rm -rf autom4te.cache/
        rm -f aclocal.m4
+       rm -f config.status
+       rm -f config.log
 
-realclean: clean docclean
+testclean:
+       rm -f run-test?
+
+realclean: clean docclean testclean
        rm -f config.status
        rm -f config.log
        rm -f Makefile
@@ -117,8 +129,16 @@ test4: run-test4
        ./run-test4
 test5: run-test5
        ./run-test5
+test6: run-test6
+       ./run-test6
+test7: run-test7
+       ./run-test7
+test7: run-test8
+       ./run-test8
+
+test: test0 test1 test2 test3 test4 test5 test6 test7 test8
 
-test: test0 test1 test2 test3 test4 test5
+## No need for changes here
 
 lint:
        for i in $(ALL_SOURCES); do \
index 083a5b679d6bc4e0713727ca47e367f4297f4f63..9dc233643cc62a7beaffc5de1dcc0d6a7f65861a 100644 (file)
@@ -20,6 +20,9 @@ ldns - Overview document
     for instance sign(key, rrlist, **sig) and verify(key, rrlist, sig)
     will be defined.
   o DNSSEC is optional as it depends on OpenSSL
+  o IF and rdf is LDNS_RDF_TYPE_DNAME then the dname inside it is
+    always terminated with 00 (the root label). I.e. all dname are
+    stored as absolute domain names.
 
 2. Different parts of ldns:
 
diff --git a/rdata.c b/rdata.c
index 89ef60d2d5f68dfb4baaa109f2b58f1fc4608b53..bd4798fdec437150b2e5ef6b6908f5d11fdb7bb8 100644 (file)
--- a/rdata.c
+++ b/rdata.c
@@ -252,7 +252,7 @@ ldns_rdf_dname_label_count(ldns_rdf *r)
 
                /* single root label */
                if (1 == r_size) {
-                       return 1;
+                       return 0;
                } else {
                        while ((len > 0) && src_pos < r_size) {
                                src_pos++;
@@ -265,32 +265,6 @@ ldns_rdf_dname_label_count(ldns_rdf *r)
        }
 }
 
-/** 
- * test wether the dname is absolute or not, ie.
- * if it ends in a dot
- * \param[in] *r the rdf
- * \return true if abs. otherwise false.
- */
-/* a name is absolute if the last byte of the 
- * dname data is 00
- * THIS FUNCTION DOES NOT WORK NEED DISCUSSION
- */
-bool
-ldns_rdf_dname_absolute(ldns_rdf *r)
-{
-       /* hmmm, XXX do I need tristate */
-       if (ldns_rdf_get_type(r) != LDNS_RDF_TYPE_DNAME) {
-               return false;
-       }
-       printf("char [%c]\n\n", (ldns_rdf_data(r)[ldns_rdf_size(r)]));
-       printf("size [%d]\n\n", ldns_rdf_size(r));
-       
-       if (ldns_rdf_data(r)[ldns_rdf_size(r)] == '\0') {
-               return true;
-       }
-       return false;
-}
-
 /**
  * free a rdf structure _and_ free the
  * data. rdf should be created with _new_frm_data
index d3e62a15e2c192dea8d4865b08f60ae85a905607..e45025ccba6764df9e6028fc038f0355c86d767f 100644 (file)
@@ -51,31 +51,24 @@ doit(void)
        /* test the label counter */
        cnt_test = ldns_rdf_new_frm_str("miek.nl.", LDNS_RDF_TYPE_DNAME);
        printf("Labels miek.nl. %d\n", ldns_rdf_dname_label_count(cnt_test));
-       printf("absolute %d\n\n", ldns_rdf_dname_absolute(cnt_test));
 
        cnt_test = ldns_rdf_new_frm_str("miek.nl", LDNS_RDF_TYPE_DNAME);
        printf("Labels miek.nl %d\n", ldns_rdf_dname_label_count(cnt_test));
-       printf("absolute %d\n\n", ldns_rdf_dname_absolute(cnt_test));
        
        cnt_test = ldns_rdf_new_frm_str("miek", LDNS_RDF_TYPE_DNAME);
        printf("Labels miek %d\n", ldns_rdf_dname_label_count(cnt_test));
-       printf("absolute %d\n\n", ldns_rdf_dname_absolute(cnt_test));
        
        cnt_test = ldns_rdf_new_frm_str(".", LDNS_RDF_TYPE_DNAME);
        printf("Labels . %d\n", ldns_rdf_dname_label_count(cnt_test));
-       printf("absolute %d\n\n", ldns_rdf_dname_absolute(cnt_test));
        
        cnt_test = ldns_rdf_new_frm_str(".www.miek.nl.", LDNS_RDF_TYPE_DNAME);
        printf("Labels .www.miek.nl. %d\n", ldns_rdf_dname_label_count(cnt_test));
-       printf("absolute %d\n\n", ldns_rdf_dname_absolute(cnt_test));
 
        cnt_test = ldns_rdf_new_frm_str("www.miek.nl.", LDNS_RDF_TYPE_DNAME);
        printf("Labels www.miek.nl. %d\n", ldns_rdf_dname_label_count(cnt_test));
-       printf("absolute %d\n\n", ldns_rdf_dname_absolute(cnt_test));
 
        cnt_test = ldns_rdf_new_frm_str("nl", LDNS_RDF_TYPE_DNAME);
        printf("Labels nl %d\n", ldns_rdf_dname_label_count(cnt_test));
-       printf("absolute %d\n\n", ldns_rdf_dname_absolute(cnt_test));
 }