File: route-get.pl

package info (click to toggle)
libnet-libdnet-perl 0.98-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 412 kB
  • sloc: perl: 1,007; ansic: 311; makefile: 9
file content (10 lines) | stat: -rw-r--r-- 216 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/perl
use strict; use warnings;

my $dst = shift || die("Pass dst");

use Net::Libdnet::Route;

my $h = Net::Libdnet::Route->new;
my $ret = $h->get($dst);
$ret ? print "GW: $ret\n" : print "Same subnet\n";