MDNS::Message
https://tools.ietf.org/html/rfc1035#page-26
Constants
AFTER_DESERIALIZE = [] of Nil
https://tools.ietf.org/html/rfc1035#page-26
BEFORE_SERIALIZE = [] of Nil
https://tools.ietf.org/html/rfc1035#page-26
ENDIAN = ["big"]
https://tools.ietf.org/html/rfc1035#page-26
KLASS_NAME = [MDNS::Message]
https://tools.ietf.org/html/rfc1035#page-26
PARTS = [{type: "basic", name: message_id, cls: UInt16, onlyif: nil, verify: nil, value: nil}, {type: "bitfield", name: 3, cls: MDNS::Message,
onlyif: nil, verify: nil, endian: IO::ByteFormat::BigEndian}, {type: "basic", name: query_count, cls: UInt16, onlyif: nil, verify: nil, value: -> do
queries.size
end}, {type: "basic", name: answer_count, cls: UInt16, onlyif: nil, verify: nil, value: -> do
answers.size
end}, {type: "basic", name: name_server_count, cls: UInt16, onlyif: nil, verify: nil, value: -> do
name_servers.size
end}, {type: "basic", name: additional_record_count, cls: UInt16, onlyif: nil, verify: nil, value: -> do
additional.size
end}, {type: "array", name: queries, cls: Query,
onlyif: nil, verify: nil, length: -> do
query_count
end,
value: nil}, {type: "array", name: answers, cls: Resource,
onlyif: nil, verify: nil, length: -> do
answer_count
end,
value: nil}, {type: "array", name: name_servers, cls: Resource,
onlyif: nil, verify: nil, length: -> do
name_server_count
end,
value: nil}, {type: "array", name: additional, cls: Resource,
onlyif: nil, verify: nil, length: -> do
additional_record_count
end,
value: nil}] of Nil
https://tools.ietf.org/html/rfc1035#page-26
REMAINING = [] of Nil
https://tools.ietf.org/html/rfc1035#page-26
Class methods
Instance methods
__format__
A group or bit_field captures the endianness at its declaration point, so
declaring endian after one would silently leave it system-endian. Fail loudly.
additional
additional_record_count
additional_record_count=(additional_record_count : UInt16)
answer_count
answer_count=(answer_count : UInt16)
answers
authoritative_answer
Sourceauthoritative_answer=(authoritative_answer : UInt8)
is_response
Sourceis_response=(is_response : UInt8)
message_id
message_id=(message_id : UInt16)
name_server_count
name_server_count=(name_server_count : UInt16)
name_servers
operation_code
operation_code=(operation_code : UInt8)
operation_code=(value : MDNS::OperationCode)
queries
query(domain : String, type : Type = Type::PTR, record_class : RecordClass = RecordClass::Internet, unicast_response : Bool = false)
Sourcequery?
Sourcequery_count
query_count=(query_count : UInt16)
recursion_available
Sourcerecursion_available=(recursion_available : UInt8)
recursion_desired
Sourcerecursion_desired=(recursion_desired : UInt8)
reserved
Should always be 0
reserved=(reserved : UInt8)
Should always be 0
response?
Sourceresponse_code
response_code=(response_code : UInt8)
response_code=(value : MDNS::ResponseCode)
truncation
Sourcetruncation=(truncation : UInt8)