From owner-freebsd-net@FreeBSD.ORG Tue Aug 22 08:45:50 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DABE816A4DF for ; Tue, 22 Aug 2006 08:45:50 +0000 (UTC) (envelope-from fli+freebsd-net@shapeshifter.se) Received: from mx1.h3q.net (manticore.shapeshifter.se [212.37.5.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E95E43D4C for ; Tue, 22 Aug 2006 08:45:08 +0000 (GMT) (envelope-from fli+freebsd-net@shapeshifter.se) Received: from localhost (localhost [127.0.0.1]) by mx1.h3q.net (Postfix) with ESMTP id 103EA1A751; Tue, 22 Aug 2006 10:45:06 +0200 (CEST) Received: from mx1.h3q.net ([127.0.0.1]) by localhost (mx1.h3q.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 73656-05; Tue, 22 Aug 2006 10:45:05 +0200 (CEST) Received: from [192.168.1.100] (217-208-33-252-o926.tbon.telia.com [217.208.33.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.h3q.net (Postfix) with ESMTP id 121361A72A; Tue, 22 Aug 2006 10:45:04 +0200 (CEST) Message-ID: <44EAC40E.9000904@shapeshifter.se> Date: Tue, 22 Aug 2006 10:45:02 +0200 From: Fredrik Lindberg User-Agent: Thunderbird 1.5.0.4 (X11/20060727) MIME-Version: 1.0 To: Pat Lashley References: <44E9F991.7020309@shapeshifter.se> <44EA1926.2000501@shapeshifter.se> <9C04919EE684029A410DE208@garrett.local> In-Reply-To: <9C04919EE684029A410DE208@garrett.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at h3q.net Cc: freebsd-net@freebsd.org Subject: Re: Zeroconfig and Multicast DNS X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Aug 2006 08:45:51 -0000 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