|
|
@ -1,4 +1,4 @@ |
|
|
|
process.binding('dns'); |
|
|
|
var dns = process.binding('dns'); |
|
|
|
|
|
|
|
exports.resolve = function (domain, type_, callback_) { |
|
|
|
var type, callback; |
|
|
@ -19,32 +19,32 @@ exports.resolve = function (domain, type_, callback_) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
exports.resolve4 = process.dns.resolve4; |
|
|
|
exports.resolve6 = process.dns.resolve6; |
|
|
|
exports.resolveMx = process.dns.resolveMx; |
|
|
|
exports.resolveTxt = process.dns.resolveTxt; |
|
|
|
exports.resolveSrv = process.dns.resolveSrv; |
|
|
|
exports.reverse = process.dns.reverse; |
|
|
|
exports.resolve4 = dns.resolve4; |
|
|
|
exports.resolve6 = dns.resolve6; |
|
|
|
exports.resolveMx = dns.resolveMx; |
|
|
|
exports.resolveTxt = dns.resolveTxt; |
|
|
|
exports.resolveSrv = dns.resolveSrv; |
|
|
|
exports.reverse = dns.reverse; |
|
|
|
|
|
|
|
// ERROR CODES
|
|
|
|
|
|
|
|
// timeout, SERVFAIL or similar.
|
|
|
|
exports.TEMPFAIL = process.dns.TEMPFAIL; |
|
|
|
exports.TEMPFAIL = dns.TEMPFAIL; |
|
|
|
|
|
|
|
// got garbled reply.
|
|
|
|
exports.PROTOCOL = process.dns.PROTOCOL; |
|
|
|
exports.PROTOCOL = dns.PROTOCOL; |
|
|
|
|
|
|
|
// domain does not exists.
|
|
|
|
exports.NXDOMAIN = process.dns.NXDOMAIN; |
|
|
|
exports.NXDOMAIN = dns.NXDOMAIN; |
|
|
|
|
|
|
|
// domain exists but no data of reqd type.
|
|
|
|
exports.NODATA = process.dns.NODATA; |
|
|
|
exports.NODATA = dns.NODATA; |
|
|
|
|
|
|
|
// out of memory while processing.
|
|
|
|
exports.NOMEM = process.dns.NOMEM; |
|
|
|
exports.NOMEM = dns.NOMEM; |
|
|
|
|
|
|
|
// the query is malformed.
|
|
|
|
exports.BADQUERY = process.dns.BADQUERY; |
|
|
|
exports.BADQUERY = dns.BADQUERY; |
|
|
|
|
|
|
|
var resolveMap = { |
|
|
|
'A': exports.resolve4, |
|
|
|