[Development] Requesting New Repository - QtZeroConf

drwho at infidigm.net drwho at infidigm.net
Mon Nov 16 19:31:48 CET 2015


> Hi,
>
> Given that mdns uses an unprivileged port, it seems like to me it should
> be possible
> for just about any process to send and receive mdns queries. Which means
> that any
> app could participate in the mdns groups by itself if it wanted. The
> primary advantage
> that I can see with re-using a running daemon is that the daemon can
> detect if your
> process crashes and clear out the distributed DNS records. If the app
> takes care of
> that by itself, then it would have to deliberately use short TTLs I think.
>
> Interestingly enough, the protocol doesn't seem to be that complicated. A
> cross-platform
> implementation written in Go is under 1000 LOC (server and client, count
> includes comments):
>
>     https://github.com/hashicorp/mdns
>
>
> So an alternate approach would be to try to implement the protocol by
> itself.
>
>
> Another option that I think would be viable is to go up in the level of
> abstraction
> and try to come up with an API that allows discovery and publishing of
> network
> services on mdns as well as UPNP at the same time. Then the windows
> version could
> just re-use UPNP APIs in Windows and on the other OSes we use zeroconf.

ssdp discovers devices, zeroconf discovers services (on devices).  ssdp
has different classes of devices (eg. rootdevice).  zeroconf has optional
txt records.  I don't see a way to combine these into a higher level of
abstraction.

-- ssdp --
registerResourceSimple(const char *target, const char *usn, const char
*location)
registerResourceSimple("upnp:rootdevice",
"uuid:1234abcd-12ab-12ab-12ab-1234567abc12::upnp:rootdevice",
"http://192.168.1.100/");

-- ZeroConf --
registerService(const char *name, const char *type, const char *domain,
quint16 port);
registerService("Vaction-Tracker-server", "_vactracker._tcp", "local",
12345);

I have completed testing of my zeroconf project on Linux, Android, Windows
and Mac.  I would like to contribute the code to the playground area with
the project name zeroconf with the hope of it someday becoming a sub
module.

Jon




More information about the Development mailing list