Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
DNS-SD support for multiple KISS ports and AGWPE
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.
  • Loading branch information
mfncooper committed Oct 5, 2025
commit cee25a8b9026252a951f413f575f269ce4526e03
6 changes: 5 additions & 1 deletion src/direwolf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ int main (int argc, char *argv[])
kissnet_init (&misc_config);

#if (USE_AVAHI_CLIENT|USE_MACOS_DNSSD)
if (misc_config.kiss_port[0] > 0 && misc_config.dns_sd_enabled)
if (misc_config.dns_sd_enabled)
dns_sd_announce(&misc_config);
#endif

Expand Down Expand Up @@ -1692,6 +1692,10 @@ static void cleanup_linux (int x)
{
text_color_set(DW_COLOR_INFO);
dw_printf ("\nQRT\n");
#if (USE_AVAHI_CLIENT|USE_MACOS_DNSSD)
if (misc_config.dns_sd_enabled)
dns_sd_term ();
#endif
log_term ();
ptt_term ();
dwgps_term ();
Expand Down
Loading
Loading