class DNS::Header
- DNS::Header
- Reference
- Object
Defined in:
dns/header.crConstructors
- .from_io(io : IO, format : IO::ByteFormat) : self
- .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)
Instance Method Summary
- #additional_count : UInt16
- #additional_count=(additional_count : UInt16)
- #answer_count : UInt16
- #answer_count=(answer_count : UInt16)
- #authoritative : Bool
- #authoritative=(authoritative : Bool)
- #id : UInt16
- #id=(id : UInt16)
- #message_type : MessageType
- #message_type=(message_type : MessageType)
- #name_server_count : UInt16
- #name_server_count=(name_server_count : UInt16)
-
#ok? : Bool
Returns
true
if the response code is not an error. - #op_code : OpCode
- #op_code=(op_code : OpCode)
- #question_count : UInt16
- #question_count=(question_count : UInt16)
- #recursion_available : Bool
- #recursion_available=(recursion_available : Bool)
- #recursion_desired : Bool
- #recursion_desired=(recursion_desired : Bool)
- #response_code : ResponseCode
- #response_code=(response_code : ResponseCode)
- #to_io(io : IO, format : IO::ByteFormat)
- #truncation : Bool
- #truncation=(truncation : Bool)
Constructor Detail
def self.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)
#