NAME

Solaris::NDDI - Perl extension for interacting with Solaris Network Device Driver Interface (NDDI). This module allows for getting and setting tunable parameters that control network stack drivers, including IP, TCP, UDP, ICMP and ARP drivers.

SYNOPSIS

use Solaris::NDDI;

$ref = new Solaris::NDDI( <pseudo-device> );

$ref->{<variable-name>} = <value>;
<variable> = $ref->{<variable-name>};

DESCRIPTION

The Solaris::NDDI module is a programming interface for viewing and setting the values of various tunable parameters associated with network drivers. A Solaris::NDDI object can be created for a particular pseudo-device, such as /dev/udp, /dev/tcp or /dev/ip, for instance, this allowing for getting and setting the values of the tunable variables for a corresponding network driver:

$ref = new Solaris::NDDI('/dev/ip');
print $ref->{ip_forwarding};     # prints the value of ip_forwarding tunable 
$ref->{ip_forwarding} = 0;	    # turn off ip forwarding

Once instantiated, a Solaris::NDDI object will return a reference to a tied hash, where every variable for a given driver will be represented by a hash pair. Thus, the following code snippet will list all variable names for a particular driver:

$ref = new Solaris::NDDI('/dev/ip');
foreach( sort keys %$ref ) {
   print "$_ => $ref->{$_}\n";
}

Note, appropriate level of permissions is necessary to open a some pseudo-devices (such as /dev/ip) and to get/set certain variables.

EXPORT

None by default.

AUTHOR

Alexander Golomshtok, golomshtok_alexander@jpmorgan.com

SEE ALSO

perl, ndd(1M).