mik1e80/dnssd/src/wire does not have a README file

    WireError

    pub suberror WireError {
    Malformed(String)
    }

    impl Show for WireError

    WireError::output

    #deprecated("`WireError::output` is deprecated, use `Show::output` instead.")
    fn WireError::output(self : WireError, logger : &Logger) -> Unit

    WireError::to_string

    #deprecated("`WireError::to_string` is deprecated, use `Show::to_string` instead.")
    fn WireError::to_string(self : WireError) -> String

    Message

    pub(all) struct Message {
    id : Int
    flags : Int
    questions : Array[Question]
    records : Array[Record]
    }

    Question

    pub(all) struct Question {
    name :
    DnsName

    rr_type : Int
    rr_class : Int
    unicast_response : Bool
    }

    RData

    pub(all) enum RData {
    A(Bytes)
    Aaaa(Bytes)
    Ptr(
    DnsName
    )
    Srv(Int, Int, Int,
    DnsName
    )
    Txt(
    TxtRecord
    )
    Unknown(Bytes)
    }

    Record

    pub(all) struct Record {
    name :
    DnsName

    rr_type : Int
    rr_class : Int
    cache_flush : Bool
    ttl : UInt
    data : RData
    section : Section
    }

    Section

    pub(all) enum Section {
    Answer
    Authority
    Additional
    }

    decode

    fn decode(data : Bytes) -> Message raise WireError

    Limited DNS-SD decoder. Unknown RR stays opaque; no cache acceptance implied.

    decode_name

    fn decode_name(data : Bytes, start : Int) -> (
    DnsName
    , Int) raise WireError

    Decode a compressed name; cap dereferences and enforce octet limits.

    qm_query

    fn qm_query(name :
    DnsName
    , rr_type : Int) -> Bytes raise WireError

    query_packets

    fn query_packets(name :
    DnsName
    , rr_type : Int, answers : Array[Record], max_size? : Int, max_packets? : Int) -> Array[Bytes] raise WireError

    RFC 6762 7.2: question in the first packet, answer-only continuations, TC on every packet except the last. Caller sends the returned burst together. At most max_packets * 256 - 1 answers (16383 by default); byte limits can reduce this capacity. An error never returns a partial burst.

    query_with_answers

    fn query_with_answers(name :
    DnsName
    , rr_type : Int, answers : Array[Record]) -> Bytes raise WireError

    A single bounded QM query. Oversized Known-Answer sets return an error; multi-packet KA is deliberately not approximated by silent truncation.