class MDNS::Message

Overview

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

Defined in:

dns/message.cr

Constant Summary

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}, {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 Method Summary

Instance Method Summary

Macro Summary

Class Method Detail

def self.bit_fields #

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


[View source]

Instance Method Detail

def __format__ : IO::ByteFormat #

[View source]
def additional : Array(Resource) #

def additional=(additional : Array(Resource)) #

def additional_record_count : UInt16 #

def additional_record_count=(additional_record_count : UInt16) #

def answer_count : UInt16 #

def answer_count=(answer_count : UInt16) #

def answers : Array(Resource) #

def answers=(answers : Array(Resource)) #

def authoritative_answer : Bool #

[View source]
def authoritative_answer=(authoritative_answer : UInt8) #

def authoritative_answer=(value : Bool) #

[View source]
def is_response : Bool #

[View source]
def is_response=(is_response : UInt8) #

def is_response=(value : Bool) #

[View source]
def message_id : UInt16 #

def message_id=(message_id : UInt16) #

def name_server_count : UInt16 #

def name_server_count=(name_server_count : UInt16) #

def name_servers : Array(Resource) #

def name_servers=(name_servers : Array(Resource)) #

def operation_code : OperationCode #

[View source]
def operation_code=(operation_code : UInt8) #

def operation_code=(value : OperationCode) #

[View source]
def queries : Array(Query) #

def queries=(queries : Array(Query)) #

def query(domain : String, type : Type = Type::PTR, record_class : RecordClass = RecordClass::Internet, unicast_response : Bool = false) #

[View source]
def query? #

[View source]
def query_count : UInt16 #

def query_count=(query_count : UInt16) #

def recursion_available : Bool #

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

def recursion_available=(value : Bool) #

[View source]
def recursion_desired : Bool #

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

def recursion_desired=(value : Bool) #

[View source]
def reserved : UInt8 #

Should always be 0


def reserved=(reserved : UInt8) #

Should always be 0


def response? #

[View source]
def response_code : ResponseCode #

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

def response_code=(value : ResponseCode) #

[View source]
def set_io(io : IO::Memory) #

This is used for lazily decompressing the domain strings


[View source]
def truncation : Bool #

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

def truncation=(value : Bool) #

[View source]

Macro Detail

macro mdns_domain_name_component(name, onlyif = nil, verify = nil, value = nil) #

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


[View source]
macro mdns_domain_name_pointer(name, onlyif = nil, verify = nil, value = nil) #

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


[View source]
macro mdns_message(name, onlyif = nil, verify = nil, value = nil) #

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


[View source]
macro mdns_query(name, onlyif = nil, verify = nil, value = nil) #

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


[View source]
macro mdns_resource(name, onlyif = nil, verify = nil, value = nil) #

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


[View source]
macro mdns_rr_character_string(name, onlyif = nil, verify = nil, value = nil) #

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


[View source]
macro mdns_rr_hardware_info(name, onlyif = nil, verify = nil, value = nil) #

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


[View source]
macro mdns_rr_mail_exchange(name, onlyif = nil, verify = nil, value = nil) #

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


[View source]
macro mdns_rr_option(name, onlyif = nil, verify = nil, value = nil) #

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


[View source]
macro mdns_rr_service(name, onlyif = nil, verify = nil, value = nil) #

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


[View source]