DNS-SD support for multiple KISS ports and AGWPE #603
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dire Wolf 1.7 introduced the ability to configure multiple KISS TCP ports, each for a single radio channel. However, DNS Service Discovery announced only the first configured port. This set of changes expands DNS-SD support to announce all configured KISS TCP ports, and adds support for announcing the AGWPE port if configured. The functionality is available on both Linux and Mac. (Dire Wolf does not currently support DNS Service Discovery on Windows.)
Details of these changes follow.
On both Linux and Mac:
All configured KISS TCP and AGWPE ports are announced via DNS-SD.
Announcement messages include radio channel where appropriate.
Cleanup code added to gracefully shut down and de-register from DNS-SD on exit or error.
DNS-SD code now checks for services to publish, so that the caller doesn't need to do this.
Standard Dire Wolf style comments added for all functions.
On Linux only:
Handling of service name collisions is now iterative rather than recursive.
No more gotos.
On Mac only:
Now-complete implementation includes event loop for handling notifications from the DNS-SD daemon, which were previously lost.
As a consequence of the above, successful announcement message now appears in the console (as it did before only for Linux).
Text color set properly for console messages.
These changes have been tested with as many combinations of config settings as possible, on Linux Mint 22.1 and macOS Sequoia 15.6.1.