Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

mv TXT record field should use RFC9000 variable-length integer encoding #1

Closed

Description

@backkem

Note: if there is no interest in pursuing closer spec compliance/interoperability at this point, just let me know.

The mv (metadata version) field in mDNS TXT records is currently encoded and parsed as a decimal string (e.g., "0", "42"). However, the W3C OpenScreen Protocol spec requires it to be encoded as an RFC9000 (QUIC) variable-length integer.

Spec Reference

From network.bs lines 167-172:

mv: An unsigned integer value that indicates that metadata has changed. The advertising agent must update it to a greater value. This signals to the listening agent that it should connect to the advertising agent to discover updated metadata. The value should be encoded as a variable-length integer.

And from network.bs lines 425-426:

Variable-length integers are encoded in the Variable-Length Integer Encoding used by [[!RFC9000|QUIC]].

Current Behavior

  • Publishing: mv is encoded as "42" (decimal string)
  • Parsing: mv is parsed using str::parse::()

Expected Behavior

  • Publishing: mv=42 should be encoded as a single byte 0x2A (RFC9000 varint)
  • Parsing: mv should be decoded as RFC9000 varint bytes

Activity

  1. backkem commented on Jan 5, 2026

    @backkem
    ContributorAuthor

    I can open a PR if there is interest.

  2. kaidokert commented on Jan 7, 2026

    @kaidokert
    Contributor

    Thanks for the ticket !

    if there is no interest in pursuing closer spec compliance/interoperability at this point, just let me know.

    There certainly is - i'd like to get this as spec compliant as possible, unless spec turns out to have gray areas or bugs.

    If you know where/how to fix it and can do a PR, i'd certainly appreciate it.

  3. kaidokert commented on Jan 12, 2026

    @kaidokert
    Contributor

    Thanks for getting this. It behooves me it's probably worth generating some byte-by-byte reference golden messages for things like these - makes interop verification and testing more obvious.

  4. added a commit that references this issue on Jan 14, 2026
    b8a1be1
  5. added a commit that references this issue on Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions