-date : 0.71: ldns-team
+XX Sep 2005: 0.80: ldns-team
* License change: ldns is now BSD licensed
* Networking code cleanup, added server udp/tcp support
* Zonefile parsing was added
- * Lua binding were created
+ * Lua binding were created
+ * [tools] Drill was added to ldns - see drill/
+ * [tools] signer was added
28 Jul 2005: 0.70: ldns-team
* [func] ldns_pkt_get_section now returns copies from the rrlists
if (argc != 2) {
usage(stdout, argv[0]);
- exit(1);
+ exit(EXIT_FAILURE);
} else {
/* create a rdf from the command line arg */
name = ldns_dname_new_frm_str(argv[1]);
if (!name) {
usage(stdout, argv[0]);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
/* create a new resolver from /etc/resolv.conf */
res = ldns_resolver_new_frm_file(NULL);
if (!res) {
- exit(1);
+ exit(EXIT_FAILURE);
}
ldns_resolver_set_retry(res, 1); /* don't want to wait too long */
addr = ldns_get_rr_list_addr_by_name(res, name, LDNS_RR_CLASS_IN, LDNS_RD);
if (!addr) {
fprintf(stderr, " *** could not get an address for %s\n", argv[1]);
- exit(1);
+ exit(EXIT_FAILURE);
}
remove_nameservers(res);
(void)ldns_resolver_pop_nameserver(res);
}
- exit(0);
- return 0;
+ exit(EXIT_SUCCESS);
}
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
-AC_INIT(libdns, 0.70, libdns@nlnetlabs.nl, libdns)
+AC_INIT(libdns, 0.80, libdns@nlnetlabs.nl, libdns)
AC_CONFIG_SRCDIR([packet.c])
OURCPPFLAGS='-ansi -pedantic -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600'
+--------- Drill now is a subdirectory in ldns. To make life easier
+--------- we are using ldns' version numbering for drill from now on.
+--------- Sadly this means we GO BACKWARDS in the versions
+--------- This ChangeLog will not be updated anymore - all changes are
+--------- documented in ldns' ChangeLog
+
1.0-pre3: to be released: drill-team
* Secure tracing works
* Added section about DNSSEC in the manual page
QUICK INSTALL GUIDE
-* First install ldns
- http://www.nlnetlabs.nl/ldns
+drill is a subdirectory in ldns.
- and follow the instructions
+To compile drill you need:
+autoreconf && ./configure --with-ldns=../ && make
-* Now configure drill and compile it:
- autoreconf && ./configure --with-ldns && make
+when ldns isn't installed on the system, or:
- or --with-ldns=<path>, also see ./configure --help
+autoreconf && ./configure --with-ldns && make
+
+when ldns is installed. Also see ./configure --help
+
+In the first case you must run drill as:
+LD_LIBRARY_PATH=../.libs ./drill <options>
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
-AC_INIT(drill, 1.0-pre3, drill@nlnetlabs.nl, drill1.0-pre)
+AC_INIT(drill, 0.80, drill@nlnetlabs.nl, drill)
AC_CONFIG_SRCDIR([drill_util.h])
AC_AIX
case 'D':
if (algorithm != 0) {
fprintf(stderr, "%s: %s", prog, "Only one -D or -A is allowed\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
algorithm = LDNS_SIGN_DSA;
break;
case 'R':
if (algorithm != 0) {
fprintf(stderr, "%s: %s", prog, "Only one -D or -A is allowed\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
algorithm = LDNS_SIGN_RSASHA1;
break;
break;
default:
usage(stderr, prog);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
argc -= optind;
if (argc != 1) {
usage(stderr, prog);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* create an rdf from the domain name */
/* print the priv key to stderr */
ldns_key_print(stderr, key);
- return 0;
+ exit(EXIT_SUCCESS);
}
if (argc != 2) {
usage(stdout, argv[0]);
- exit(1);
+ exit(EXIT_FAILURE);
} else {
/* create a rdf from the command line arg */
domain = ldns_dname_new_frm_str(argv[1]);
if (!domain) {
usage(stdout, argv[0]);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
res = ldns_resolver_new_frm_file(NULL);
if (!res) {
- exit(1);
+ exit(EXIT_FAILURE);
}
/* use the resolver to send it a query for the mx
ldns_rdf_deep_free(domain);
if (!p) {
- exit(1);
+ exit(EXIT_FAILURE);
} else {
/* retrieve the MX records from the answer section of that
* packet
argv[1], argv[1]);
ldns_pkt_free(p);
ldns_resolver_deep_free(res);
- exit(1);
+ exit(EXIT_FAILURE);
} else {
/* sort the list nicely */
/* ldns_rr_list_sort(mx); */
#define DATE_FORMAT "%Y%m%d%H%M%S"
#define SHORT_DATE_FORMAT "%Y%m%d"
-int
+void
usage(FILE *fp, const char *prog) {
fprintf(fp, "%s [OPTIONS] <zonefile> <keyfile(s)>\n", prog);
fprintf(fp, " signs the zone with the given private key\n");
fprintf(fp, "\t\t\tdates can be in YYYYMMDD[HHmmSS] format or timestamps\n");
fprintf(fp, " -o <domain>\t\torigin for the zone\n");
fprintf(fp, "keys and keysigning keys (-k option) can be given multiple times\n");
- return 0;
}
int
if (ldns_str2rdf_dname(&origin, optarg) != LDNS_STATUS_OK) {
fprintf(stderr, "Bad origin, not a correct domain name\n");
usage(stderr, prog);
- exit(1);
+ exit(EXIT_FAILURE);
}
break;
default:
- return usage(stderr, prog);
+ usage(stderr, prog);
+ exit(EXIT_SUCCESS);
}
}
if (argc < 2) {
usage(stdout, prog);
- exit(1);
+ exit(EXIT_FAILURE);
} else {
zonefile_name = argv[0];
}
if (!zonefile) {
fprintf(stderr, "Error: unable to read %s (%s)\n", zonefile_name, strerror(errno));
- exit(1);
+ exit(EXIT_FAILURE);
} else {
orig_zone = ldns_zone_new_frm_fp_l(zonefile, origin, ttl, class, &line_nr);
if (!orig_zone) {
fprintf(stderr, "Zone not read, parse error at %s line %u\n", zonefile_name, line_nr);
- exit(1);
+ exit(EXIT_FAILURE);
} else {
orig_soa = ldns_zone_soa(orig_zone);
if (!orig_soa) {
fprintf(stderr, "Error reading zonefile: missing SOA record\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
orig_rrs = ldns_zone_rrs(orig_zone);
if (!orig_rrs) {
fprintf(stderr, "Error reading zonefile: no resource records\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
}
fclose(zonefile);
if (ldns_key_list_key_count(keys) < 1) {
fprintf(stderr, "Error: no keys to sign with. Aborting.\n\n");
usage(stderr, prog);
- return 1;
+ exit(EXIT_FAILURE);
}
/* read the KSKs */
ldns_zone_deep_free(signed_zone);
} else {
fprintf(stderr, "Error signing zone.");
+ exit(EXIT_FAILURE);
}
ldns_key_list_free(keys);
ldns_zone_deep_free(orig_zone);
LDNS_FREE(key_signing_key_filenames);
- return 0;
+ exit(EXIT_SUCCESS);
}