ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-FastPing/bin/net-fping
(Generate patch)

Comparing AnyEvent-FastPing/bin/net-fping (file contents):
Revision 1.2 by root, Fri May 4 15:24:52 2007 UTC vs.
Revision 1.3 by root, Fri May 4 15:33:56 2007 UTC

11 11
12Getopt::Long::Configure ("bundling", "no_ignore_case"); 12Getopt::Long::Configure ("bundling", "no_ignore_case");
13 13
14my $count = 1; 14my $count = 1;
15my $rate = 0; 15my $rate = 0;
16my $wait = 0.1; 16my $wait = 0.25;
17 17
18GetOptions ( 18GetOptions (
19 "count|c=i" => \$count, 19 "count|c=i" => \$count,
20 "rate|r=n" => \$rate, 20 "rate|r=n" => \$rate,
21 "wait|w=n" => \$wait, 21 "wait|w=n" => \$wait,
45} 45}
46 46
47Net::FPing::register_cb { 47Net::FPing::register_cb {
48 for (@{$_[0]}) { 48 for (@{$_[0]}) {
49 printf "%s %d %g\n", 49 printf "%s %d %g\n",
50 (4 == length $_->[0] ? inet_ntoa $_->[0] : inet_ntop (&AF_INET6, $_->[0])), 50 (4 == length $_->[0] ? inet_ntoa $_->[0] : Socket6::inet_ntop (&AF_INET6, $_->[0])),
51 $_->[2], 51 $_->[2],
52 $_->[1]; 52 $_->[1];
53 } 53 }
54}; 54};
55 55

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines