Whilst switching my audio drive to RAID, I noticed thatSlimServer uses
the Apple mDNSResponderPosix implementation for mDNS. Fedora is
distributed with Avahi from www.avahi.org. The 'FAQ'
(http://www.avahi.org/wiki/Avah4users#FAQ) at the Avahi site warns:
>
> Is it OK to run multiple mDNS responders on the same machine?
>
> No, it is not OK. Sooner or later some mDNS features known as
> "Known Answer Suppression" and "Unicast Reply" (and probably some more)
> will result in problems if more than one responder runs on the same
> machine.
>
At least two potential options present themselves to temporarily patch
SlimServer over to Avahi. The first option would be to replace
Bin/i386-linux/mDNSResponderPosix with a script that runs
avahi-publish. This seems fairly straightforward but I was unhappy that
there didn't appear to be a way to -remove- a published service from the
command line (ie there is no avahi-unpublish or -remove command line
option).
The second option is to replace Slim/Networking/mDNS.pl with an Avahi
version. I think this is the option worth pursuing.
The following RPMs are easily obtained:
Code:
--------------------
extras perl-Net-DBus 0.33.4-3.fc6
dries perl-Net-Rendezvous-Publish 0.04-1.fc6.rf
--------------------
I could only find these next two from Mandriva ('RPMs'
(http://gulus.usherbrooke.ca/pub/distro/Mandrakelinux/official/2007.1/i586/me
dia/contrib/release) and 'keys'
(http://gulus.usherbrooke.ca/pub/distro/Mandrakelinux/official/2007.1/i586/me
dia/contrib/release/media_info)), and the Mandriva dependencies for
Perl 5.8.8 are specified in a different way, so in the end I installed
these using rpm -i --nodeps:
Code:
--------------------
perl-Net-Rendezvous-Publish-Backend-Avahi
usr/lib/perl5/vendor_perl/5.8.8/Net/Rendezvous
/usr/lib/perl5/vendor_perl/5.8.8/Net/Rendezvous/Publish
/usr/lib/perl5/vendor_perl/5.8.8/Net/Rendezvous/Publish/Backend
/usr/lib/perl5/vendor_perl/5.8.8/Net/Rendezvous/Publish/Backend/Avahi.pm
/usr/share/man/man3/Net::Rendezvous::Publish::Backend::Avahi.3pm.bz2
perl-Class-Accessor-Lvalue
/usr/lib/perl5/vendor_perl/5.8.8/Class/Accessor/Lvalue
/usr/lib/perl5/vendor_perl/5.8.8/Class/Accessor/Lvalue.pm
/usr/lib/perl5/vendor_perl/5.8.8/Class/Accessor/Lvalue/Fast.pm
/usr/share/doc/perl-Class-Accessor-Lvalue-0.11
/usr/share/doc/perl-Class-Accessor-Lvalue-0.11/Changes
/usr/share/doc/perl-Class-Accessor-Lvalue-0.11/README
/usr/share/man/man3/Class::Accessor::Lvalue.3pm.bz2
/usr/share/man/man3/Class::Accessor::Lvalue::Fast.3pm.bz2
--------------------
Once these are installed, the following additional Fedora RPMs are
required to satisfy the runtime dependencies:
Code:
--------------------
extras perl-Want 0.12-1.fc6
extras perl-Module-Pluggable 3.10-2.fc6
--------------------
This is the test program to see if this can successfully publish an
entry:
Code:
--------------------
use Net::Rendezvous::Publish;
my $publisher = Net::Rendezvous::Publish->new
or die "couldn't make a Responder object";
my $service1 = $publisher->publish(
name => "My HTTP Server",
type => '_http._tcp',
port => 9000,
txt => '',
);
my $service2 = $publisher->publish(
name => "My HTTP Server",
type => '_slimhttp._tcp',
port => 9000,
txt => '',
);
sleep 30;
--------------------
The content of the test program is obtained from cache/mDNS.conf which
is written by SlimServer to help configure mDNSResponderPosix.
Kill mDNSResponderPosix using kill -SIGINT before running the test
program. Leave SlimServer running.
Whilst the test program is running, I verified its operation using an
XP machine with 'Apple Bonjour for Windows'
(http://www.apple.com/support/downloads/bonjourforwindows.html). Open
the Bonjour toolbar, and select "My HTTP Server" to verify that a
connection to the SlimServer starts successfully.
This verifies the proof-of-concept. The next step is to write a
replacement for mDNS.pl.
--
quietdragon
------------------------------------------------------------------------
quietdragon's Profile: http://forums.slimdevices.com/member.php?userid=10412
View this thread: http://forums.slimdevices.com/showthread.php?t=33915
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/unix