document *_pp

This commit is contained in:
Zane C. B-H 2019-02-26 00:06:15 -06:00
bovenliggende edaaadd874
commit 1674f4f45a
2 gewijzigde bestanden met toevoegingen van 32 en 2 verwijderingen

Bestand weergeven

@ -25,7 +25,7 @@ our $VERSION = '0.0.3';
use Parse::Netstat::Search;
use Parse::Netstat qw(parse_netstat);
my $res = parse_netstat(output => join("", `netstat -anp`), flavor=>'linux');
my $res = parse_netstat(output => join("", `netstat -n`), flavor=>$^O);
my $search = Parse::Netstat::Search->new();
@ -37,6 +37,37 @@ our $VERSION = '0.0.3';
Two big things to bet aware of is this module does not currently resulve names and this module
does not handle unix sockets. Unix sockets will just be skipped over.
The connection hashes returned differ from Parse::Netstat slightly. Below is what a standard ones
for IPv4/6 looks like.
{
'foreign_host'=>'10.0.0.1',
'local_host'=>'10.0.0.2',
'foreign_port'=>'22222',
'local_port'=>'22',
'sendq'=>'0',
'recvq'=>'0',
'state' => 'ESTABLISHED',
'proto' => 'tcp4',
}
This module has two additional keys, "local_pp" and "foreign_pp". Which contains and data
after % in a address. So "fe80::1%lo0" would be split into "fe80::1" and "lo0" as in the
example below.
{
'state' => '',
'foreign_host' => '*',
'local_port' => '123',
'proto' => 'udp6',
'foreign_pp' => undef,
'foreign_port' => '*',
'local_host' => 'fe80::1',
'recvq' => '44',
'local_pp' => 'lo0',
'sendq' => '33'
}
=head1 methods
=head2 new

Bestand weergeven

@ -1,7 +1,6 @@
use strict;
use Test::More;
use Data::Dumper;
BEGIN {
use_ok('Parse::Netstat::Search');