Subject: | allow use of icmp echo |
traceroute program has "-I" option for use ICMP ECHO instead of UDP datagrams. It allows users for use traceroute behind blocking firewalls for example.
Net::Traceroute should be able to use this flag.
Following patch allow that: add use_icmp option.
--
Jean Gillaux
-------
System information:
Perl Version: v5.8.4 built for i386-linux-thread-multi
OS: Linux debian sarge 3.1
--- Traceroute.pm.old 2005-07-07 11:48:39.777657920 +0200
+++ Traceroute.pm 2005-07-07 11:48:50.952857952 +0200
@@ -103,6 +103,7 @@
trace_program
timeout
no_fragment
+ use_icmp
);
my @simple_instance_vars = (
@@ -433,6 +434,8 @@
push(@result, "-F") if($self->no_fragment);
+ push(@result, "-I") if($self->use_icmp);
+
my($key, $flag);
while(($key, $flag) = each %cmdline_map) {
my $val = $self->$key();
@@ -712,7 +715,8 @@
[source_address => $srcaddr,]
[packetlen => $packetlen,]
[trace_program => $program,]
- [no_fragment => $nofrag,]);
+ [no_fragment => $nofrag,]
+ [use_icmp => $icmp],);
$frob = $obj->clone([options]);
This is the constructor for a new Net::Traceroute object. If given
@@ -770,6 +774,8 @@
B<no_fragment> - Set the IP don't fragment bit. Some traceroute
programs will perform path mtu discovery with this option.
+B<use_icmp> - Use ICMP ECHO instead of UDP datagrams. C<Traceroute>'s C<-I> option.
+
=head1 METHODS
=over 4
@@ -816,6 +822,8 @@
=item no_fragment([PROGRAM])
+=item use_icmp([ICMP])
+
=back
=head2 Obtaining information about a Trace