summaryrefslogtreecommitdiffstats
path: root/tinydns-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tinydns-model.lua')
-rw-r--r--tinydns-model.lua60
1 files changed, 44 insertions, 16 deletions
diff --git a/tinydns-model.lua b/tinydns-model.lua
index 3b5f445..2d57d7d 100644
--- a/tinydns-model.lua
+++ b/tinydns-model.lua
@@ -186,19 +186,45 @@ end
function check_signs(sign)
local output = {}
local output = {prefix={
- ['.']="Name server for your domain",
- ['&']="Name server",
- ['=']="Host",
- ['+']="Alias",
- ['@']="Mail exchanger",
- ['=']="Host",
- ['^']="PTR record",
- ['C']="Canonical Name",
- ['Z']="SOA record",
- [':']="Generic record",
- ['%']="Client location",
- }}
- output = output[sign]
+ ['.']="Name server for your domain",
+ ['&']="Name server",
+ ['=']="Host",
+ ['+']="Alias",
+ ['@']="Mail exchanger",
+ ['^']="PTR record",
+ ['C']="Canonical Name",
+ ['Z']="SOA record",
+ [':']="Generic record",
+ ['%']="Client location",
+ },
+ reverse={
+ ['nsourdomain']=".",
+ ['nsdomain']="&",
+ ['host']="=",
+ ['alias']="+",
+ ['mx']="@",
+ ['ptr']="^",
+ ['cname']="C",
+ ['soa']="Z",
+ [':']=":",
+ ['locations']="%",
+ },
+ fieldlabels={
+ ['.']={"Prefix", "Domain", "IP address", "Name server", "Time to live", "Timestamp", "Location", },
+ ['&']={"Prefix", "Domain", "IP address", "Name server", "Time to live", "Timestamp", "Location", },
+ ['=']={"Prefix", "Host", "IP address", "Time to live", "Timestamp", "Location", },
+ ['+']={"Prefix", "Alias", "IP address", "Time to live", "Timestamp", "Location", },
+ ['@']={"Prefix", "Domain", "IP address", "Mail exchanger", "Distance", "Time to live", "Timestamp", "Location", },
+ ['^']={"Prefix", "PTR", "Domain name", "Time to live", "Timestamp", "Location", },
+ ['C']={"Prefix", "Domain name", "Canonical name", "Time to live", "Timestamp", "Location", },
+ ['Z']={"Prefix", "Unknown", "Primary name server", "Contact address", "Serial number", "Refresh time", "Retry time", "Expire time", "Minimum time", "Time to live", "Timestamp", "Location",},
+ [':']={"Prefix", "Unknown", "Type of record", "Rdata", "Time to live", "Timestamp", "Location", },
+ ['%']={"Prefix", "Location", "IP prefix", },
+ },
+ }
+ if (sign) then
+ output = output[sign]
+ end
return output
end
@@ -321,9 +347,9 @@ local function filter_table(t1,domains_filtered,filter)
for k1,v1 in pairs(t1) do
for k2,v2 in pairs(v1) do
if (v2.label) then
- if ( string.find(filter,v2.label) ) then
- table.insert(domains_filtered, v2)
- end
+ if ( string.find(filter,v2.label) ) then
+ table.insert(domains_filtered, v2)
+ end
end
end
end
@@ -342,6 +368,7 @@ function getconfigobjects(self,filter_type, filter_levels)
for kk,vv in pairs(filecontent) do
local domaindetails = {}
local filecontent_table = split_config_items(vv)
+ filecontent_table["orgrecord"] = vv
-- Create domain information tables
local domain
@@ -549,6 +576,7 @@ function getconfigobjects(self,filter_type, filter_levels)
name=filecontent_table[2],
label=filecontent_table[2],
option=domainoptions,
+ orgrecordtable=filecontent_table,
})
end