dns-suite.js/dns.type.ns.js

19 lines
567 B
JavaScript

(function (exports) {
'use strict';
// Comes in variable lengths. It is the name of the primary Master for the Domain.
// For example 'ns1.example.com'
// It may be a label, pointer or any combination
var unpackLabels = exports.DNS_UNPACK_LABELS || require('./dns.unpack-labels.js').DNS_UNPACK_LABELS;
exports.DNS_TYPE_NS = function (ab , packet, record) {
record.data = unpackLabels(new Uint8Array(ab), record.rdstart, { byteLength: 0, cpcount: 0, labels: [], name: '' }).name;
return record;
};
}('undefined' !== typeof window ? window : exports));