Help for this page

Select Code to Download


  1. or download this
    use Net::Pcap;
    
    ...
      print "$dev : $devinfo{$dev}\n";
    }
    exit;
    
  2. or download this
    tuser@desktop:~/Pcap$ sudo perl testNetPcap-2.pl
    usbmon1 : USB bus number 1
    ...
    any : Pseudo-device that captures on all interfaces
    lo : Loopback device
    tuser@desktop:~/Pcap$
    
  3. or download this
    my $result = Net::PcapUtils::loop(\&process_pkt);
    
    if (!$result eq "") {
        print("$result\n");
    }
    
  4. or download this
    
    my $eth;
    ...
      if ( ! $eth && $dev=~/eth/){ $eth=$dev;}
    }
    print " eth=<$eth>\n";