You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Implement TR-10-9 Section 15 DNS-SD browse strategy
TR-10-9 Section 15 requires IPMX devices to:
- Support both mDNS and unicast DNS for DNS-SD browse operations
- Default to using both methods
- Provide user mechanisms to limit browsing to unicast or mDNS only
- When using both: try unicast DNS first, fall back to mDNS only
if unicast is unsuccessful (no service discovered)
- When multiple results are returned: select by best priority,
failing over to next-best if unresponsive
- Once a service is selected and responsive: perform no further
browse operations for that service type
- If the selected service becomes unresponsive: perform a new
DNS-SD browse and restart selection
Add dns_sd_browse_mode setting ("both"/"unicast"/"mdns") to implement
the required dual-discovery strategy. In "both" mode (default), unicast
DNS is tried first with half the timeout budget; if no records are
found, mDNS fallback gets the remaining half. "unicast" and "mdns"
modes restrict to a single method.
Also filters browse results by domain class to prevent mDNS results
leaking into unicast DNS queries and vice versa.
Signed-off-by: Semyon Barenboym <simonbaren@gmail.com>
* Address review feedback on TR-10-9 DNS-SD browse strategy
- Use string_enum for dns_sd_browse_mode (nmos::dns_sd_browse_modes::{both,unicast,mdns})
- Add dns_sd_browse_mode example + behaviour table to nmos-cpp-node config.json
- Add expected-behaviour table to settings.h
- Mark unused URI-returning resolve_service overload as deprecated (comment)
- Refresh resolve_service / resolve_service_ doc comments in mdns.h/.cpp
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Use full discovery timeout for both primary and fallback browse
Per maintainer review (jonathan-r-thorpe, lo-simon): the primary service
timeout should remain unchanged when a fallback is in play, with the same
timeout applied per service rather than halved across them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Switch dns_sd_browse_mode from string to integer enum
Per lo-simon's review: use a typed enum (compile-checked) rather than a
string to reduce typo risk in user configurations.
- enum dns_sd_browse_mode { dns_sd_browse_mode_both = 0, _unicast = 1,
_mdns = 2 } defined file-local in mdns.cpp under nmos::experimental,
mirroring how href_mode lives in settings.cpp
- field becomes field_as_integer_or with default 0
- example config.json now shows //"dns_sd_browse_mode": 0,
- doc comments updated; dns_sd_browse_mode.h header removed
Used dns_sd_browse_mode_* prefix on the enumerators (rather than the bare
both/unicast/mdns suggested in the review) to avoid polluting nmos:: with
generic identifiers, matching the href_mode_* convention.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Signed-off-by: Semyon Barenboym <simonbaren@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: Development/nmos-cpp-node/config.json
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,21 @@
85
85
// domain [registry, node]: the domain on which to browse for services or an empty string to use the default domain (specify "local." to explictly select mDNS)
86
86
//"domain": "",
87
87
88
+
// dns_sd_browse_mode [node]: DNS-SD browse method per TR-10-9 Section 15
89
+
// both(0) (default) = unicast DNS first, mDNS fallback if unsuccessful
90
+
// unicast(1) = unicast DNS only
91
+
// mdns(2) = mDNS only
92
+
// Expected resolve behaviour for each (mode, domain) combination:
93
+
// mode | domain | behaviour
94
+
// --------+-------------+--------------------
95
+
// both | example.com | unicast -> mdns
96
+
// both | local. | mdns
97
+
// unicast | example.com | unicast
98
+
// unicast | local. | mdns
99
+
// mdns | example.com | mdns
100
+
// mdns | local. | mdns
101
+
//"dns_sd_browse_mode": 0,
102
+
88
103
// host_address/host_addresses [registry, node]: IP addresses used to construct response headers (e.g. 'Link' or 'Location'), and host and URL fields in the data model
// "The Node [filters] out any APIs which do not support its required API version, protocol and authorization mode (TXT api_ver, api_proto and api_auth)."
@@ -625,8 +643,9 @@ namespace nmos
625
643
}
626
644
}
627
645
628
-
// helper function for resolving instances of the specified service (API)
629
-
// with the highest version, highest priority instances at the front, and optionally services with the same priority ordered randomly
646
+
// Helper function for resolving instances of the specified service (API), returning ((api_version, priority), uri)
647
+
// tuples so callers can inspect the matched version and priority. Highest version and highest priority first,
648
+
// and optionally services with the same priority ordered randomly.
Copy file name to clipboardExpand all lines: Development/nmos/settings.h
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,21 @@ namespace nmos
82
82
// domain [registry, node]: the domain on which to browse for services or an empty string to use the default domain (specify "local." to explictly select mDNS)
// host_address/host_addresses [registry, node]: IP addresses used to construct response headers (e.g. 'Link' or 'Location'), and host and URL fields in the data model
0 commit comments