Author image Alexander Golomshtok


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


  use Solaris::NDD;

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

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


The Solaris::NDD module is a programming interface for viewing and setting the values of various tunable parameters associated with network drivers. A Solaris::NDD 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::NDD('/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::NDD 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::NDD('/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.


None by default.


Alexander Golomshtok,


perl, ndd(1M).