Solaris::DeviceTree =================== WHAT IS IT The "Solaris::DeviceTree" module implements access to the Solaris device information. 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". The devicetree is presented as a hierarchical collection of nodes. A script for devicetree inspection (devtree) is included. Just call 'devtree' without arguments or look at the manpage for details. Please note that the quality of the code is still experimental. CONTACT The project is hosted at sourceforge. Feel free to visit the project homepage at http://devicetool.sourceforge.net Do not hesitate to contact me at pkg@baltic-online.de about flaws, the API or other improvements. OS SUPPORT This software needs at least Solaris 7 because the libdevinfo API was introduced in this release. Solaris 2.6 has a libdevinfo but uses a different API and can not be used. It might be a good idea to check in the Makefile.PL for the availability of libdevinfo and skip the module if the library is not available. This would allow access to path_to_inst and /devices even in releases before Solaris 7. However I have not done this yet. The module should compile nicely under x86 although I had no chance to test it. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install This compiles the native interfaces and installs the library and the devtree binary. To rebuild the C files from the SWIG you can issue the command bootstrap Of course you need SWIG for that. I used 1.3.19, older versions may not work due to some template improvements. For smooth installation on Solaris 9 systems you can build a Solaris package as add-on to the perl shipped with the os. Use makepkg solperlcc to build the package using the Sun C compiler (now called "Forte"). LICENSE This program is free software; you can redistribute it and/or modify it under the terms of either: a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" which comes with this Kit. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details. You should have received a copy of the Artistic License with this Kit, in the file named "Artistic". If not, I'll be glad to provide one. You should also have received a copy of the GNU General Public License along with this program in the file named "Copying". If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA or visit their web page on the internet at http://www.gnu.org/copyleft/gpl.html. For those of you that choose to use the GNU General Public License, my interpretation of the GNU General Public License is that no Perl script falls under the terms of the GPL unless you explicitly put said script under the terms of the GPL yourself. Furthermore, any object code linked with perl does not automatically fall under the terms of the GPL, provided such object code only adds definitions of subroutines and variables, and does not otherwise impair the resulting interpreter from executing any standard Perl script. I consider linking in C subroutines in this manner to be the moral equivalent of defining subroutines in the Perl language itself. You may sell such an object file as proprietary provided that you provide or offer to provide the Perl source, as specified by the GNU General Public License. (This is merely an alternate way of specifying input to the program.) You may also sell a binary produced by the dumping of a running Perl script that belongs to you, provided that you provide or offer to provide the Perl source as specified by the GPL. (The fact that a Perl interpreter and your code are in the same binary file is, in this case, a form of mere aggregation.) This is my interpretation of the GPL. If you still have concerns or difficulties understanding my intent, feel free to contact me. Of course, the Artistic License spells all this out for your protection, so you may prefer to use that.