DNSServiceRegister port argument is supposed to be in network byte order. It was being sent in host byte order. I confirmed using avahi-browse -avtlr on a different network node.
Fix a network to host byte order bug (the same bug probably still exi…
…sts when reading a port for registered servies over the network)
Committed this as f71474d with fixed commit message and whitespace in the code (tabs->spaces). Thanks!