Dumping base-types

Hi all:
First of all, I would like to mention that libsmi and the related tools are great products.
I have a couple of questions:
1. Has anyone successfully built the libsmi package on Solaris 9/10. I have tried on Solaris 10 with no success; Configure works but the compilation fails almost immediately. I will soon try with Solaris 9 as well but any pointers would be really appreciated.
2. I would like to modify the 'dump identifers' driver for smidump to show the nodes in the following format:
name oid syntax/base type
I see that the names and oids are already dumped. However, instead of the syntax, the node type is dumped. I looked at the xml driver and saw that the base type was dumped in some cases but not all; instead, the syntax would point to a type module and then the name. I have added the imported modules as follows to the smidump.conf file:
load dependency.mib load SNMPv2-TC load SNMPv2-CONF
but still see the same output format. Here are a few examples of this:
For myId column, I see the desired result:
*-* file:///D:/smi/mibs/fsvcm.mib.xml# - <column name="myId" oid=" 1.3.6.1.4.1.2076.93.1.2.1.1" status="current"> - <syntax> - <typedef basetype="Integer32" name="" status="current"> <range min="0" max="65535" /> </typedef> </syntax>
HHowever, for myMac, I see the pointer to the SNMP-TC mib:
- <column name="myMac" oid="1.3.6.1.4.1.2076.93.1.2.1.3" status="current"> - <syntax> <type module="SNMPv2-TC" name="MacAddress" /> </syntax>
Is there a way to get the base type or typedef for such columns.
Any help would be greatly appreciated. Thanks Altaf
I

Hello,
Altaf Aali wrote:
- Has anyone successfully built the libsmi package on Solaris 9/10. I have
tried on Solaris 10 with no success; Configure works but the compilation fails almost immediately. I will soon try with Solaris 9 as well but any pointers would be really appreciated.
Could you provide some output example where it breaks? There is nothing specific about Solaris 10. It may be that you are not using GNU make(1) or some other simple thing.
- I would like to modify the 'dump identifers' driver for smidump to show
the nodes in the following format:
<typedef basetype="Integer32" name="" status="current">
<range min="0" max="65535" /> </typedef>
However, for myMac, I see the pointer to the SNMP-TC mib:
<type module="SNMPv2-TC" name="MacAddress" />
Is there a way to get the base type or typedef for such columns.
That's the way they are defined in the original MIB. Either as a simple type (INTEGER) or some complex type (or textual convention) defined elsewhere (SNMPv2-TC::MacAddress).
I think you might need to traverse the MIB tree programmatically to resolve the types.

On Sat, Jun 02, 2007 at 12:37:19PM -0500, Altaf Aali wrote:
I have a couple of questions:
- Has anyone successfully built the libsmi package on Solaris 9/10. I have
tried on Solaris 10 with no success; Configure works but the compilation fails almost immediately. I will soon try with Solaris 9 as well but any pointers would be really appreciated.
You first have to tell precisely what breaks.
- I would like to modify the 'dump identifers' driver for smidump to show
the nodes in the following format:
name oid syntax/base type
I see that the names and oids are already dumped. However, instead of the syntax, the node type is dumped.
The 'identifiers' driver dumps module name, identifier, OID. If you have one that also shows the node type, you might not have a vanilla libsmi source tree.
I looked at the xml driver and saw that the base type was dumped in some cases but not all; instead, the syntax would point to a type module and then the name. I have added the imported modules as follows to the smidump.conf file:
load dependency.mib load SNMPv2-TC load SNMPv2-CONF
but still see the same output format. Here are a few examples of this:
For myId column, I see the desired result:
*-* file:///D:/smi/mibs/fsvcm.mib.xml# - <column name="myId" oid=" 1.3.6.1.4.1.2076.93.1.2.1.1" status="current">
<syntax>
<typedef basetype="Integer32" name="" status="current">
<range min="0" max="65535" /> </typedef> </syntax>
HHowever, for myMac, I see the pointer to the SNMP-TC mib:
<column name="myMac" oid="1.3.6.1.4.1.2076.93.1.2.1.3" status="current">
<syntax>
<type module="SNMPv2-TC" name="MacAddress" /> </syntax>
Is there a way to get the base type or typedef for such columns.
Since you do not show the input, there is little value in speculating over the output. But sure, libsmi internally has all the information you need (if the MIB modules parses without any errors) and it is not difficult to write your own output driver if you need something the ones shipped with the package do not provide.
/js
participants (3)
-
Altaf Aali
-
Juergen Schoenwaelder
-
Marcin Cieslak