diff options
author | Doug Wade <doug@dougwade.io> | 2016-05-04 17:45:04 -0700 |
---|---|---|
committer | silverwind <me@silverwind.io> | 2016-05-19 22:18:49 +0200 |
commit | bd728574b7b6414c6bd5c91b68a2e4fce5a83e90 (patch) | |
tree | 04e71c5760522b6e12a64fce6ea0f345990bbe77 /doc | |
parent | ef8695398bd57db1706b35dbd8e0e54067087b33 (diff) | |
download | android-node-v8-bd728574b7b6414c6bd5c91b68a2e4fce5a83e90.tar.gz android-node-v8-bd728574b7b6414c6bd5c91b68a2e4fce5a83e90.tar.bz2 android-node-v8-bd728574b7b6414c6bd5c91b68a2e4fce5a83e90.zip |
doc: Add resolveNaptr and naptr rrtype docs
Updates the dns module documentation to include documentation on
the resolveNaptr method, and also adds the option NAPTR to the
list of valid values for rrtype in dns.resolve(hostname[, rrtype],
callback).
PR-URL: https://github.com/nodejs/node/pull/6586
Fixes: https://github.com/nodejs/node/issues/6507
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/dns.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/api/dns.md b/doc/api/dns.md index 13dee0a6cb..443bbfda12 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -159,6 +159,7 @@ Valid values for `rrtype` are: * `'NS'` - name server records * `'CNAME'` - canonical name records * `'SOA'` - start of authority record + * `'NAPTR'` - name authority pointer record The `callback` function has arguments `(err, addresses)`. When successful, `addresses` will be an array. The type of each item in `addresses` is @@ -195,6 +196,33 @@ Uses the DNS protocol to resolve mail exchange records (`MX` records) for the contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). +## dns.resolveNaptr(hostname, callback) + +Uses the DNS protocol to resolve regular expression based records (`NAPTR` +records) for the `hostname`. The `callback` function has arguments +`(err, addresses)`. The `addresses` argument passed to the `callback` function +will contain an array of objects with the following properties: + +* `flags` +* `service` +* `regexp` +* `replacement` +* `order` +* `preference` + +For example: + +```js +{ + flags: 's', + service: 'SIP+D2U', + regexp: '', + replacement: '_sip._udp.example.com', + order: 30, + preference: 100 +} +``` + ## dns.resolveNs(hostname, callback) Uses the DNS protocol to resolve name server records (`NS` records) for the |