-module PowerDns ( RRType
+module PowerDns ( RRType(..)
, PdnsRequest(..)
, pdnsParse
, pdnsOut
, localIpAddress = getLIp ver xs
, ednsSubnetAddress = getRIp ver xs
})
- _ -> Left s
+ _ -> Left $ "Unparseable PDNS Request: " ++ s
-pdnsOut :: NmcDom -> String
-pdnsOut d = show d
+pdnsOut :: Int -> RRType -> Either String NmcDom -> String
+pdnsOut ver _ d =
+ case d of
+ Left err -> "LOG Error: " ++ err ++ "\nFAIL\n"
+ Right dom -> "DATA\n" ++ (show dom) ++ "\nEND\n" --FIXME