Updates to improve mDNS support #2

Open
Ghost wants to merge 4 commits from (deleted):master into master
33 changed files with 66 additions and 66 deletions
Showing only changes of commit 498d6f71f8 - Show all commits

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
var classes = exports.DNS_CLASSES = {
@ -9,4 +9,4 @@ Object.keys(classes).forEach(function (key) {
classes[classes[key]] = key;
});
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

4
dns.js
View File

@ -1,4 +1,4 @@
;(function (exports) {
// ;(function (exports) {
'use strict';
var Parser = (exports.DNS_PARSER || require('./dns.parser.js').DNS_PARSER);
@ -55,4 +55,4 @@ if ('undefined' !== typeof module) {
exports.Packer = exports.DNS_PACKER;
}
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
var opcodes = exports.DNS_OPCODES = {
@ -10,4 +10,4 @@ Object.keys(opcodes).forEach(function (key) {
opcodes[opcodes[key]] = key;
});
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
var classes = exports.DNS_CLASSES || require('./dns.classes.js').DNS_CLASSES;
@ -166,4 +166,4 @@ var dnspack = exports.DNS_PACKER = {
};
dnspack.packRdata = exports.DNS_RDATA_PACK || require('./dns.rdata.pack.js').DNS_RDATA_PACK;
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
;(function (exports) {
// ;(function (exports) {
'use strict';
var pdns = exports.DNS_PARSER = {};
@ -264,4 +264,4 @@ pdns.unpack = function (ab) {
};
pdns.unpackRdata = exports.DNS_RDATA_PARSE || require('./dns.rdata.parse.js').DNS_RDATA_PARSE;
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
var rcodes = exports.DNS_RCODES = {
@ -12,4 +12,4 @@ Object.keys(rcodes).forEach(function (key) {
rcodes[rcodes[key]] = key;
});
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
var classes = exports.DNS_CLASSES || require('./dns.classes.js').DNS_CLASSES;
@ -42,4 +42,4 @@ exports.DNS_RDATA_PACK = function (ab, dv, total, record) {
return packer(ab, dv, total, record);
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
exports.DNS_RDATA_PARSE = function (ab, packet, record) {
@ -45,4 +45,4 @@ exports.DNS_RDATA_PARSE = function (ab, packet, record) {
return parser(ab.slice(0, record.rdstart + record.rdlength), packet, record);
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
@ -9,4 +9,4 @@ exports.DNS_TYPE_ANY = function (rdata) {
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
var types = exports.DNS_TYPES = {
@ -53,4 +53,4 @@ Object.keys(types).forEach(function (key) {
types[types[key]] = key;
});
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// unpack labels with 0x20 compression pointer support
@ -96,4 +96,4 @@ exports.DNS_UNPACK_LABELS = function (ui8, ptr, q) {
return q;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// An 'A' record is a 32-bit value representing the IP address
@ -23,4 +23,4 @@ exports.DNS_PACKER_TYPE_A = function (ab, dv, total, record) {
return total;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// 'AAAA'
@ -38,4 +38,4 @@ exports.DNS_PACKER_TYPE_AAAA = function (ab, dv, total, record) {
return total;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// RFC 6844
@ -66,4 +66,4 @@ exports.DNS_PACKER_TYPE_CAA = function (ab, dv, total, record) {
return total;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// A 'CNAME' record is a 32-bit value representing the IP address
@ -34,4 +34,4 @@ exports.DNS_PACKER_TYPE_CNAME = function (ab, dv, total, record) {
return total;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// An 'MX' record is a 32-bit value representing the IP address
@ -41,4 +41,4 @@ exports.DNS_PACKER_TYPE_MX = function (ab, dv, total, record) {
return total;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,6 +1,6 @@
// NOTE: this should be EXACTLY the same as PTR
(function (exports) {
// (function (exports) {
'use strict';
// NS name for the supplied domain. May be label, pointer or any combination
@ -33,4 +33,4 @@ exports.DNS_PACKER_TYPE_NS = function (ab, dv, total, record) {
return total;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,6 +1,6 @@
// NOTE: this should be EXACTLY the same as NS
(function (exports) {
// (function (exports) {
'use strict';
// The host name that represents the supplied UP address
@ -34,4 +34,4 @@ exports.DNS_PACKER_TYPE_PTR = function (ab, dv, total, record) {
return total;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// http://www.zytrax.com/books/dns/ch8/soa.html
@ -101,4 +101,4 @@ exports.DNS_PACKER_TYPE_SOA = function (ab, dv, total, record) {
return total;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// SRV RDATA contains:
@ -70,4 +70,4 @@ exports.DNS_PACKER_TYPE_SRV = function (ab, dv, total, record) {
return total;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// Record type is just any text.
@ -44,4 +44,4 @@ exports.DNS_PACKER_TYPE_TXT = function (ab, dv, total, record) {
return total;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// Put some documentation here in these comments.
@ -113,4 +113,4 @@ exports.DNS_PARSER_TYPE_MX = function (ab, packet, record) {
return record;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// An 'A' record is a 32-bit value representing the IP address
@ -11,4 +11,4 @@ exports.DNS_PARSER_TYPE_A = function (ab, packet, record) {
return record;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// Value: IP Address
@ -45,4 +45,4 @@ exports.DNS_PARSER_TYPE_AAAA = function (ab, packet, record) {
return record;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// RFC 6844 https://tools.ietf.org/html/rfc6844#section-3
@ -54,4 +54,4 @@ exports.DNS_PARSER_TYPE_CAA = function (ab, packet, record) {
return record;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// A CNAME reocord maps a single alias or nickname to the real or
@ -11,4 +11,4 @@ exports.DNS_PARSER_TYPE_CNAME = function (ab, packet, record) {
return record;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// Value: Preference
@ -22,5 +22,5 @@ exports.DNS_PARSER_TYPE_MX = function (ab, packet, record) {
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// FORMAT:
@ -20,4 +20,4 @@ exports.DNS_PARSER_TYPE_NS = function (ab , packet, record) {
return record;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
exports.DNS_PARSER_TYPE_NSEC = function (ab, packet, record) {
@ -15,4 +15,4 @@ exports.DNS_PARSER_TYPE_NSEC = function (ab, packet, record) {
return record;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// Pointer records are the opposite of A and AAAA and are
@ -18,4 +18,4 @@ exports.DNS_PARSER_TYPE_PTR = function (ab, pack, record) {
record.data = labelInfo.name;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// Value Meaning/Use
@ -73,4 +73,4 @@ exports.DNS_PARSER_TYPE_SOA = function (ab, packet, record) {
return record;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// SRV identifies the host(s) that will support a particular service. It
@ -19,4 +19,4 @@ exports.DNS_PARSER_TYPE_SRV = function (ab, packet, record) {
return record;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));

View File

@ -1,4 +1,4 @@
(function (exports) {
// (function (exports) {
'use strict';
// Used to provide the ability to associate some arbitrary and unformatted text
@ -15,4 +15,4 @@ exports.DNS_PARSER_TYPE_TXT = function (ab, packet, record) {
return record;
};
}('undefined' !== typeof window ? window : exports));
// }('undefined' !== typeof window ? window : exports));