Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Solaris::DeviceTree
Perl interface to the Solaris devicetree

Solaris::DeviceTree - Perl interface to the Solaris devicetree



NAME

Solaris::DeviceTree - Perl interface to the Solaris devicetree


SYNOPSIS


  use Solaris::DeviceTree

Construction and destruction:


  $devtree = Solaris::DeviceTree->new

  $devtree = Solaris::DeviceTree->new( use => [ qw( libdevinfo path_to_inst filesystem ) ] )

  $devtree->DESTROY

Tree traversal:


  @children = $devtree->child_nodes

  @siblings = $devtree->sibling_nodes

  $node = $node->parent_node

  $root = $node->root_node

Methods concerning tree merging:


  @sources = $node->sources

Data access methods:


  $path = $node->devfs_path

  $instance = $devtree->instance

  $id = $node->nodeid

  @compat_names = $devtree->compatible_names

  ...


DESCRIPTION

The the Solaris::DeviceTree manpage module implements the the Solaris::DeviceTree::Node manpage interface to access the Solaris device tree in a unified view from multiple data sources. The devicetree is presented as a hierarchical collection of nodes. The information is collected from the kernel via access to libdevinfo, the contents of the file /etc/path_to_inst and the filesystem entries below /dev and /devices. Each node contains the unified information from the data sources configured during object construction.


EXAMPLES

Print the device pathes contained in the /etc/path_to_inst


  use Solaris::DeviceTree;

  my $t = Solaris::DeviceTree->new( use => [ qw( path_to_inst ) ] );

  my @nodes = ( $t );

  while( @nodes > 0 ) {

    my $node = shift @nodes;

    print $node->devfs_path, "\n";

    unshift @nodes, $node->child_nodes;

  }


AUTHOR

Copyright 1999-2003 Dagobert Michelsen.


SEE ALSO

the Solaris::DeviceTree::PathToInst manpage, the Solaris::DeviceTree::Filesystem manpage, the Solaris::DeviceTree::Libdevinfo manpage.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy