class

MDNS::Message

Inherits BinData / Reference / Object

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

bit_fields

https://tools.ietf.org/html/rfc1035#page-26

Source

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.

Source
additional
additional=(additional : Array(Resource))
additional_record_count
additional_record_count=(additional_record_count : UInt16)
answer_count
answer_count=(answer_count : UInt16)
answers
answers=(answers : Array(Resource))
authoritative_answer
Source
authoritative_answer=(authoritative_answer : UInt8)
authoritative_answer=(value : Bool)
Source
is_response
Source
is_response=(is_response : UInt8)
is_response=(value : Bool)
Source
message_id
message_id=(message_id : UInt16)
name_server_count
name_server_count=(name_server_count : UInt16)
name_servers
name_servers=(name_servers : Array(Resource))
operation_code
operation_code=(operation_code : UInt8)
operation_code=(value : MDNS::OperationCode)
queries
queries=(queries : Array(Query))
query(domain : String, type : Type = Type::PTR, record_class : RecordClass = RecordClass::Internet, unicast_response : Bool = false)
Source
query?
Source
query_count
query_count=(query_count : UInt16)
recursion_available
Source
recursion_available=(recursion_available : UInt8)
recursion_available=(value : Bool)
Source
recursion_desired
Source
recursion_desired=(recursion_desired : UInt8)
recursion_desired=(value : Bool)
Source
reserved

Should always be 0

reserved=(reserved : UInt8)

Should always be 0

response?
Source
response_code
response_code=(response_code : UInt8)
response_code=(value : MDNS::ResponseCode)
set_io(io : IO::Memory)

This is used for lazily decompressing the domain strings

Source
truncation
Source
truncation=(truncation : UInt8)
truncation=(value : Bool)
Source