dns_record (dns_erlang v4.2.0)

View Source

The dns_record module exports serialise and deserialise functions for serialising and deserialising messages.

You will generally not use these functions directly, rather you will use the functions for encoding and decoding messages exported by dns.

Summary

Types

Options available for serialisation and deserialisation.

t()

Module's core type.

Functions

Deserialise a given term into a dns record

Serialise a dns record.

Types

opts()

-type opts() :: #{wrap_fun => fun((t()) -> t())}.

Options available for serialisation and deserialisation.

t()

-type t() :: binary() | {binary(), proplists:proplist()}.

Module's core type.

Functions

deserialise(Term)

-spec deserialise(t()) -> bitstring() | tuple().

Equivalent to deserialise(Bin, #{}).

deserialise(Term, Opts)

-spec deserialise(t(), opts()) -> bitstring() | tuple().

Deserialise a given term into a dns record

serialise/1

-spec serialise(binary() | tuple()) -> any().

Equivalent to serialise(Bin, #{}).

serialise(Term, Opts)

-spec serialise(binary() | tuple(), opts()) -> any().

Serialise a dns record.