Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Aug 2006 10:45:02 +0200
From:      Fredrik Lindberg <fli+freebsd-net@shapeshifter.se>
To:        Pat Lashley <patl+freebsd@volant.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Zeroconfig and Multicast DNS
Message-ID:  <44EAC40E.9000904@shapeshifter.se>
In-Reply-To: <9C04919EE684029A410DE208@garrett.local>
References:  <44E9F991.7020309@shapeshifter.se> <DD49A62B2AB4E38804FB10B6@garrett.local> <44EA1926.2000501@shapeshifter.se> <9C04919EE684029A410DE208@garrett.local>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44EAC40E.9000904>