Once a time, there was a "standard" protocol called "Service Location Protocol" (or "SLP", for the friends), that was designed for this purpose. There also were some implementations for it (that were open-source, secure, and ran stable & interoperable on many platforms, like "OpenSLP.org"), and useful client libraries for many languages (maybe with the exception of some immature platforms like .NET, isn't?).
But they were all free, and anybody liked to use them, because they preffered to get the extraordinary support of commercial vendors.
So they soft-disappeared between the micro-time doors.