DNS.Record (dns v2.2.0)

DNS.Record is a module and struct definition for serializing and parsing DNS records.

Link to this section Summary

Functions

Decodes a binary record into a DNS.Record struct.

Serializes a DNS.Record into its binary representation.

Converts a :dns_rec record into a DNS.Record.

Converts a DNS.Record struct to a :dns_rec record.

Link to this section Types

Specs

t() :: %DNS.Record{
  anlist: term(),
  arlist: term(),
  header: term(),
  nslist: term(),
  qdlist: term()
}

Link to this section Functions

Specs

decode(binary()) :: t()

Decodes a binary record into a DNS.Record struct.

Serializes a DNS.Record into its binary representation.

Link to this function

from_record(dns_rec)

Converts a :dns_rec record into a DNS.Record.

Link to this function

to_record(struct)

Converts a DNS.Record struct to a :dns_rec record.