21. Netstat

21.1. Why

A netstat wrapper is availalable from CPAN, Net::Netstat, but the version tried does not work on Solaris7 , so Wrappers/Netstat.pm is used.

21.2. Usage

    my $netstat  = Netstat->new(PFORM => "OpenSuSE_9.3");
                                         # ...or "Solaris_7" at present...

    foreach my $c (@{$netstat->connections()}) {
        # ...where $c has the following attributes:
        #
        #    $c->{LOCAL_HOST}
        #    $c->{REMOTE_HOST}
        #
        #    $c->{LOCAL_PORT}
        #    $c->{REMOTE_PORT}
        #
        #    $c->{STATE}
      }

21.3. To-Do

Add methods to encapsulate all attributes.

21.4. Hacking

It should be simple to add support for other versions of Linux and/or Unix.



...previousup (conts)next...



About this document:

Produced from the SGML: /home/isd/public_html/_cheesewire/_reml_grp/index.reml
On: 4/9/2006 at 17:35:44
Options: reml2 -i noindex -l long -o html -p multiple