2018-03-19 16:31:44 +00:00
|
|
|
// (function (exports) {
|
2017-02-02 21:10:40 +00:00
|
|
|
'use strict';
|
|
|
|
|
2017-02-11 21:15:06 +00:00
|
|
|
// Used to provide the ability to associate some arbitrary and unformatted text
|
2017-02-02 21:10:40 +00:00
|
|
|
// with a host or other name, such as a human readable information about a server
|
|
|
|
// network, data center, and other accounting information.
|
|
|
|
|
2017-02-18 02:38:47 +00:00
|
|
|
var unpackLabels = exports.DNS_UNPACK_LABELS || require('../dns.unpack-labels.js').DNS_UNPACK_LABELS;
|
2017-02-02 21:10:40 +00:00
|
|
|
|
2017-02-18 02:38:47 +00:00
|
|
|
exports.DNS_PARSER_TYPE_TXT = function (ab, packet, record) {
|
2017-02-02 21:10:40 +00:00
|
|
|
|
2017-02-11 21:15:06 +00:00
|
|
|
var labels = unpackLabels(new Uint8Array(ab), record.rdstart, { byteLength: 0, cpcount: 0, labels: [], name: '' });
|
2018-03-10 10:31:54 +00:00
|
|
|
record.data = labels.labels;
|
2017-02-02 21:10:40 +00:00
|
|
|
|
2017-02-03 01:39:32 +00:00
|
|
|
return record;
|
2017-02-02 21:10:40 +00:00
|
|
|
};
|
2017-02-11 21:15:06 +00:00
|
|
|
|
2018-03-19 16:31:44 +00:00
|
|
|
// }('undefined' !== typeof window ? window : exports));
|