From: Miek Gieben Date: Tue, 14 Mar 2006 13:27:15 +0000 (+0000) Subject: coding style, pcat readme removed X-Git-Tag: release-1.1.0~292 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=434901ab4f2b0c253a3bb5ae4d560b0786ebfd10;p=thirdparty%2Fldns.git coding style, pcat readme removed --- diff --git a/examples/README.pcat b/examples/README.pcat deleted file mode 100644 index 7397353e..00000000 --- a/examples/README.pcat +++ /dev/null @@ -1,48 +0,0 @@ -PCAT README - -PCAT -- cat pcap streams - -1. Introduction -Pcat consists out of three programs: - 1. pcat - This program reads a raw pcap stream, extract the payload of - each packet and sends the payload to a nameserver of the users' - choice. - Each payload and reply from the server is printed to standard - output as ASCII. The binary packet/payload contents is printed - as hexadecimal in network order. - - 2. pcat-diff - This utility reads two streams/files as generated by 'pcat' it - then compare these and prints the differences to standard - output. - - The output format is simular to that of 'pcat'. - - 3. pcat-print - This program reads the 'diff' as printed by 'pcat-diff' and - tries to re-generate to original DNS packets. If this succeeds - the packet is printed to standard output. If it fails an error - is printed instead. - -2. Usage -All pcat utils are created as filters, thus they will read from a file -or standard input. All output is send to standard output. - -Send a steam to a nameserver: - ./pcat -a 213.154.224.1 20011009-134418-q50000.pkt > reply.53 - -Send the stream to another nameserver: - ./pcat -a 213.154.224.1 -p 5454 20011009-134418-q50000.pkt > reply.5454 - -The two pcat-stream, 'reply.53' and 'reply.5454' can now be diffed with -pcat-diff: - ./pcat-diff reply.53 reply.54 > reply.diff - -If we to see what actual packets that differ (if they can be parsed) we -can use pcap-print: - pcap-print reply.diff - -Or it can all be done with pipes, eliminating the need of files. -./pcat-diff <(./pcat -a 213.154.224.1 20011009-134418-q50000.pkt) \ -<(./pcat 213.154.224.1 -p 5454 20011009-134418-q50000.pkt) | ./pcat-print diff --git a/zone.c b/zone.c index 2d00ed03..a2143872 100644 --- a/zone.c +++ b/zone.c @@ -53,8 +53,7 @@ ldns_zone_push_rr_list(ldns_zone *z, ldns_rr_list *list) bool ldns_zone_push_rr(ldns_zone *z, ldns_rr *rr) { - return ldns_rr_list_push_rr( - ldns_zone_rrs(z), rr); + return ldns_rr_list_push_rr( ldns_zone_rrs(z), rr); } /* this will be an EXPENSIVE op with our zone structure */ @@ -114,8 +113,7 @@ ldns_zone_glue_rr_list(const ldns_zone *z) dname_a = ldns_rr_owner(a); if (ldns_dname_is_subdomain(dname_a, ns_owner) && - ldns_rdf_compare(dname_ns, dname_a) == 0 - ) { + ldns_rdf_compare(dname_ns, dname_a) == 0) { /* GLUE! */ ldns_rr_list_push_rr(glue, a); break; @@ -154,7 +152,8 @@ ldns_zone_new_frm_fp(FILE *fp, ldns_rdf *origin, uint16_t ttl, ldns_rr_class c) } ldns_zone * -ldns_zone_new_frm_fp_l(FILE *fp, ldns_rdf *origin, uint16_t ttl, ldns_rr_class c, int *line_nr) +ldns_zone_new_frm_fp_l(FILE *fp, ldns_rdf *origin, uint16_t ttl, ldns_rr_class c, + int *line_nr) { ldns_zone *newzone; ldns_rr *rr; @@ -261,13 +260,15 @@ ldns_zone_ixfr_del_add(ldns_zone *z, ldns_rr_list *del, ldns_rr_list *add) #endif void -ldns_zone_free(ldns_zone *zone) { +ldns_zone_free(ldns_zone *zone) +{ ldns_rr_list_free(zone->_rrs); LDNS_FREE(zone); } void -ldns_zone_deep_free(ldns_zone *zone) { +ldns_zone_deep_free(ldns_zone *zone) +{ ldns_rr_free(zone->_soa); ldns_rr_list_deep_free(zone->_rrs); LDNS_FREE(zone);