import Data.Text.Lazy (splitOn, pack)
import Data.Map.Lazy (foldrWithKey)
+import Data.Default.Class (def)
import NmcDom
data RRType = RRTypeSRV | RRTypeA | RRTypeAAAA | RRTypeCNAME
| RRTypeDNAME | RRTypeSOA | RRTypeRP | RRTypeLOC
- | RRTypeNS | RRTypeDS | RRTypeMX
+ | RRTypeNS | RRTypeDS | RRTypeMX | RRTypeTLSA
| RRTypeANY | RRTypeError String
instance Show RRType where
show RRTypeNS = "NS"
show RRTypeDS = "DS"
show RRTypeMX = "MX"
+ show RRTypeTLSA = "TLSA"
show RRTypeANY = "ANY"
show (RRTypeError s) = "Unknown RR type: " ++ (show s)
"NS" -> RRTypeNS
"DS" -> RRTypeDS
"MX" -> RRTypeMX
+ "TLSA" -> RRTypeTLSA
"ANY" -> RRTypeANY
_ -> RRTypeError qt
dataRR RRTypeSRV = justl domSrv
dataRR RRTypeMX = justl domMx
+dataRR RRTypeTLSA = justl domTlsa
dataRR RRTypeA = justl domIp
dataRR RRTypeAAAA = justl domIp6
dataRR RRTypeCNAME = justv domAlias
Nothing -> "hostmaster." ++ name ++ "."
Just addr -> dotmail addr
in
- if dom == emptyNmcDom then []
+ if dom == def then []
else
-- Follows a relatively ugly hack to figure if we are at the top
-- level domain ("something.bit"). Only in such case we provide