Discovered devices get names from the mDNS and NetBIOS announcements they already send, on by default #259

Open
opened 2026-10-31 12:42:36 -04:00 by claude · 0 comments
Owner
  • Draft: PN-73
  • Priority: low (improves discovered-device names; nothing depends on it)
  • Agent: protocol-coder
  • Depends on: #145
  • Decisions: Q-PN-17, R2-PN73

Why

#145 creates discovered devices with an empty DisplayName. Many devices already announce a name on the LAN by multicast DNS (RFC 6762) or the NetBIOS name service (RFC 1001, RFC 1002). Listening needs no vendor API and sends nothing, so it fits the passive stance (ENVIRONMENT.md:444).

What changes

  • A Linux-only listener in src/dotnet/src/Ninlil.Dns.Server.ClientIdentity/Presence/:
    • mDNS: join 224.0.0.251 and ff02::fb on UDP 5353 with address reuse, so a host mDNS daemon keeps working (RFC 6762 §15). Read A/AAAA records in unsolicited announcements and in responses (RFC 6762 §8.3); never send a query.
    • NetBIOS: read name registration broadcasts on UDP 137 (RFC 1002 §4.2.2). If the port is taken (for example by a file-sharing daemon), log once and keep running without it.
  • Passive only (R2-PN73): the listener never sends a packet of any kind.
  • Map the announced address to a sighted MAC through the neighbor table the presence tracker already reads, and set DisplayName only where it is empty, so an operator's name is never overwritten.
  • ClientPresenceOptions.EnableNameDiscovery, default true (R2-PN73); ENVIRONMENT.md row and totals; README presence section.

Acceptance

  • This test fails first: with a fake socket that delivers an RFC 6762 announcement for a known MAC's address, Listen_ForAnAnnouncement_SetsTheEmptyDisplayName.
  • Tests: an existing name is kept; a malformed packet is ignored; a busy port 137 does not stop mDNS naming; the option defaults to true; the listener's socket fake records no send.
  • Gate: dotnet test src/dotnet/tests/Ninlil.Dns.Server.ClientIdentity.Tests.

Source

audit-feature-parity.md §2B #44.
Owner decision 2026-10-31: "device naming: passive mDNS/NetBIOS, later" (Q-PN-17); round 2: "on by default, passive only" (R2-PN73).

- **Draft:** PN-73 - **Priority:** low (improves discovered-device names; nothing depends on it) - **Agent:** protocol-coder - **Depends on:** #145 - **Decisions:** Q-PN-17, R2-PN73 ### Why #145 creates discovered devices with an empty `DisplayName`. Many devices already announce a name on the LAN by multicast DNS (RFC 6762) or the NetBIOS name service (RFC 1001, RFC 1002). Listening needs no vendor API and sends nothing, so it fits the passive stance (ENVIRONMENT.md:444). ### What changes - A Linux-only listener in `src/dotnet/src/Ninlil.Dns.Server.ClientIdentity/Presence/`: - mDNS: join 224.0.0.251 and ff02::fb on UDP 5353 with address reuse, so a host mDNS daemon keeps working (RFC 6762 §15). Read A/AAAA records in unsolicited announcements and in responses (RFC 6762 §8.3); never send a query. - NetBIOS: read name registration broadcasts on UDP 137 (RFC 1002 §4.2.2). If the port is taken (for example by a file-sharing daemon), log once and keep running without it. - Passive only (R2-PN73): the listener never sends a packet of any kind. - Map the announced address to a sighted MAC through the neighbor table the presence tracker already reads, and set `DisplayName` only where it is empty, so an operator's name is never overwritten. - `ClientPresenceOptions.EnableNameDiscovery`, default `true` (R2-PN73); ENVIRONMENT.md row and totals; README presence section. ### Acceptance - [ ] This test fails first: with a fake socket that delivers an RFC 6762 announcement for a known MAC's address, `Listen_ForAnAnnouncement_SetsTheEmptyDisplayName`. - [ ] Tests: an existing name is kept; a malformed packet is ignored; a busy port 137 does not stop mDNS naming; the option defaults to `true`; the listener's socket fake records no send. - [ ] Gate: `dotnet test src/dotnet/tests/Ninlil.Dns.Server.ClientIdentity.Tests`. ### Source `audit-feature-parity.md` §2B #44. Owner decision 2026-10-31: "device naming: passive mDNS/NetBIOS, later" (Q-PN-17); round 2: "on by default, passive only" (R2-PN73).
claude added this to the (deleted) milestone 2026-10-31 12:42:36 -04:00
claude removed this from the (deleted) milestone 2026-11-06 12:28:36 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lantea-one/ninlil#259
No description provided.