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 dc8cb93

Browse filesBrowse files
julianduqueevanlucas
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 a7c85e6 commit dc8cb93
Copy full SHA for dc8cb93

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎doc/api/dns.md‎

Copy file name to clipboardExpand all lines: doc/api/dns.md
+48Lines changed: 48 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.
@@ -144,6 +153,9 @@ dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
144153
```
145154

146155
## dns.resolve(hostname[, rrtype], callback)
156+
<!-- YAML
157+
added: v0.1.27
158+
-->
147159

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

172184
## dns.resolve4(hostname, callback)
185+
<!-- YAML
186+
added: v0.1.16
187+
-->
173188

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

179194
## dns.resolve6(hostname, callback)
195+
<!-- YAML
196+
added: v0.1.16
197+
-->
180198

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

185203
## dns.resolveCname(hostname, callback)
204+
<!-- YAML
205+
added: v0.3.2
206+
-->
186207

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

192213
## dns.resolveMx(hostname, callback)
214+
<!-- YAML
215+
added: v0.1.27
216+
-->
193217

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

199223
## dns.resolveNaptr(hostname, callback)
224+
<!-- YAML
225+
added: v0.9.12
226+
-->
200227

201228
Uses the DNS protocol to resolve regular expression based records (`NAPTR`
202229
records) for the `hostname`. The `callback` function has arguments
@@ -224,13 +251,19 @@ For example:
224251
```
225252

226253
## dns.resolveNs(hostname, callback)
254+
<!-- YAML
255+
added: v0.1.90
256+
-->
227257

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

233263
## dns.resolveSoa(hostname, callback)
264+
<!-- YAML
265+
added: v0.11.10
266+
-->
234267

235268
Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
236269
the `hostname`. The `addresses` argument passed to the `callback` function will
@@ -257,6 +290,9 @@ be an object with the following properties:
257290
```
258291

259292
## dns.resolveSrv(hostname, callback)
293+
<!-- YAML
294+
added: v0.1.27
295+
-->
260296

261297
Uses the DNS protocol to resolve service records (`SRV` records) for the
262298
`hostname`. The `addresses` argument passed to the `callback` function will
@@ -277,12 +313,18 @@ be an array of objects with the following properties:
277313
```
278314

279315
## dns.resolvePtr(hostname, callback)
316+
<!-- YAML
317+
added: v6.0.0
318+
-->
280319

281320
Uses the DNS protocol to resolve pointer records (`PTR` records) for the
282321
`hostname`. The `addresses` argument passed to the `callback` function will
283322
be an array of strings containing the reply records.
284323

285324
## dns.resolveTxt(hostname, callback)
325+
<!-- YAML
326+
added: v0.1.27
327+
-->
286328

287329
Uses the DNS protocol to resolve text queries (`TXT` records) for the
288330
`hostname`. The `addresses` argument passed to the `callback` function is
@@ -292,6 +334,9 @@ one record. Depending on the use case, these could be either joined together or
292334
treated separately.
293335

294336
## dns.reverse(ip, callback)
337+
<!-- YAML
338+
added: v0.1.16
339+
-->
295340

296341
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
297342
array of hostnames.
@@ -303,6 +348,9 @@ On error, `err` is an [`Error`][] object, where `err.code` is
303348
one of the [DNS error codes][].
304349

305350
## dns.setServers(servers)
351+
<!-- YAML
352+
added: v0.11.3
353+
-->
306354

307355
Sets the IP addresses of the servers to be used when resolving. The `servers`
308356
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.