Fast, lightweight, easy-to-extend, easy-to-test, pure JavaScript (ES5.1) implementation for DNS / mDNS.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 lines
303 B

(function (exports) {
'use strict';
var rcodes = exports.DNS_RCODES = {
SUCCESS: 0x00 // 0
, NXDOMAIN: 0x03 // 3
, REFUSED: 0x05 // 5
};
// and in reverse
Object.keys(rcodes).forEach(function (key) {
rcodes[rcodes[key]] = key;
});
}('undefined' !== typeof window ? window : exports));