Hi Dmitry, ideally you would make this a pull request on github
https://github.com/oetiker/SmokePing cheers tobi Today Dmitry Melekhov wrote: > Hello! > > I need to check connectivity from router, connected to several ISPs , which is > logically separated by VRF, so I added vrf support to TelnetIOSPing. > Hope this can be helpful to somebody else. > > --- TelnetIOSPing.pm.old 2012-10-22 14:15:25.961890042 +0400 > +++ TelnetIOSPing.pm 2015-03-04 12:56:31.155588894 +0400 > @@ -138,6 +138,10 @@ > my $bytes = $self->{properties}{packetsize}; > my $pings = $self->pings($target); > my $timeout = $self->{properties}{timeout}; > + my $vrf =""; > + if ( defined ($target->{vars}{vrf}) ) { > + $vrf = " vrf $target->{vars}{vrf}"; > + } > > # do NOT call superclass ... the ping method MUST be overwriten > my %upd; > @@ -166,7 +170,7 @@ > $telnet->waitfor('/[\@\w\-\.]+[>#][ ]*$/'); > $telnet->print("terminal length 0"); > $telnet->waitfor('/[\@\w\-\.]+[>#][ ]*$/'); > - $telnet->print("ping"); > + $telnet->print("ping$vrf"); > $telnet->waitfor('/Protocol \[ip\]: $/'); > $telnet->print(""); > $telnet->waitfor('/Target IP address: $/'); > @@ -278,6 +282,14 @@ > DOC > _example => 'password', > }, > + vrf => { > + _doc => <<DOC, > +The vrf option allows you to specify the vrf for ping > +DOC > + _example => 'VRF1', > + }, > + > + > }); > } > > > Thank you! > > _______________________________________________ > smokeping-users mailing list > [email protected] > https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users > > -- Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland www.oetiker.ch [email protected] +41 62 775 9902 _______________________________________________ smokeping-users mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
