dns.iter.classify

dns.iter

classify(resp, qtype, qname) -> kind, info

Classify a decoded DNS response

Classifies a decoded DNS response message into one of six categories. qtype is the numeric query type used in the original query.

Returns kind (string) and info (table) where kind is one of:

local iter = require("dns.iter")
local resp = iter.query_server("198.41.0.4", "example.com.", "A")
local kind, info = iter.classify(resp, 1) -- 1 = TYPE.A