Protocol.Dns.Header

A parsed DNS packet header

Source

Summary

aa_name(aa)

Is this response authoritative?

opcode_name(opcode)

What is the op code of this DNS packet?

qr_name(qr)

Is this a query or a response?

ra_name(ra)

Is recursion available?

rcode_name(rcode)

What is the r code of this DNS packet?

rd_name(rd)

Is recursion desired?

tc_name(tc)

Is this response truncated?

z_name(z)

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

Types

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

Functions

aa_name(aa)

Specs:

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

Is this response authoritative?

Source
opcode_name(opcode)

Specs:

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

What is the op code of this DNS packet?

Source
qr_name(qr)

Specs:

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

Is this a query or a response?

Source
ra_name(ra)

Specs:

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

Is recursion available?

Source
rcode_name(rcode)

Specs:

  • rcode_name(non_neg_integer) :: :atom

What is the r code of this DNS packet?

Source
rd_name(rd)

Specs:

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

Is recursion desired?

Source
tc_name(tc)

Specs:

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

Is this response truncated?

Source
z_name(z)

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.

Source