DNS.Message.Record.Data.Behaviour behaviour (DNS v0.5.0)
View SourceBehaviour for DNS record data implementations.
This module defines the interface that all DNS record data implementations must follow. Implementations should implement the DNS.Parameter and String.Chars protocols as well.
Summary
Callbacks
Parse record data from binary format.
Create a new record data instance from the given raw data. The raw data format varies by record type.
Get the length of the record data in binary format.
Return the DNS record type code for this implementation.
Validate the record data structure and content.
Types
Callbacks
Parse record data from binary format.
Create a new record data instance from the given raw data. The raw data format varies by record type.
@callback rdlength(t()) :: non_neg_integer()
Get the length of the record data in binary format.
@callback record_type() :: non_neg_integer()
Return the DNS record type code for this implementation.
Validate the record data structure and content.