Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data types for DNS Query and Response. For more information, see http://www.ietf.org/rfc/rfc1035.
- type Domain = ByteString
- type ResourceRecord = RR RDATA
- data RR a = ResourceRecord {}
- type RDATA = RD [Int]
- data RD a
- rrMapWithType :: (TYPE -> a -> b) -> RR a -> RR b
- data TYPE
- intToType :: Int -> TYPE
- typeToInt :: TYPE -> Int
- toType :: String -> TYPE
- data DNSError
- type DNSFormat = DNSMessage RDATA
- data DNSMessage a = DNSFormat {}
- dnsMapWithType :: (TYPE -> a -> b) -> DNSMessage a -> DNSMessage b
- dnsTraverseWithType :: Applicative f => (TYPE -> a -> f b) -> DNSMessage a -> f (DNSMessage b)
- data DNSHeader = DNSHeader {}
- data DNSFlags = DNSFlags {
- qOrR :: QorR
- opcode :: OPCODE
- authAnswer :: Bool
- trunCation :: Bool
- recDesired :: Bool
- recAvailable :: Bool
- rcode :: RCODE
- data QorR
- data OPCODE
- data RCODE
- data Question = Question {}
- responseA :: Int -> Question -> IPv4 -> DNSFormat
- responseAAAA :: Int -> Question -> IPv6 -> DNSFormat
Domain
type Domain = ByteString Source
Type for domain.
Resource Records
type ResourceRecord = RR RDATA Source
Raw data format for resource records.
Raw data format for each type.
rrMapWithType :: (TYPE -> a -> b) -> RR a -> RR b Source
Resource Record Type
Types for resource records.
DNS Error
An enumeration of all possible DNS errors that can occur.
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 | Meaningful only for responses from an authoritative name server, 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. |
DNS Format
type DNSFormat = DNSMessage RDATA Source
data DNSMessage a Source
Raw data format for DNS Query and Response.
Functor DNSMessage | |
Foldable DNSMessage | |
Traversable DNSMessage | |
Eq a => Eq (DNSMessage a) | |
Show a => Show (DNSMessage a) |
dnsMapWithType :: (TYPE -> a -> b) -> DNSMessage a -> DNSMessage b Source
dnsTraverseWithType :: Applicative f => (TYPE -> a -> f b) -> DNSMessage a -> f (DNSMessage b) Source
DNS Header
Raw data format for the header of DNS Query and Response.
DNS Flags
Raw data format for the flags of DNS Query and Response.
DNSFlags | |
|
DNS Body
Raw data format for DNS questions.