POE::Component::Client::Traceroute 0.21
Sponsored Links
POE::Component::Client::Traceroute 0.21 Ranking & Summary
File size:
0.015 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
8716
Date added:
2007-04-18
Publisher:
Andrew Hoying
Publisher URL:
http://search.cpan.org/~a
POE::Component::Client::Traceroute 0.21 description
POE::Component::Client::Traceroute is a non-blocking traceroute client.
SYNOPSIS
use POE qw(Component::Client::Traceroute);
POE::Component::Client::Traceroute->spawn(
Alias => tracer, # Defaults to tracer
FirstHop => 1, # Defaults to 1
MaxTTL => 16, # Defaults to 32 hops
Timeout => 0, # Defaults to never
QueryTimeout => 3, # Defaults to 3 seconds
Queries => 3, # Defaults to 3 queries per hop
BasePort => 33434, # Defaults to 33434
PacketLen => 128, # Defaults to 68
SourceAddress => 0.0.0.0, # Defaults to 0.0.0.0
PerHopPostback => 0, # Defaults to no PerHopPostback
Device => eth0, # Defaults to undef
UseICMP => 0, # Defaults to 0
Debug => 0, # Defaults to 0
DebugSocket => 0, # Defaults to 0
);
sub some_event_handler
{
$kernel->post(
"tracer", # Post request to tracer component
"traceroute", # Ask it to traceroute to an address
"trace_response", # Post answers to trace_response
$destination, # This is the host to traceroute to
[
Queries => 5, # Override the global queries parameter
MaxTTL => 30, # Override the global MaxTTL parameter
Callback => [ $args ], # Data to send back with postback event
]
);
}
# This is the sub which is called with the responses from the
# Traceroute component.
sub trace_response
{
my ($request,$response) = @_[ARG0, ARG1];
my ($destination, $options, $callback) = @$request;
my ($hops, $data, $error) = @$response;
if ($hops)
{
print "Traceroute results for $destinationn";
foreach my $hop (@$data)
{
my $hopnumber = $hop->{hop};
my $routerip = $hop->{routerip};
my @rtts = @{$hop->{results}};
print "$hopnumbert$routeript";
foreach (@rtts)
{
if ($_ eq "*") { print "* "; }
else { printf "%0.3fms ", $_*1000; }
}
print "n";
}
}
warn "Error occurred tracing to $destination: $errorn" if ($error);
}
or
sub another_event_handler
{
$kernel->post(
"tracer", # Post request to tracer component
"traceroute", # Ask it to traceroute to an address
"trace_response", # Post answers to trace_response
$destination, # This is the host to traceroute to
[
# The trace_row event will get called after each hop
PerHopPostback => trace_row,
]
);
}
sub trace_row
{
my ($request,$response) = @_[ARG0, ARG1];
my ($destination, $options, $callback) = @$request;
my ($currenthop, $data, $error) = @$response;
# $data only contains responses for the current TTL
# The structure is the same as for trace_response above
}
POE::Component::Client::Traceroute is a non-blocking Traceroute client. It lets several other sessions traceroute through it in parallel, and it lets them continue doing other things while they wait for responses.
Download nowSYNOPSIS
use POE qw(Component::Client::Traceroute);
POE::Component::Client::Traceroute->spawn(
Alias => tracer, # Defaults to tracer
FirstHop => 1, # Defaults to 1
MaxTTL => 16, # Defaults to 32 hops
Timeout => 0, # Defaults to never
QueryTimeout => 3, # Defaults to 3 seconds
Queries => 3, # Defaults to 3 queries per hop
BasePort => 33434, # Defaults to 33434
PacketLen => 128, # Defaults to 68
SourceAddress => 0.0.0.0, # Defaults to 0.0.0.0
PerHopPostback => 0, # Defaults to no PerHopPostback
Device => eth0, # Defaults to undef
UseICMP => 0, # Defaults to 0
Debug => 0, # Defaults to 0
DebugSocket => 0, # Defaults to 0
);
sub some_event_handler
{
$kernel->post(
"tracer", # Post request to tracer component
"traceroute", # Ask it to traceroute to an address
"trace_response", # Post answers to trace_response
$destination, # This is the host to traceroute to
[
Queries => 5, # Override the global queries parameter
MaxTTL => 30, # Override the global MaxTTL parameter
Callback => [ $args ], # Data to send back with postback event
]
);
}
# This is the sub which is called with the responses from the
# Traceroute component.
sub trace_response
{
my ($request,$response) = @_[ARG0, ARG1];
my ($destination, $options, $callback) = @$request;
my ($hops, $data, $error) = @$response;
if ($hops)
{
print "Traceroute results for $destinationn";
foreach my $hop (@$data)
{
my $hopnumber = $hop->{hop};
my $routerip = $hop->{routerip};
my @rtts = @{$hop->{results}};
print "$hopnumbert$routeript";
foreach (@rtts)
{
if ($_ eq "*") { print "* "; }
else { printf "%0.3fms ", $_*1000; }
}
print "n";
}
}
warn "Error occurred tracing to $destination: $errorn" if ($error);
}
or
sub another_event_handler
{
$kernel->post(
"tracer", # Post request to tracer component
"traceroute", # Ask it to traceroute to an address
"trace_response", # Post answers to trace_response
$destination, # This is the host to traceroute to
[
# The trace_row event will get called after each hop
PerHopPostback => trace_row,
]
);
}
sub trace_row
{
my ($request,$response) = @_[ARG0, ARG1];
my ($destination, $options, $callback) = @$request;
my ($currenthop, $data, $error) = @$response;
# $data only contains responses for the current TTL
# The structure is the same as for trace_response above
}
POE::Component::Client::Traceroute is a non-blocking Traceroute client. It lets several other sessions traceroute through it in parallel, and it lets them continue doing other things while they wait for responses.
POE::Component::Client::Traceroute 0.21 Screenshot
Sponsored Links
POE::Component::Client::Traceroute 0.21 Keywords
>defaultstraceroutetraceresponsepostsubPOEComponentClientTraceroutePOE::Component::Client::Traceroute 0.21LibrariesProgramming
Bookmark POE::Component::Client::Traceroute 0.21
POE::Component::Client::Traceroute 0.21 Copyright
WareSeeker periodically updates pricing and software information of POE::Component::Client::Traceroute 0.21 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of POE::Component::Client::Traceroute 0.21 Edition. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
POE::Component::Client::Traceroute 0.21 Related Software
POE::Component::Client::SMTP is a Perl module for asynchronous mail sending with POE.
POE::Component::Client::TCPMulti is a high performance client TCP library.
POE::Component::Client::Ping is a non-blocking ICMP ping client.
POE::Component::Client::FTP is a Perl module that implements an FTP client POE Component.
POE::Component::Client::AirTunes is a Perl module with stream music to Airport Express.
POE::Component::Client::Halo is an implementation of the Halo query protocol.
POE::Component::Client::Rcon is an implementation of the Rcon remote console protocol.
POE::Component::Client::HTTP is a HTTP user-agent component.
POE::Component::IRC is a fully event-driven IRC client module.
LFT (Layer Four Traceroute) is a sort of traceroute that often works much faster.
My Software
You have not saved any software. Click "Save" next to each software to save it to your software basket
Related Search
TOP POPULAR DOWNLOAD