NAME

Solaris::DeviceTree::PathToInst - Perl interface to /etc/path_to_inst

SYNOPSIS

use Solaris::DeviceTree::PathToInst;
$node = new Solaris::DeviceTree::PathToInst;
@children = $node->child_nodes;

DESCRIPTION

The Solaris::DeviceTree::PathToInst module implements access to the Solaris driver configuration file /etc/path_to_inst via a hierarchical tree structure. The API of this class contains all methods from the Solaris::DeviceTree applicable to this context.

METHODS

The following methods are available:

$node = new Solaris::DeviceTree::PathToInst;

$node = new Solaris::DeviceTree::PathToInst( filename => '/a/etc/path_to_inst' );

The constructor takes a location of a path_to_inst file as data source and returns a reference to the root node object. If no path_to_inst file is given the file from the running system at /etc/path_to_inst is read.

$path = $node->devfs_path

Returns the physical path assocatiated with this node.

$nodename = $node->node_name;

Returns the name of the node. The value is used to build the physical path. It is undefined for the root node and defined for all other nodes.

$bindingname = $node->binding_name;

Returns the binding name of the driver for the node.

$drivername = $node->driver_name;

Returns the driver name for the node.

$busaddr = $node->bus_addr;

Returns the address on the bus for this node. undef is returned if a bus address has not been assigned to the device. A zero-length string may be returned and is considered a valid bus address.

$inst = $node->instance;

Returns the instance number for this node of the bound driver. undef is returned if no instance number has been assigned.

IMPLEMENTATION DETAILS

Because the methods are all read-only the object is implemented as singleton and the same reference gets returned every time.

BUGS

* The singleton implementation keeps only one instance of
  this class. If multiple calls to the constructor are issued
  with different filenames the returned values are always from
  the path_to_inst initially specified.

EXAMPLES

AUTHOR

Copyright 1999-2003 Dagobert Michelsen.

SEE ALSO

path_to_inst(4)