Add a dummy Network.DNS.RBL module.
Main.hs
other-modules:
- Domain
- DnsblSite
- IPv4Pattern
- Pretty
+ Network.DNS.RBL.Domain
+ Network.DNS.RBL.DnsblSite
+ Network.DNS.RBL.IPv4Pattern
+ Network.DNS.RBL.Pretty
+ Network.DNS.RBL
hs-source-dirs:
src/
--- /dev/null
+module Network.DNS.RBL ( lookup_simple )
+where
+
+-- | Look up the given @host@ on all of the white/blacklists contained
+-- in @rbls@. If the results, multiplied by their weights, add up to
+-- (at least) @threshold@, then @True@ is returned; that is, the
+-- @host@ is \"listed\". Otherwise, @False@ is returned.
+--
+lookup_simple :: String -> Int -> String -> Bool
+lookup_simple rbls threshold host = undefined
-- return code pattern is \"127.0.0.[2;10;11]\", and the weight is
-- \"2".
--
-module DnsblSite (
+module Network.DNS.RBL.DnsblSite (
dnsbl_site_tests,
dnsbl_sites )
where
import Text.Parsec.String ( Parser )
import Text.Read ( readMaybe )
-import Domain ( UserDomain, user_domain )
-import IPv4Pattern ( IPv4Pattern, v4pattern )
-import Pretty ( Pretty(..) )
+import Network.DNS.RBL.Domain ( UserDomain, user_domain )
+import Network.DNS.RBL.IPv4Pattern ( IPv4Pattern, v4pattern )
+import Network.DNS.RBL.Pretty ( Pretty(..) )
newtype Weight = Weight Int deriving (Eq, Show)
-- have a unicode mumbo jumbo character that takes up two bytes
-- (octets).
--
-module Domain (
+module Network.DNS.RBL.Domain (
UserDomain,
user_domain )
where
import qualified Text.Parsec as Parsec ( digit, letter)
import Text.Parsec.String ( Parser )
-import Pretty ( Pretty(..) )
+import Network.DNS.RBL.Pretty ( Pretty(..) )
-- * Digits
-- v4sequence = v4seq_member | v4sequence ";" v4seq_member
-- v4seq_member = v4octet | v4octet ".." v4octet
--
-module IPv4Pattern (
+module Network.DNS.RBL.IPv4Pattern (
IPv4Pattern,
addresses,
ipv4pattern_tests,
import Text.Parsec.String ( Parser )
import Text.Read ( readMaybe )
-import Pretty ( Pretty(..) )
+import Network.DNS.RBL.Pretty ( Pretty(..) )
-- * Octets
-- way. The 'pretty_print' function then prints the result of
-- 'pretty_show' by default.
--
-module Pretty ( Pretty(..) )
+module Network.DNS.RBL.Pretty ( Pretty(..) )
where
import Text.Parsec ( ParseError )
import Test.Tasty ( TestTree, defaultMain, testGroup )
-import DnsblSite ( dnsbl_site_tests )
-import IPv4Pattern ( ipv4pattern_tests )
+import Network.DNS.RBL.DnsblSite ( dnsbl_site_tests )
+import Network.DNS.RBL.IPv4Pattern ( ipv4pattern_tests )
tests :: TestTree
tests = testGroup "All Tests" [ dnsbl_site_tests, ipv4pattern_tests ]