Net::SNMP::HostInfo::TcpConnEntry - An entry in the tcpConnTable of a MIB-II host
use Net::SNMP::HostInfo; $host = shift || 'localhost'; $hostinfo = Net::SNMP::HostInfo->new(Hostname => $host); print "\nTcp Connection Table:\n"; printf "%-15s %-5s %-15s %-5s %s\n", qw/LocalAddress Port RemAddress Port State/; for $entry ($hostinfo->tcpConnTable) { printf "%-15s %-5s %-15s %-5s %s\n", $entry->tcpConnLocalAddress, $entry->tcpConnLocalPort, $entry->tcpConnRemAddress, $entry->tcpConnRemPort, $entry->tcpConnState; }
"Information about a particular current TCP connection. An object of this type is transient, in that it ceases to exist when (or soon after) the connection makes the transition to the CLOSED state."
"The state of this TCP connection.
The only value which may be set by a management station is deleteTCB(12). Accordingly, it is appropriate for an agent to return a `badValue' response if a management station attempts to set this object to any other value.
If a management station sets this object to the value deleteTCB(12), then this has the effect of deleting the TCB (as defined in RFC 793) of the corresponding connection on the managed node, resulting in immediate termination of the connection.
As an implementation-specific option, a RST segment may be sent from the managed node to the other TCP endpoint (note however that RST segments are not sent reliably)."
Possible values are:
closed(1), listen(2), synSent(3), synReceived(4), established(5), finWait1(6), finWait2(7), closeWait(8), lastAck(9), closing(10), timeWait(11), deleteTCB(12)
"The local IP address for this TCP connection. In the case of a connection in the listen state which is willing to accept connections for any IP interface associated with the node, the value 0.0.0.0 is used."
"The local port number for this TCP connection."
"The remote IP address for this TCP connection."
"The remote port number for this TCP connection."
James Macfarlane, <jmacfarla@cpan.org>
Net::SNMP::HostInfo
To install Net::SNMP::HostInfo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::SNMP::HostInfo
CPAN shell
perl -MCPAN -e shell install Net::SNMP::HostInfo
For more information on module installation, please visit the detailed CPAN module installation guide.