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
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) <[email protected]>
Copy file name to clipboardExpand all lines: Development/nmos-cpp-node/config.json
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -86,9 +86,9 @@
86
86
//"domain": "",
87
87
88
88
// dns_sd_browse_mode [node]: DNS-SD browse method per TR-10-9 Section 15
89
-
// "both" (default) = unicast DNS first, mDNS fallback if unsuccessful
90
-
// "unicast" = unicast DNS only
91
-
// "mdns" = mDNS only
89
+
// both(0) (default) = unicast DNS first, mDNS fallback if unsuccessful
90
+
// unicast(1) = unicast DNS only
91
+
// mdns(2) = mDNS only
92
92
// Expected resolve behaviour for each (mode, domain) combination:
93
93
// mode | domain | behaviour
94
94
// --------+-------------+--------------------
@@ -98,7 +98,7 @@
98
98
// unicast | local. | mdns
99
99
// mdns | example.com | mdns
100
100
// mdns | local. | mdns
101
-
//"dns_sd_browse_mode": "both",
101
+
//"dns_sd_browse_mode": 0,
102
102
103
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
// 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