root/src/udns/dnsget.1

Revision 5a9b91bc0a14543e0995eba973fbeacc05aaee8b, 4.6 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 6 years ago)

svn merge -r 327:330 https://labs.omniti.com/reconnoiter/branches/dev/udns .

closes #38

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