ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/AnyEvent-Porttracker/Porttracker.pm
(Generate patch)

Comparing cvsroot/AnyEvent-Porttracker/Porttracker.pm (file contents):
Revision 1.16 by root, Thu Jun 2 01:27:46 2011 UTC vs.
Revision 1.18 by root, Wed Jan 7 01:41:33 2015 UTC

1=head1 NAME 1=head1 NAME
2 2
3AnyEvent::Porttracker - Porttracker/PortIQ API client interface. 3AnyEvent::Porttracker - Porttracker API client interface.
4 4
5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 use AnyEvent::Porttracker; 7 use AnyEvent::Porttracker;
8 8
9 my $api = new AnyEvent::Porttracker 9 my $api = new AnyEvent::Porttracker
10 host => "10.0.0.1", 10 host => "10.0.0.1",
11 user => "admin", 11 user => "admin",
12 pass => "31331", 12 pass => "31331",
13 tls => 1, 13 tls => 1,
14 on_error => sub {
15 die $_[1];
16 },
14 ; 17 ;
15 18
16 # Example 1 19 # Example 1
17 # a simple request: ping the server synchronously 20 # a simple request: ping the server synchronously
18 21
64other things) scans switches and routers in a network and gives a coherent 67other things) scans switches and routers in a network and gives a coherent
65view of which end devices are connected to which switch ports on which 68view of which end devices are connected to which switch ports on which
66switches and routers. It also offers a JSON-based client API, for which 69switches and routers. It also offers a JSON-based client API, for which
67this module is an implementation. 70this module is an implementation.
68 71
69In addition to Porttracker, the PortIQ product is also supported, as it
70uses the same protocol.
71
72If you do not have access to either a Porttracker or PortIQ box then this 72If you do not have access to a Porttracker box then this module will be of
73module will be of little value to you. 73little value to you.
74 74
75This module is an L<AnyEvent> user, you need to make sure that you use and 75This module is an L<AnyEvent> user, you need to make sure that you use and
76run a supported event loop. 76run a supported event loop.
77 77
78To quickly understand how this module works you should read how to 78To quickly understand how this module works you should read how to
152 152
153Enables or disables TLS (default: disables). When enabled, then the 153Enables or disables TLS (default: disables). When enabled, then the
154connection will try to handshake a TLS connection before logging in. If 154connection will try to handshake a TLS connection before logging in. If
155unsuccessful a fatal error will be raised. 155unsuccessful a fatal error will be raised.
156 156
157Since most Porttracker/PortIQ boxes will not have a sensible/verifiable 157Since most Porttracker boxes will not have a sensible/verifiable
158certificate, no attempt at verifying it will be done (which means 158certificate, no attempt at verifying it will be done (which means
159man-in-the-middle-attacks will be trivial). If you want some form of 159man-in-the-middle-attacks will be trivial). If you want some form of
160verification you need to provide your own C<tls_ctx> object with C<< 160verification you need to provide your own C<tls_ctx> object with C<<
161verify => 1, verify_peername => [1, 1, 1] >> or whatever verification mode 161verify => 1, verify_peername => [1, 1, 1] >> or whatever verification mode
162you wish to use. 162you wish to use.
583 583
584=back 584=back
585 585
586=head1 SEE ALSO 586=head1 SEE ALSO
587 587
588L<AnyEvent>, L<http://www.porttracker.com/>, L<http://www.infoblox.com/en/products/portiq.html>. 588L<AnyEvent>, L<http://www.porttracker.com/>.
589 589
590=head1 AUTHOR 590=head1 AUTHOR
591 591
592 Marc Lehmann <marc@nethype.de> 592 Marc Lehmann <marc@nethype.de>
593 593

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines