Safe Haskell | Safe-Inferred |
---|
- type Domain = String
- data IPAddr
- fromIPAddr :: IPAddr -> String
- data NamedConf = NamedConf {
- confDomain :: Domain
- confDnsServerType :: DnsServerType
- confFile :: FilePath
- confMasters :: [IPAddr]
- confAllowTransfer :: [IPAddr]
- confLines :: [String]
- data DnsServerType
- data Zone = Zone {}
- data SOA = SOA {}
- data Record
- = Address IPAddr
- | CNAME BindDomain
- | MX Int BindDomain
- | NS BindDomain
- | TXT String
- | SRV Word16 Word16 Word16 BindDomain
- getIPAddr :: Record -> Maybe IPAddr
- getCNAME :: Record -> Maybe BindDomain
- getNS :: Record -> Maybe BindDomain
- type SerialNumber = Word32
- data BindDomain
- = RelDomain Domain
- | AbsDomain Domain
- | RootDomain
- domainHostName :: BindDomain -> Maybe HostName
Documentation
fromIPAddr :: IPAddr -> StringSource
Represents a bind 9 named.conf file.
NamedConf | |
|
Represents a bind 9 zone file.
Every domain has a SOA record, which is big and complicated.
SOA | |
|
Types of DNS records.
This is not a complete list, more can be added.
getCNAME :: Record -> Maybe BindDomainSource
getNS :: Record -> Maybe BindDomainSource
type SerialNumber = Word32Source
Bind serial numbers are unsigned, 32 bit integers.
data BindDomain Source
Domains in the zone file must end with a period if they are absolute.
Let's use a type to keep absolute domains straight from relative domains.
The RootDomain refers to the top level of the domain, so can be used to add nameservers, MX's, etc to a domain.