diff --git a/dns.type.ptr.js b/dns.type.ptr.js index 0fa96b2..87190b7 100644 --- a/dns.type.ptr.js +++ b/dns.type.ptr.js @@ -10,8 +10,9 @@ // ame ttl class rr name // 15 IN PTR www.example.com. -exports.DNS_TYPE_PTR = function (rdata) { - +var unpackLabels = exports.DNS_UNPACK_LABELS || require('./dns.unpack-labels.js').DNS_UNPACK_LABELS; +exports.DNS_TYPE_PTR = function (ab, pack, record) { + return unpackLabels(new Uint8Array(ab), record.rdstart, { byteLength: 0, cpcount: 0, labels: [], name: '' }).name; }; }('undefined' !== typeof window ? window : exports)); diff --git a/samples/aaaa-0.mdns.bin b/samples/aaaa-0.mdns.bin new file mode 100644 index 0000000..19d4615 Binary files /dev/null and b/samples/aaaa-0.mdns.bin differ diff --git a/samples/aaaa-1.mdns.bin b/samples/aaaa-1.mdns.bin new file mode 100644 index 0000000..8d2457f Binary files /dev/null and b/samples/aaaa-1.mdns.bin differ