class

DNS::Header

Inherits Reference < Object

Constructors

from_io(io : IO, format : IO::ByteFormat) : self
Source
new(message_type : DNS::MessageType = MessageType::Query, op_code : DNS::OpCode = OpCode::Query, id : UInt16 = 0_u16, authoritative : Bool = false, truncation : Bool = false, recursion_desired : Bool = false, recursion_available : Bool = false, response_code : DNS::ResponseCode = ResponseCode::NoError, question_count : UInt16 = 0_u16, answer_count : UInt16 = 0_u16, name_server_count : UInt16 = 0_u16, additional_count : UInt16 = 0_u16)
Source

Instance methods

additional_count
Source
additional_count=(additional_count : UInt16)
Source
answer_count
Source
answer_count=(answer_count : UInt16)
Source
authoritative
Source
authoritative=(authoritative : Bool)
Source
id=(id : UInt16)
Source
message_type
Source
message_type=(message_type : MessageType)
Source
name_server_count
Source
name_server_count=(name_server_count : UInt16)
Source
ok?

Returns true if the response code is not an error.

Source
op_code
Source
op_code=(op_code : OpCode)
Source
question_count
Source
question_count=(question_count : UInt16)
Source
recursion_available
Source
recursion_available=(recursion_available : Bool)
Source
recursion_desired
Source
recursion_desired=(recursion_desired : Bool)
Source
response_code
Source
response_code=(response_code : ResponseCode)
Source
to_io(io : IO, format : IO::ByteFormat)
Source
truncation
Source
truncation=(truncation : Bool)
Source