mafintosh / dns-packet

An abstract-encoding compliant module for encoding / decoding DNS packets
MIT License
207 stars 71 forks source link

class option #3

Closed silverwind closed 6 years ago

silverwind commented 7 years ago

To do version queries, like:

var socket = require("dns-socket")();

socket.query({
  questions: [{
    type: "TXT",
    class: "CH",
    name: "version.bind"
  }]
}, 53, "4.2.2.2", function(err, res) {
  console.log(err, res);
});

I'd imagine support for these classes could be useful:

Class Value
IN 0x0001
CH 0x0003
HS 0x0004
NONE 0x00FE
ANY 0x00FF