dns-3.0.4: DNS library in Haskell

Safe Haskell | None
Language | Haskell2010

Network.DNS.Decode

Contents

- Decoder
  - Decoder for Each Part

Description

Decoders for DNS.

Synopsis

- decode :: ByteString -> Either DNSError DNSMessage
- decodeMany :: ByteString -> Either DNSError ([DNSMessage], ByteString)
- decodeResourceRecord :: ByteString -> Either DNSError ResourceRecord
- decodeDNSHeader :: ByteString -> Either DNSError DNSHeader
- decodeDNSFlags :: ByteString -> Either DNSError DNSFlags
- decodeDomain :: ByteString -> Either DNSError Domain
- decodeMailbox :: ByteString -> Either DNSError Mailbox

# Decoder

decode :: ByteString -> Either DNSError DNSMessage Source #

Decoding DNS query or response.

decodeMany :: ByteString -> Either DNSError ([DNSMessage], ByteString) Source #

Parse many length-encoded DNS records, for example, from TCP traffic.

## Decoder for Each Part

decodeResourceRecord :: ByteString -> Either DNSError ResourceRecord Source #

Decoding resource record.

decodeDNSHeader :: ByteString -> Either DNSError DNSHeader Source #

Decoding DNS header.

decodeDNSFlags :: ByteString -> Either DNSError DNSFlags Source #

Decoding DNS flags.

decodeDomain :: ByteString -> Either DNSError Domain Source #

Decoding domain.

decodeMailbox :: ByteString -> Either DNSError Mailbox Source #

Decoding mailbox.