dns-suite.js/dns.types.js

23 lines
461 B
JavaScript
Raw Normal View History

2017-01-21 19:43:42 +00:00
(function (exports) {
'use strict';
2017-01-21 20:35:06 +00:00
var types = exports.DNS_TYPES = {
2017-01-21 19:43:42 +00:00
A: 0x01 // 1
, NS: 0x02 // 2
, CNAME: 0x05 // 5
, SOA: 0x06 // 6
, PTR: 0x0c // 12
2017-01-21 22:19:38 +00:00
, MX: 0x0f // 15
2017-01-21 19:43:42 +00:00
, TXT: 0x10 // 16
2017-01-27 01:37:15 +00:00
, AAAA: 0x1c // 28
2017-01-21 19:43:42 +00:00
, SRV: 0x21 // 33
2017-02-11 21:15:06 +00:00
, OPT: 0x29 // 41
2017-01-21 19:43:42 +00:00
, ANY: 0xff // 255
};
2017-01-21 20:35:06 +00:00
// and in reverse
Object.keys(types).forEach(function (key) {
types[types[key]] = key;
});
2017-01-21 19:43:42 +00:00
2017-02-11 21:15:06 +00:00
}('undefined' !== typeof window ? window : exports));