NAME

Net::Connection::ncnetstat - The backend for ncnetstat, the colorized and enhanced netstat like tool.

VERSION

Version 0.8.0

SYNOPSIS

use Net::Connection::ncnetstat;

# Net::Connection::Match filters
my @filters=(
             {
              type=>'States',
              invert=>1,
              args=>{
                     states=>['LISTEN']
              }
             }
            );

my $ncnetstat=Net::Connection::ncnetstat->new(
                                              {
                                               ptr=>1,
                                               command=>1,
                                               command_long=>0,
                                               wchan=>0,
                                               pct_show=>1,
                                               sorter=>{
                                                        invert=>0,
                                                        type=>'host_lf',
                                               },
                                               match=>{
                                                       checks=>\@filters,
                                               }
                                              }
                                             );

print $ncnetstat->run;

METHODS

new

This initiates the object.

my $ncnetstat=Net::Connection::ncnetstat->new( \%args );

args hash ref

command

If set to true, it will show the command for the PID.

command_long

If set to true, the full command is shown.

This requires command also being true.

match

This is the hash to pass to Net::Connection::Match.

By default this is undef and that module won't be used.

no_pid_user

Don't show the PID or UID/user colomn.

sorter

This is what is to be passed to Net::Connection::Sorter.

The default is as below.

{
 type=>'unsorted',
 invert=>0,
}

run

This runs it and returns a string.

print $ncnetstat->run;

TODO

* Add support for more collection methods than Net::Connection::lsof

* Support color selection and column ordering.

AUTHOR

Zane C. Bowers-Hadley, <vvelox at vvelox.net>

BUGS

Please report any bugs or feature requests to bug-net-connection-ncnetstat at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Connection-ncnetstat. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Net::Connection::ncnetstat

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2019 by Zane C. Bowers-Hadley.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)