Protocol.Dns.Header (expcap v0.1.2) View Source

A parsed DNS packet header

Link to this section Summary

Functions

Is this response authoritative?

What is the op code of this DNS packet?

Is this a query or a response?

Is recursion available?

What is the r code of this DNS packet?

Is recursion desired?

Is this response truncated?

The first bit is reserved. The second bit indciates if the response was authenticated or not. The third bit indciates if the data was authenticated or not.

Link to this section Types

Specs

t() :: %Protocol.Dns.Header{
  aa: bitstring(),
  ancnt: non_neg_integer(),
  arcnt: non_neg_integer(),
  id: binary(),
  nscnt: non_neg_integer(),
  opcode: bitstring(),
  qdcnt: non_neg_integer(),
  qr: bitstring(),
  ra: bitstring(),
  rcode: bitstring(),
  rd: bitstring(),
  tc: bitstring(),
  z: bitstring()
}

Link to this section Functions

Specs

aa_name(binary()) :: :NOT_AUTHORITATIVE | :AUTHORITATIVE | :""

Is this response authoritative?

Specs

opcode_name(non_neg_integer()) :: :QUERY | :STATUS | :NOTIFY | :UPDATE | :""

What is the op code of this DNS packet?

Specs

qr_name(binary()) :: :QUERY | :ANSWER

Is this a query or a response?

Specs

ra_name(binary()) :: :NO_RECURSION_AVAILABLE | :RECURSION_AVAILABLE | :""

Is recursion available?

Specs

rcode_name(non_neg_integer()) :: :atom

What is the r code of this DNS packet?

Specs

rd_name(binary()) :: :NO_RECURSION_DESIRED | :RECURSION_DESIRED | :""

Is recursion desired?

Specs

tc_name(binary()) :: :NOT_TRUNCATED | :TRUNCATED | :""

Is this response truncated?

Specs

z_name(binary()) :: :atom

The first bit is reserved. The second bit indciates if the response was authenticated or not. The third bit indciates if the data was authenticated or not.