class DNS::Header

Defined in:

dns/header.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_io(io : IO, format : IO::ByteFormat) : self #

[View source]
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) #

[View source]

Instance Method Detail

def additional_count : UInt16 #

[View source]
def additional_count=(additional_count : UInt16) #

[View source]
def answer_count : UInt16 #

[View source]
def answer_count=(answer_count : UInt16) #

[View source]
def authoritative : Bool #

[View source]
def authoritative=(authoritative : Bool) #

[View source]
def id : UInt16 #

[View source]
def id=(id : UInt16) #

[View source]
def message_type : MessageType #

[View source]
def message_type=(message_type : MessageType) #

[View source]
def name_server_count : UInt16 #

[View source]
def name_server_count=(name_server_count : UInt16) #

[View source]
def ok? : Bool #

Returns true if the response code is not an error.


[View source]
def op_code : OpCode #

[View source]
def op_code=(op_code : OpCode) #

[View source]
def question_count : UInt16 #

[View source]
def question_count=(question_count : UInt16) #

[View source]
def recursion_available : Bool #

[View source]
def recursion_available=(recursion_available : Bool) #

[View source]
def recursion_desired : Bool #

[View source]
def recursion_desired=(recursion_desired : Bool) #

[View source]
def response_code : ResponseCode #

[View source]
def response_code=(response_code : ResponseCode) #

[View source]
def to_io(io : IO, format : IO::ByteFormat) #

[View source]
def truncation : Bool #

[View source]
def truncation=(truncation : Bool) #

[View source]