Use this port instead of the DNS default of 53.
.TP
-\fB\-r
-Don't set the RD bit in the query - the default is yes.
+\fB\-o \fImnemonic\fR
+Use this option to set or unset specific header bits. A bit is
+set by using the bit mnemonic in CAPITAL. A bit is unset when
+the mnemonic is given in lowercase. The following mnemonics are
+understood by \fBdrill\fR:
+
+ QR, qr: set, unset QueRy (default: on)
+ AA, aa: set, unset Authoritative Answer (default: off)
+ TC, tc: set, unset TrunCated (default: off)
+ RD, rd: set, unset Recursion Desired (default: on)
+ CD, cd: set, unset Checking Disabled (default: off)
+ RA, ra: set, unset Recursion Available (default: off)
+ AD, ad: set, unset Authenticated Data (default: off)
+
+Thus: \fB-o CD\fR, will enable Checking Disabled, which instructs the
+cache to not validate the answers it gives out.
.TP
\fB\-s
fprintf(stream, "\t-c\t\tsend the query with tcp (connected)\n");
fprintf(stream, "\t-k <file>\tspecify a file that contains a trusted DNSSEC key [**]\n");
fprintf(stream, "\t\t\tused to verify any signatures in the current answer\n");
+ fprintf(stream, "\t-o <mnemonic>\t[QR|qr][AA|aa] [TC|tc] [RD|rd] [CD|cd] [RA|ra] [AD|ad]\n");
fprintf(stream, "\t-p <port>\tuse <port> as remote port number\n");
- fprintf(stream, "\t-r\t\tdon't set the RD bit in queries (default is on)\n");
fprintf(stream, "\t-s\t\tshow the DS RR for each key in a packet\n");
fprintf(stream, "\t-u\t\tsend the query with udp (the default)\n");
fprintf(stream, "\t-x\t\tdo a reverse (PTR) lookup\n");
/* string from orig drill: "i:w:I46Sk:TNp:b:DsvhVcuaq:f:xr" */
/* global first, query opt next, option with parm's last
* and sorted */
- while ((c = getopt(argc, argv, "46DITSVQf:i:w:q:achruvxzy:sp:b:k:")) != -1) {
+ while ((c = getopt(argc, argv, "46DITSVQf:i:w:q:achuvxzy:so:p:b:k:")) != -1) {
switch(c) {
/* global options */
case '4':
ldns_rr_list_push_rr(key_list, dnssec_key);
qdnssec = true; /* enable that too */
break;
+ case 'o':
+ /* only looks at the first hit: capital=ON, lowercase=OFF*/
+ if (strstr(optarg, "QR")) {
+ DRILL_ON(qflags, LDNS_QR);
+ }
+ if (strstr(optarg, "qr")) {
+ DRILL_OFF(qflags, LDNS_QR);
+ }
+ if (strstr(optarg, "AA")) {
+ DRILL_ON(qflags, LDNS_AA);
+ }
+ if (strstr(optarg, "aa")) {
+ DRILL_OFF(qflags, LDNS_AA);
+ }
+ if (strstr(optarg, "TC")) {
+ DRILL_ON(qflags, LDNS_TC);
+ }
+ if (strstr(optarg, "tc")) {
+ DRILL_OFF(qflags, LDNS_TC);
+ }
+ if (strstr(optarg, "RD")) {
+ DRILL_ON(qflags, LDNS_RD);
+ }
+ if (strstr(optarg, "rd")) {
+ DRILL_OFF(qflags, LDNS_RD);
+ }
+ if (strstr(optarg, "CD")) {
+ DRILL_ON(qflags, LDNS_CD);
+ }
+ if (strstr(optarg, "cd")) {
+ DRILL_OFF(qflags, LDNS_CD);
+ }
+ if (strstr(optarg, "RA")) {
+ DRILL_ON(qflags, LDNS_RA);
+ }
+ if (strstr(optarg, "ra")) {
+ DRILL_OFF(qflags, LDNS_RA);
+ }
+ if (strstr(optarg, "AD")) {
+ DRILL_ON(qflags, LDNS_AD);
+ }
+ if (strstr(optarg, "ad")) {
+ DRILL_OFF(qflags, LDNS_AD);
+ }
+ break;
case 'p':
qport = (uint16_t)atoi(optarg);
if (qport == 0) {
case 's':
qds = true;
break;
- case 'r':
- qflags = qflags & ~LDNS_RD;
- break;
case 'u':
qusevc = false;
break;