Net-Connection/Net-Connection/README

81 lines
2.0 KiB
Plaintext

Net-Connection
This module crates a object that basically serves as a means to store basic
connection information and retrieve it.
use Net::Connection;
#create a hash ref with the desired values
my $args={
'foreign_host' => '1.2.3.4',
'local_host' => '4.3.2.1',
'foreign_port' => '22',
'local_port' => '11132',
'sendq' => '1',
'recvq' => '0',
'pid' => '34342',
'uid' => '1000',
'state' => 'ESTABLISHED',
'proto' => 'tcp4'
};
# create the new object using the hash ref
my $conn=Net::Connection->new( $args );
# the same thing, but this time resolve the UID to a username
$args->{'uid_resolve'}='1';
$conn=Net::Connection->new( $args );
# now with PTR lookup
$args->{'ptrs'}='1';
$conn=Net::Connection->new( $args );
# prints a bit of the connection information...
print "L Host:".$conn->local_host."\n".
"L Port:".$conn->local_host."\n".
"F Host:".$conn->foreign_host."\n".
"F Port:".$conn->foreign_host."\n";
INSTALLATION
To install this module, run the following commands:
perl Makefile.PL
make
make test
make install
SUPPORT AND DOCUMENTATION
After installing, you can find documentation for this module with the
perldoc command.
perldoc Net::Connection
You can also look for information at:
RT, CPAN's request tracker (report bugs here)
https://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Connection
AnnoCPAN, Annotated CPAN documentation
http://annocpan.org/dist/Net-Connection
CPAN Ratings
https://cpanratings.perl.org/d/Net-Connection
Search CPAN
https://metacpan.org/release/Net-Connection
Repository
http://gitea.eesdp.org/vvelox/Net-Connection
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)