2017-01-27 02:18:46 +00:00
|
|
|
(function (exports) {
|
|
|
|
'use strict';
|
|
|
|
// TODO. Not yet implemented
|
|
|
|
|
|
|
|
// Pointer records are the opposite of A and AAAA and are
|
|
|
|
// used in Reverse Map zone files to map an IP address (IPv4 or IPv6)
|
|
|
|
// to a host name.
|
|
|
|
|
|
|
|
// FORMAT:
|
|
|
|
// ame ttl class rr name
|
|
|
|
// 15 IN PTR www.example.com.
|
|
|
|
|
2017-02-02 03:37:28 +00:00
|
|
|
var unpackLabels = exports.DNS_UNPACK_LABELS || require('./dns.unpack-labels.js').DNS_UNPACK_LABELS;
|
|
|
|
exports.DNS_TYPE_PTR = function (ab, pack, record) {
|
2017-01-27 02:18:46 +00:00
|
|
|
|
2017-02-02 03:37:28 +00:00
|
|
|
return unpackLabels(new Uint8Array(ab), record.rdstart, { byteLength: 0, cpcount: 0, labels: [], name: '' }).name;
|
2017-01-27 02:18:46 +00:00
|
|
|
};
|
|
|
|
}('undefined' !== typeof window ? window : exports));
|