Zeroconfig and Multicast DNS
Fredrik Lindberg
fli+freebsd-net at shapeshifter.se
Tue Aug 22 08:45:51 UTC 2006
Pat Lashley wrote:
>
> Is your library API fairly close to the one in mDNSResponder or gmdns?
> If so, it should be fairly easy to make your apps work with whichever
> library is installed. (I'm just thinking ahead to the point where
> projects like Apache, Firefox, and various GNOME apps have added service
> announcement/discovery and sysadmins are asking themselves why they need
> three different mDNS libraries installed at once...)
>
> Also, you mention the discovery client/agent; but not the advertisement.
> I'd really like to see an easy way to advertise services without having
> to modify the daemons to announce themselves. I'm particularly thinking
> of long-running daemons for services like http, ssh, ftp, etc.; where
> the service is generally made available as part of the boot sequence. It
> would really be great if the service advertisement could be done as a
> one-line addition to their rc scripts. (Something like: '[ -x
> /path/to/announcer ] && announce service' would be safe even if the mDNS
> stuff isn't installed. Actually, I suppose you'd also want a line to
> revoke the annoouncement in the 'stop' section. )
>
My responder does one thing (ok it's many things but anyway), it
responds to queries and it makes queries. A mDNS record is always
a mDNS record (shared or unique), at this point SD records are
treated as any other record.
Long-term records can be configured with responderd.conf, it
supports dynamic variables such as $hostname, $ifaddr, $ifname etc.
Once the daemon is running, you are able to communicate with it
through a UNIX pipe socket.
Through this socket you're able to make queries, add/remove records,
dump/flush the cache etc.
Of course this allows you to create records through rc scripts on
start up and removal of records on shutdown.
Creating a library that mimic the API of mDNSresponder or gmdns
around this pipe shouldn't be a problem, but I haven't studied any
of their APIs so I can't say for sure.
IMHO, SD really needs a set of standardized library calls, an
application that wants to publish a SD record shouldn't need to
worry about which type of responder program that is running on the host.
Fredrik Lindberg
More information about the freebsd-net
mailing list