Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1d99059

Browse filesBrowse files
julianduqueMyles Borins
authored andcommitted
doc: add added: information for dns
Got the information from git history and I ignored previous version of dns attached to `node.dns` (pre v0.1.16). There is a case where `dns.resolveNaptr` were intented to be in v0.7.12 and it was reverted and addec back on `v0.9.12`, I left the latest version when module was introduced. Same for `dns.resolvePtr` who was referenced before but it was only added on `v6.0.0` Refs: #6578 PR-URL: #7021 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent a0ca24b commit 1d99059
Copy full SHA for 1d99059

File tree

Expand file treeCollapse file tree

1 file changed

+45
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+45
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/dns.md‎

Copy file name to clipboardExpand all lines: doc/api/dns.md
+45Lines changed: 45 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,17 @@ There are subtle consequences in choosing one over the other, please consult
5454
the [Implementation considerations section][] for more information.
5555

5656
## dns.getServers()
57+
<!-- YAML
58+
added: v0.11.3
59+
-->
5760

5861
Returns an array of IP address strings that are being used for name
5962
resolution.
6063

6164
## dns.lookup(hostname[, options], callback)
65+
<!-- YAML
66+
added: v0.1.90
67+
-->
6268

6369
Resolves a hostname (e.g. `'nodejs.org'`) into the first found A (IPv4) or
6470
AAAA (IPv6) record. `options` can be an object or integer. If `options` is
@@ -122,6 +128,9 @@ found, then return IPv4 mapped IPv6 addresses. Note that it is not supported
122128
on some operating systems (e.g FreeBSD 10.1).
123129

124130
## dns.lookupService(address, port, callback)
131+
<!-- YAML
132+
added: v0.11.14
133+
-->
125134

126135
Resolves the given `address` and `port` into a hostname and service using
127136
the operating system's underlying `getnameinfo` implementation.
@@ -140,6 +149,9 @@ dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
140149
```
141150

142151
## dns.resolve(hostname[, rrtype], callback)
152+
<!-- YAML
153+
added: v0.1.27
154+
-->
143155

144156
Uses the DNS protocol to resolve a hostname (e.g. `'nodejs.org'`) into an
145157
array of the record types specified by `rrtype`.
@@ -168,33 +180,48 @@ On error, `err` is an [`Error`][] object, where `err.code` is
168180
one of the error codes listed [here](#dns_error_codes).
169181

170182
## dns.resolve4(hostname, callback)
183+
<!-- YAML
184+
added: v0.1.16
185+
-->
171186

172187
Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the
173188
`hostname`. The `addresses` argument passed to the `callback` function
174189
will contain an array of IPv4 addresses (e.g.
175190
`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
176191

177192
## dns.resolve6(hostname, callback)
193+
<!-- YAML
194+
added: v0.1.16
195+
-->
178196

179197
Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the
180198
`hostname`. The `addresses` argument passed to the `callback` function
181199
will contain an array of IPv6 addresses.
182200

183201
## dns.resolveCname(hostname, callback)
202+
<!-- YAML
203+
added: v0.3.2
204+
-->
184205

185206
Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The
186207
`addresses` argument passed to the `callback` function
187208
will contain an array of canonical name records available for the `hostname`
188209
(e.g. `['bar.example.com']`).
189210

190211
## dns.resolveMx(hostname, callback)
212+
<!-- YAML
213+
added: v0.1.27
214+
-->
191215

192216
Uses the DNS protocol to resolve mail exchange records (`MX` records) for the
193217
`hostname`. The `addresses` argument passed to the `callback` function will
194218
contain an array of objects containing both a `priority` and `exchange`
195219
property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
196220

197221
## dns.resolveNaptr(hostname, callback)
222+
<!-- YAML
223+
added: v0.9.12
224+
-->
198225

199226
Uses the DNS protocol to resolve regular expression based records (`NAPTR`
200227
records) for the `hostname`. The `callback` function has arguments
@@ -222,13 +249,19 @@ For example:
222249
```
223250

224251
## dns.resolveNs(hostname, callback)
252+
<!-- YAML
253+
added: v0.1.90
254+
-->
225255

226256
Uses the DNS protocol to resolve name server records (`NS` records) for the
227257
`hostname`. The `addresses` argument passed to the `callback` function will
228258
contain an array of name server records available for `hostname`
229259
(e.g., `['ns1.example.com', 'ns2.example.com']`).
230260

231261
## dns.resolveSoa(hostname, callback)
262+
<!-- YAML
263+
added: v0.11.10
264+
-->
232265

233266
Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
234267
the `hostname`. The `addresses` argument passed to the `callback` function will
@@ -255,6 +288,9 @@ be an object with the following properties:
255288
```
256289

257290
## dns.resolveSrv(hostname, callback)
291+
<!-- YAML
292+
added: v0.1.27
293+
-->
258294

259295
Uses the DNS protocol to resolve service records (`SRV` records) for the
260296
`hostname`. The `addresses` argument passed to the `callback` function will
@@ -275,6 +311,9 @@ be an array of objects with the following properties:
275311
```
276312

277313
## dns.resolveTxt(hostname, callback)
314+
<!-- YAML
315+
added: v0.1.27
316+
-->
278317

279318
Uses the DNS protocol to resolve text queries (`TXT` records) for the
280319
`hostname`. The `addresses` argument passed to the `callback` function is
@@ -284,6 +323,9 @@ one record. Depending on the use case, these could be either joined together or
284323
treated separately.
285324

286325
## dns.reverse(ip, callback)
326+
<!-- YAML
327+
added: v0.1.16
328+
-->
287329

288330
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
289331
array of hostnames.
@@ -295,6 +337,9 @@ On error, `err` is an [`Error`][] object, where `err.code` is
295337
one of the [DNS error codes][].
296338

297339
## dns.setServers(servers)
340+
<!-- YAML
341+
added: v0.11.3
342+
-->
298343

299344
Sets the IP addresses of the servers to be used when resolving. The `servers`
300345
argument is an array of IPv4 or IPv6 addresses.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.