]> git.mxchange.org Git - simgear.git/blob - 3rdparty/udns/dnsget.1
Initial commit for a DNS service resolver
[simgear.git] / 3rdparty / udns / dnsget.1
1 .\" dnsget.1: dnsget manpage
2 .\"
3 .\" Copyright (C) 2005-2014  Michael Tokarev <mjt+udns@tls.msk.ru>
4 .\" This file is part of UDNS library, an async DNS stub resolver.
5 .\"
6 .\" This library is free software; you can redistribute it and/or
7 .\" modify it under the terms of the GNU Lesser General Public
8 .\" License as published by the Free Software Foundation; either
9 .\" version 2.1 of the License, or (at your option) any later version.
10 .\"
11 .\" This library is distributed in the hope that it will be useful,
12 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 .\" Lesser General Public License for more details.
15 .\"
16 .\" You should have received a copy of the GNU Lesser General Public
17 .\" License along with this library, in file named COPYING.LGPL; if not,
18 .\" write to the Free Software Foundation, Inc., 59 Temple Place,
19 .\" Suite 330, Boston, MA  02111-1307  USA
20
21 .TH dnsget 1 "Jan 2014" "User Utilities"
22
23 .SH NAME
24 dnsget \- DNS lookup utility
25
26 .SH SYNOPSYS
27 .B dnsget
28 .RB [\| \-v \||\| \-q \|]
29 .RB [\| \-c
30 .IR class \|]
31 .RB [\| \-t
32 .IR type \|]
33 .RB [\| \-o
34 .IR opt , opt ,...]
35 .IR name \|.\|.\|.
36
37 .SH DESCRIPTION
38 .B dnsget
39 is a simple command-line to perform DNS lookups, similar to
40 .BR host (1)
41 and
42 .BR dig (1).
43 It is useable for both interactive/debugging scenarious and
44 in scripts.
45 The program is implemented using
46 .BR udns (3)
47 library.
48
49 .PP
50 By default,
51 .B dnsget
52 produces a human-readable output, similar to
53 .RS
54 .nf
55 alias.example.com. CNAME www.example.com.
56 www.example.com. A 192.168.1.1
57 www.example.com. MX 10 mx.example.com.
58 .fi
59 .RE
60 which is just sufficient to see how a given name resolves.
61 Output format is controllable with
62 .B \-v
63 and
64 .B \-q
65 options -- the former increases verbosity level up to printing
66 the whole DNS contents of all packets sent and received, which
67 is suitable for debugging DNS problems, while the latter reduces
68 the level, making output more quiet, up to bare result with no
69 error messages, which is good for scripts.
70
71 .SH OPTIONS
72
73 The following options are recognized by
74 .BR dnsget :
75
76 .TP
77 .B \-v
78 produce more detailed output.  More
79 .BR \-v 's
80 means more details will be produced.  With single
81 .BR \-v , dnsget
82 will print contents of all received DNS packets (in a readable format),
83 while with
84 .BR \-vv ,
85 it will output all outgoing DNS packets too.
86
87 .TP
88 .B \-q
89 the opposite for \fB\-v\fR -- produce less detailed output.
90 With single
91 .BR \-q , dnsget
92 will only show (decoded) data from final DNS resource records (RR),
93 while
94 .B \-qq
95 also suppresses error messages.
96
97 .TP
98 \fB\-t \fItype\fR
99 request record(s) of the given type \fItype\fR.  By default,
100 .B dnsget
101 will ask for IPv4 address (A) record, or for PTR record if the
102 argument in question is an IPv4 or IPv6 address.  Recognized
103 types include A, AAAA, MX, TXT, CNAME, PTR, NS, SOA, ANY and
104 others.
105
106 .TP
107 \fB\-c \fIclass\fR
108 request DNS record(s) of the given class \fIclass\fR.  By
109 default
110 .B dnsget
111 uses IN class.  Valid classes include IN, CH, HS, ANY.
112
113 .TP
114 .B \-a
115 (compatibility option).  Equivalent to setting query type to
116 .B ANY
117 and increasing verbosity level
118 .RB ( \-v ).
119
120 .TP
121 .B \-C
122 (planned)
123
124 .TP
125 .B \-x
126 (planned)
127
128 .TP
129 \fB\-o \fIopt\fR,\fIopt\fR,...
130 (may be specified several times).
131 Set resolver options (in a form \fIoption\fR:\fIvalue\fR) as if they
132 were set in
133 .RB $ RES_OPTIONS
134 environment variable, or set query flags:
135 .RS
136 .TP
137 \fBtimeout\fR:\fIsec\fR
138 Set initial query timeout to \fIsec\fR.
139 .TP
140 \fBattempts\fR:\fInum\fR
141 (re)try every query \fInum\fR times before failing.
142 .TP
143 \fBudpbuf\fR:\fIbytes\fR
144 set DNS UDP buffer size to \fIbytes\fR bytes.  Valid values
145 are from 512 to 65535.  If \fIbytes\fR is greather than 512,
146 EDNS0 (RFC 2671) extensions will be used.
147 .TP
148 \fBport\fR:\fInum\fR
149 Use given UDP port number \fInum\fR instead of the default port 53 (domain).
150 .TP
151 \fBaa\fR
152 set AA (auth only) query bit.
153 .TP
154 \fBnord\fR
155 do not set RD (recursion desired) query bit (set by default).
156 .TP
157 \fBdnssec\fR or \fBdo\fR
158 set DNSSEC OK (DO) query flag (\fBdnsget\fR does not verify DNSSEC signatures,
159 only displays them; this is set in EDNS RR).
160 .TP
161 \fBcd\fR
162 set CD (checking disabled) query bit.
163 .RE
164
165 .TP
166 \fB\-n \fInameserver\fR
167 Use the given nameserver(s) (may be specified more than once)
168 instead of the default.  Using this option has the same same effect as 
169 .RB $ NSCACHEIP
170 or
171 .RB $ NAMESERVERS
172 environment variables, with the only difference that only IPv4 addresses
173 are recognized for now, and it is possible to specify names (which will
174 be resolved using default settings) instead of IP addresses.
175
176 .TP
177 .B \-h
178 print short help and exit.
179
180 .SH "RETURN VALUE"
181 When all names where resovled successefully,
182 .B dnsget
183 exits with zero exit status.  If at least one name was not found,
184 .B dnsget
185 will exit with return code 100.  If some other error occured during
186 name resolution, it will exit with code 99.  In case of usage or
187 initialization error,
188 .B dnsget
189 will return 1.
190
191 .SH "SEE ALSO"
192 .BR host (1)
193 .BR dig (1)
194 .BR resolv.conf (5)
195 .BR udns (3).