Linux::Proc::Net::UDP - Parser for Linux /proc/net/udp and /proc/net/udp6
use Linux::Proc::Net::UDP; my $table = Linux::Proc::Net::UDP->read; for my $entry (@$table) { printf("%s:%d (%d)\n", $entry->local_address, $entry->local_port, $entry->st ); }
This module can read and parse the information available from /proc/net/udp in Linux systems.
reads /proc/net/udp and /proc/net/udp6 and returns an object representing a table of the connections.
/proc/net/udp
/proc/net/udp6
Individual entries in the table can be accessed just dereferencing the returned object. For instance:
for my $entry (@$table) { # do something with $entry }
The table entries are of class Linux::Proc::Net::UDP::Entry described below.
Linux::Proc::Net::UDP::Entry
This method accepts the following optional arguments:
disables parsing of the file /proc/net/udp containing information for open UDP ports on IPv4
disables parsing of the file /proc/net/udp6 containing information for open UDP ports on IPv6
overrides the default mount point for the procfs at /proc.
/proc
The entries in the table are of class Linux::Proc::Net::UDP::Entry and implement the following read only accessors:
sl local_address local_port rem_address rem_port st tx_queue rx_queue timer tm_when retrnsmt uid timeout inode reference_count memory_address drops ip4 ip6
Salvador Fandiño <sfandino@yahoo.com>
Copyright (C) 2010, 2012, 2014 by Qindel Formación y Servicios S.L.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
To install Linux::Proc::Net::TCP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Linux::Proc::Net::TCP
CPAN shell
perl -MCPAN -e shell install Linux::Proc::Net::TCP
For more information on module installation, please visit the detailed CPAN module installation guide.