I'm very sorry for having not responded to this thread.
David, the security concern on arbitrary use of service discovery is that it could be used to local known vulnerable devices (e.g. a router) that exposes a service in a particular way, and to initiate an attack against that device. I believe there was a proof-of-concept of such an attack - I forget the router make/model, but it was a relatively popular one. However, this was more a concern for the web (in the context of the NSD API) than it would be for apps which can already request socket permission and could already make educated guesses. So I'm guessing this would not be blocking for opening up the mDNS API.
Our team hasn't (and still doesn't) have much bandwidth to generalize the API to support discovery of arbitrary services, but miket@, can you provide pointers/guidance to what David or others should do if they'd like to take on this task?
I'll also circle back with a few folks in our team for further thoughts on this. Sorry again for the delays.
Mark.