Turns out the avahi-compatibility layer api doesn't have a DNSServiceGetAddrInfo function, meaning we have to use getaddrinfo.  Added a new function to hide the messy #ifdef, which completely diverges: If HAVE_EMBEDDED_MDNS is defined, then DNSServiceGetAddrInfo is used. In addition to an extra callback, this requires deleting the callback's service reference when complete (this can't be done in the callback because we will only know whether the returned info is valid at the end of the connect callback). If it is not defined, then we call getaddrinfo and pass the results to bip_net_connect. This is essentially the same as the behavior before embedded mDNS was added.
Turns out the avahi-compatibility layer api doesn't have a DNSServiceGetAddrInfo function, meaning we have to use getaddrinfo.  Added a new function to hide the messy #ifdef, which completely diverges:
If HAVE_EMBEDDED_MDNS is defined, then DNSServiceGetAddrInfo is used. In addition to an extra callback, this requires deleting the callback's service reference when complete (this can't be done in the callback because we will only know whether the returned info is valid at the end of the connect callback).
If it is not defined, then we call getaddrinfo and pass the results to bip_net_connect. This is essentially the same as the behavior before embedded mDNS was added.

ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead