gri6507 has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Net::Pcap; $|++; my $err; print "pcap version " . Net::Pcap::lib_version() . "\n"; my %devinfo; my @devs = Net::Pcap::findalldevs(\$err, \%devinfo); if (defined $err) { die 'Unable to determine network device for monitoring - ', $err; } my $choice; do { print "Please choose a device to monitor:\n"; my $i = 0; for my $dev (@devs) { print ++$i . " - $dev : $devinfo{$dev}\n" } print "Choice: "; $choice = <>; } while ($choice<1 or $choice>scalar(@devs));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Pcap lookupdev problem
by Anonymous Monk on Apr 12, 2006 at 13:40 UTC | |
by gri6507 (Deacon) on Apr 12, 2006 at 14:02 UTC | |
by Anonymous Monk on Mar 07, 2008 at 08:10 UTC |