Skip to content
Snippets Groups Projects
Commit 87932c61 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

utils: some minor improvements

refs #145
parent d2e72cad
No related branches found
No related tags found
No related merge requests found
......@@ -159,12 +159,13 @@ Don't use TCP automatically if truncated reply is received.
.BR + [ no ] nsid
Request nameserver identifier (NSID).
.TP
.BR + [ no ] idn
Enable IDN transformation to ASCII and vice versa. IDN support depends on libidn availability during project building!
.TP
.BR + [ no ] edns= N
Use EDNS version (default is 0).
.TP
.BR +noidn
Disable IDN transformation to ASCII and vice versa.
IDN support depends on libidn availability during project building!
.TP
.BI +time= T
Set wait for reply interval in seconds (default is 5 seconds).
This timeout applies to each query try.
......
......@@ -330,9 +330,9 @@ static void print_section_host(const knot_rrset_t **rrsets,
free(buf);
}
static void print_error_host(const uint8_t code,
const knot_packet_t *packet,
const style_t *style)
static void print_error_host(const uint8_t code,
const knot_packet_t *packet,
const style_t *style)
{
const char *rcode_str = "NULL";
char type[32] = "NULL";
......@@ -380,7 +380,7 @@ knot_packet_t* create_empty_packet(const size_t max_size)
return packet;
}
void print_header_xfr(const knot_packet_t *packet, const style_t *style)
void print_header_xfr(const knot_packet_t *packet, const style_t *style)
{
if (style == NULL) {
DBG_NULL;
......@@ -442,12 +442,12 @@ void print_data_xfr(const knot_packet_t *packet,
}
}
void print_footer_xfr(const size_t total_len,
const size_t msg_count,
const size_t rr_count,
const net_t *net,
const float elapsed,
const style_t *style)
void print_footer_xfr(const size_t total_len,
const size_t msg_count,
const size_t rr_count,
const net_t *net,
const float elapsed,
const style_t *style)
{
if (style == NULL) {
DBG_NULL;
......
......@@ -519,16 +519,6 @@ static int opt_noignore(const char *arg, void *query)
return KNOT_EOK;
}
static int opt_idn(const char *arg, void *query)
{
query_t *q = query;
q->idn = true;
q->style.style.ascii_to_idn = name_to_idn;
return KNOT_EOK;
}
static int opt_noidn(const char *arg, void *query)
{
query_t *q = query;
......@@ -719,7 +709,7 @@ static const param_t dig_opts2[] = {
{ "ignore", ARG_NONE, opt_ignore },
{ "noignore", ARG_NONE, opt_noignore },
{ "idn", ARG_NONE, opt_idn },
/* "idn" doesn't work since it must be called before query creation. */
{ "noidn", ARG_NONE, opt_noidn },
{ "nsid", ARG_NONE, opt_nsid },
......@@ -1208,9 +1198,9 @@ static void dig_help(void)
" +[no]tcp Use TCP protocol.\n"
" +[no]fail Stop if SERVFAIL.\n"
" +[no]ignore Don't use TCP automatically if truncated.\n"
" +[no]idn Enable IDN transformation.\n"
" +[no]nsid Request NSID.\n"
" +[no]edns=N Use EDNS (=version).\n"
" +noidn Disable IDN transformation.\n"
" +time=T Set wait for reply interval in seconds.\n"
" +retry=N Set number of retries.\n"
" +bufsize=B Set EDNS buffer size.\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment