From b24345fe26a90cdc821b22d7bba1f6cb3ded4706 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 5 Oct 2017 15:43:55 -0600 Subject: [PATCH] add RCODES --- dns.rcodes.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dns.rcodes.js diff --git a/dns.rcodes.js b/dns.rcodes.js new file mode 100644 index 0000000..e1a3c0f --- /dev/null +++ b/dns.rcodes.js @@ -0,0 +1,15 @@ +(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));