NAME

NetworkInfo::Discovery::Rendezvous - NetworkInfo::Discovery extension to find Rendezvous services

VERSION

Version 0.02

SYNOPSIS

use NetworkInfo::Discovery::Rendezvous;

my $scanner = new NetworkInfo::Discovery::Rendezvous domain => 'example.net';
$scanner->do_it;

for my $host ($scanner->get_interfaces) {
    printf "%s (%s)\n", $host->{nodename}, $host->{ip};

    for my $service (@{$host->{services}}) {
        printf "  %s (%s:%d)\n", $service->{name}, $service->{proto}
    }
}

DESCRIPTION

This module is an extension to NetworkInfo::Discovery which can find services that register themselves using DNS-SD (DNS Service Discovery), the services discovery protocol behind Apple Rendezvous.

It will first try to enumerate all the registered services by querying the dns-sd pseudo-service, which is available since the latest versions of mDNSResponder. If nothing is returned, it will then query some well-known services like afpovertcp.

METHODS

new()

Creates and returns a new NetworkInfo::Discovery::Rendezvous object, which derives from NetworkInfo::Discovery::Detect.

Options

  • domain - expects a scalar or an arrayref of domains

Example

# specify one domain
my $scanner = new NetworkInfo::Discovery::Rendezvous domain => 'example.net';

# specify several domains
my $scanner = new NetworkInfo::Discovery::Rendezvous domain => [ qw(local example.net) ];
do_it()

Run the services discovery.

discover_service()

Discover instances of a given service.

domain()

Add domains to the search list.

Examples

$scanner->domain('zeroconf.org');
$scanner->domain(qw(local zeroconf.org example.com));

CAVEATS

Note that if you are using Net::Rendezvous 0.86 or any previous version, you won't find services as easily because it was lacking services enumeration. Until a new version of Net::Rendezvous is released, you can apply the patch available at https://rt.cpan.org/Ticket/Display.html?id=7940

SEE ALSO

NetworkInfo::Discovery, Net::Rendezvous

AUTHOR

Sébastien Aperghis-Tramoni, <sebastien@aperghis.net>

BUGS

Please report any bugs or feature requests to bug-networkinfo-discovery-rendezvous@rt.cpan.org, or through the web interface at https://rt.cpan.org/. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE

Copyright 2004 Sébastien Aperghis-Tramoni, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.