diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-04-15 12:57:32 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-04-15 12:58:15 +0200 |
| commit | 4b6091f92c1c5abfe4597af4f3f6fa266ac46a5a (patch) | |
| tree | c9e06e11825e472e3af4fa857fc44a66b096d0e9 | |
| parent | 6cdc3195a6d174363a813d58b8372f0f5cd546b1 (diff) | |
| download | busybox-w32-4b6091f92c1c5abfe4597af4f3f6fa266ac46a5a.tar.gz busybox-w32-4b6091f92c1c5abfe4597af4f3f6fa266ac46a5a.tar.bz2 busybox-w32-4b6091f92c1c5abfe4597af4f3f6fa266ac46a5a.zip | |
nslookup: accept lowercase -type=soa, document query types
Usage: nslookup [-type=QUERY_TYPE] [-debug] HOST [DNS_SERVER]
Query DNS about HOST
QUERY_TYPE: soa,ns,a,aaaa,cname,mx,txt,ptr,any
function old new delta
packed_usage 32189 32258 +69
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | networking/nslookup.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/networking/nslookup.c b/networking/nslookup.c index 63bb46b55..88a638a79 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c | |||
| @@ -24,7 +24,8 @@ | |||
| 24 | //usage: IF_FEATURE_NSLOOKUP_BIG("[-type=QUERY_TYPE] [-debug] ") "HOST [DNS_SERVER]" | 24 | //usage: IF_FEATURE_NSLOOKUP_BIG("[-type=QUERY_TYPE] [-debug] ") "HOST [DNS_SERVER]" |
| 25 | //usage:#define nslookup_full_usage "\n\n" | 25 | //usage:#define nslookup_full_usage "\n\n" |
| 26 | //usage: "Query DNS about HOST" | 26 | //usage: "Query DNS about HOST" |
| 27 | //usage: | 27 | //usage: IF_FEATURE_NSLOOKUP_BIG("\n") |
| 28 | //usage: IF_FEATURE_NSLOOKUP_BIG("\nQUERY_TYPE: soa,ns,a,"IF_FEATURE_IPV6("aaaa,")"cname,mx,txt,ptr,any") | ||
| 28 | //usage:#define nslookup_example_usage | 29 | //usage:#define nslookup_example_usage |
| 29 | //usage: "$ nslookup localhost\n" | 30 | //usage: "$ nslookup localhost\n" |
| 30 | //usage: "Server: default\n" | 31 | //usage: "Server: default\n" |
| @@ -816,7 +817,7 @@ int nslookup_main(int argc UNUSED_PARAM, char **argv) | |||
| 816 | for (i = 0;; i++) { | 817 | for (i = 0;; i++) { |
| 817 | if (i == ARRAY_SIZE(qtypes)) | 818 | if (i == ARRAY_SIZE(qtypes)) |
| 818 | bb_error_msg_and_die("invalid query type \"%s\"", val); | 819 | bb_error_msg_and_die("invalid query type \"%s\"", val); |
| 819 | if (strcmp(qtypes[i].name, val) == 0) | 820 | if (strcasecmp(qtypes[i].name, val) == 0) |
| 820 | break; | 821 | break; |
| 821 | } | 822 | } |
| 822 | types |= (1 << i); | 823 | types |= (1 << i); |
