| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.DNS.Types
Description
Data types for DNS Query and Response. For more information, see http://www.ietf.org/rfc/rfc1035.
- type Domain = ByteString
- data ResourceRecord
- data RData
- data OData
- data TYPE
- intToType :: Int -> TYPE
- typeToInt :: TYPE -> Int
- data OPTTYPE
- intToOptType :: Int -> OPTTYPE
- optTypeToInt :: OPTTYPE -> Int
- data DNSError
- data DNSMessage = DNSMessage {
- header :: DNSHeader
- question :: [Question]
- answer :: [ResourceRecord]
- authority :: [ResourceRecord]
- additional :: [ResourceRecord]
- type DNSFormat = DNSMessage
- data DNSHeader = DNSHeader {
- identifier :: Int
- flags :: DNSFlags
- data DNSFlags = DNSFlags {
- qOrR :: QorR
- opcode :: OPCODE
- authAnswer :: Bool
- trunCation :: Bool
- recDesired :: Bool
- recAvailable :: Bool
- rcode :: RCODE
- authenData :: Bool
- data QorR
- data OPCODE
- data RCODE
- data Question = Question {}
- responseA :: Int -> Question -> [IPv4] -> DNSMessage
- responseAAAA :: Int -> Question -> [IPv6] -> DNSMessage
Domain
type Domain = ByteString #
Type for domain.
Resource Records
data ResourceRecord #
Raw data format for resource records.
Constructors
| ResourceRecord | |
| OptRecord | |
Instances
Raw data format for each type.
Constructors
| OD_ClientSubnet Int Int IP | |
| OD_Unknown Int ByteString |
Resource Record Type
Types for resource records.
intToOptType :: Int -> OPTTYPE #
optTypeToInt :: OPTTYPE -> Int #
DNS Error
An enumeration of all possible DNS errors that can occur.
Constructors
| SequenceNumberMismatch | The sequence number of the answer doesn't match our query. This could indicate foul play. |
| TimeoutExpired | The request simply timed out. |
| UnexpectedRDATA | The answer has the correct sequence number, but returned an unexpected RDATA format. |
| IllegalDomain | The domain for query is illegal. |
| FormatError | The name server was unable to interpret the query. |
| ServerFailure | The name server was unable to process this query due to a problem with the name server. |
| NameError | This code signifies that the domain name referenced in the query does not exist. |
| NotImplemented | The name server does not support the requested kind of query. |
| OperationRefused | 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. |
| BadOptRecord | The server detected a malformed OPT RR. |
DNS Message
data DNSMessage #
Raw data format for DNS Query and Response.
Constructors
| DNSMessage | |
Fields
| |
Instances
type DNSFormat = DNSMessage #
For backward compatibility.
DNS Header
Raw data format for the header of DNS Query and Response.
Constructors
| DNSHeader | |
Fields
| |
DNS Flags
Raw data format for the flags of DNS Query and Response.
Constructors
| DNSFlags | |
Fields
| |
DNS Body
Raw data format for DNS questions.
responseAAAA :: Int -> Question -> [IPv6] -> DNSMessage #