-- | Contains DNS types which users of the DNS library may need to use. Private-- types are mostly kept in Network.DNS.CommonmoduleNetwork.DNS.Types(DNSType(..),ResponseCode(..),RR(..),rrToType)whereimportqualifiedData.ByteStringasBimportNetwork.Socket(HostAddress,HostAddress6)importData.Word(Word32)-- | Types of DNS resources. RFC 1035, 3.2.2.dataDNSType=A|NS|CNAME|SOA|PTR|MX|TXT|AAAA|UnknownDNSType-- ^ This is for internal error handling-- and should never be used or seen outside-- Network.DNSderiving(Show,Eq,Ord)instanceEnumDNSTypewherefromEnumA=1fromEnumNS=2fromEnumCNAME=5fromEnumSOA=6fromEnumPTR=12fromEnumMX=15fromEnumTXT=16fromEnumAAAA=28fromEnumUnknownDNSType=error"fromEnum of UnknownDNSType"toEnum1=AtoEnum2=NStoEnum5=CNAMEtoEnum6=SOAtoEnum12=PTRtoEnum15=MXtoEnum16=TXTtoEnum28=AAAAtoEnum_=UnknownDNSType-- | Error codes. RFC 1035, 4.1.1.dataResponseCode=NoError-- | The name server was unable to interpret the query|FormatError-- | The name server was unable to process this query due to a problem with the name server|ServerError-- | Meaningful only for responses from an authoritative name server, this code signifies that the domain name referenced in the query does not exist|NXDomain-- | The name server does not support the requested kind of query.|NotImplemented-- | The name server refuses to perform the specified operation for policy reasons. For example, a name server may not wish to provide the information to the particular requester, or a name server may not wish to perform a particular operation (e.g., zone transfer) for particular data.|AccessDeniedderiving(Show,Eq,Enum,Bounded)-- | Resource record types. There store the actual data in the DNS database.-- There's one for each DNSTypedataRR=RRCNAME[String]|RRMX[(Int,[String])]-- ^ a list of preferences and hostnames|RRNS[String]|RRPTR[String]|RRSOA{soaName::[String],soaRname::[String],soaSerial::Word32,soaRefresh::Word32,soaRetry::Word32,soaExpire::Word32,soaMinTTL::Word32}|RRTXTB.ByteString|RRA[HostAddress]|RRAAAA[HostAddress6]deriving(Show)-- | Given an RR, this tells you the resource type of itrrToType::RR->DNSTyperrToType(RRCNAME_)=CNAMErrToType(RRMX_)=MXrrToType(RRNS_)=NSrrToType(RRPTR_)=PTRrrToType(RRSOA{})=SOArrToType(RRTXT_)=TXTrrToType(RRA_)=ArrToType(RRAAAA_)=AAAA