Matter::MDNS::RecordBuilder
Helper for building DNS resource records for mDNS
Constants
CLASS_IN = 1_u16
DNS class codes
CLASS_IN_CACHE_FLUSH = 32769_u16
TYPE_A = 1_u16
DNS record types
TYPE_AAAA = 28_u16
TYPE_PTR = 12_u16
TYPE_SRV = 33_u16
TYPE_TXT = 16_u16
Instance methods
build_a(hostname : String, ip : Socket::IPAddress, ttl : Time::Span) : DNS::Packet::ResourceRecord
Build A record (IPv4 address)
build_aaaa(hostname : String, ip : Socket::IPAddress, ttl : Time::Span) : DNS::Packet::ResourceRecord
Build AAAA record (IPv6 address)
build_nsec(name : String, next_domain : String, types : Array(UInt16), ttl : Time::Span) : DNS::Packet::ResourceRecord
Build NSEC record (for negative caching - optional but recommended) Indicates which record types exist for a name
build_ptr(service : String, instance : String, ttl : Time::Span, cache_flush : Bool = false) : DNS::Packet::ResourceRecord
Build PTR record (for service enumeration) Points service type to instance name
build_srv(instance : String, port : Int32, target : String, ttl : Time::Span, priority : UInt16 = 0_u16, weight : UInt16 = 0_u16) : DNS::Packet::ResourceRecord
Build SRV record (service location: priority, weight, port, target)
build_txt(instance : String, txt_records : Hash(String, String), ttl : Time::Span) : DNS::Packet::ResourceRecord
Build TXT record (service metadata as key=value pairs)