getdns_query option for APPEND_NAME_TO_SINGLE_LABEL_FIRST

This commit is contained in:
Willem Toorop 2016-03-23 23:31:23 +01:00
parent e7c77290cc
commit 0d66f91c91
1 changed files with 6 additions and 1 deletions

View File

@ -518,7 +518,8 @@ print_usage(FILE *out, const char *progname)
fprintf(out, "\t-S\tservice lookup (<type> is ignored)\n");
fprintf(out, "\t-t <timeout>\tSet timeout in miliseconds\n");
fprintf(out, "\t-W\tAppend suffix always (default)\n");
fprintf(out, "\t-0\tAppend suffix to single label first (default)\n");
fprintf(out, "\t-W\tAppend suffix always\n");
fprintf(out, "\t-1\tAppend suffix only to single label after failure\n");
fprintf(out, "\t-M\tAppend suffix only to multi label name after failure\n");
fprintf(out, "\t-N\tNever append a suffix\n");
@ -1033,6 +1034,10 @@ getdns_return_t parse_args(int argc, char **argv)
(void) getdns_context_set_append_name(context,
GETDNS_APPEND_NAME_ONLY_TO_SINGLE_LABEL_AFTER_FAILURE);
break;
case '0':
(void) getdns_context_set_append_name(context,
GETDNS_APPEND_NAME_TO_SINGLE_LABEL_FIRST);
break;
case 'M':
(void) getdns_context_set_append_name(context,
GETDNS_APPEND_NAME_ONLY_TO_MULTIPLE_LABEL_NAME_AFTER_FAILURE);