NAME

Net::Connection::FreeBSD_sockstat - Creates Net::Connection objects using sockstat on FreeBSD.

VERSION

Version 0.0.2

SYNOPSIS

use Net::Connection::FreeBSD_sockstat;

my @objects;
eval{ @objects=&sockstat_to_nc_objects; };

# this time don't resolve ports, ptrs, or usernames
my $args={
     ports=>0,
     ptrs=>0,
};
eval{ @objects=&sockstat_to_nc_objects( $args )); };

SUBROUTINES

sockstat_to_nc_objects

This parses the output of 'sockstat -46s'.

args hash

ports

Attempt to resolve the port names.

Defaults to 1.

This value is a Perl boolean.

ptrs

Attempt to resolve the PTRs.

Defaults to 1.

This value is a Perl boolean.

proc_info

Load up the process table and use that to fill in additional info.

This is incompatible with the string option.

This defaults to true if no string is specified.

This value is a Perl boolean.

string

If this is specified, it parses the string instead of calling sockstat.

If running this on anything other than FreeBSD with out passing this, it will die.

zombie_skip

This skips items with connections that died but are still in the table.

This skips lines like the one below.

USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS       PATH STATE   CONN STATE
?        ?          ?     ?  tcp6   ::1:4045              *:*                                LISTEN

This defaults to 1.

The value taken is a Perl boolean.

AUTHOR

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

BUGS

Please report any bugs or feature requests to bug-net-connection-freebsd_sockstat at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Connection-FreeBSD_sockstat. 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::FreeBSD_sockstat

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

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

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)