
The following message is a courtesy copy of an article that has been posted to comp.protocols.snmp,comp.dcom.net-management as well.
Libsmi 0.3 is available for download.
Copyright (c) 1999-2001 Frank Strauss, Technical University of Braunschweig.
Libsmi is a C library that allows network management applications and MIB authoring tools to access SMI MIB module information through a well defined API that hides the nasty details of locating and parsing SMIv1/v2 MIB modules. Libsmi supports exact and iterative retrieval functions for all major SMIv1 and SMIv2 constructs.
There are four tools on top of the library and a sh/awk-script:
- Smiquery allows simple queries for single MIB module items. Smilint allows to increase the verbosity of the parser(s), so that MIB module files can be checked for syntax and semantic errors.
- Smidump can be used to dump MIB modules in various formats. The current output backends allow to dump trees of OIDs, type definitions and recursive imports, to convert modules between SMIv1 and SMIv2, to produce JIDM compliant CORBA-IDL files, UCD-SNMP code stubs, MOSY style output, JAX Java AgentX sub-agent templates, XML and XML-Schema MIB representations, Perl and Python representations, graphical conceptual MIB models, and SCLI code stubs.
- Smidiff allows MIB authors, MIB reviewers and implementors to compare two revisions of the same MIB for legal and illegal changes.
- Finally, smistrip allows to strip SMIv1/v2 modules from documents like RFCs and Internet-Drafts.
Enclosed with the libsmi package, there are all (bug fixed) current IETF standard MIB modules as of 2001-11-23, as well as some other modules, man pages for all library functions and tools, and a small libsmi test suite.
The software comes with automake/autoconf and libtool support. Hence it should compile and build with or without shared libraries on most UNIX style platforms, as well as on W32/cygwin, though it's just developed on Sun Solaris 2.5.x and Linux. However, questions about all platforms can be discussed on the libsmi mailinglist.
For those familiar with recent libsmi development: The most significant change since the previous 0.2.x releases is the addition of the smidiff tool for MIB revision comparison. It has been developed during the past three months primarily by Torsten Klie.
Online information on libsmi together with download and CVS access information, the (free) license terms, manual pages, and the mailing list is available at:
http://www.ibr.cs.tu-bs.de/projects/libsmi/
Enjoy!
Frank Strauss strauss@ibr.cs.tu-bs.de -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.

HI,
Is there available a set of test MIB modules that demonstrate the operation of Smidiff?
Regards, /david t. perkins
At 04:30 PM 11/23/2001 +0100, Frank Strauss wrote:
The following message is a courtesy copy of an article that has been posted to comp.protocols.snmp,comp.dcom.net-management as well.
Libsmi 0.3 is available for download.
Copyright (c) 1999-2001 Frank Strauss, Technical University of Braunschweig.
Libsmi is a C library that allows network management applications and MIB authoring tools to access SMI MIB module information through a well defined API that hides the nasty details of locating and parsing SMIv1/v2 MIB modules. Libsmi supports exact and iterative retrieval functions for all major SMIv1 and SMIv2 constructs.
There are four tools on top of the library and a sh/awk-script:
Smiquery allows simple queries for single MIB module items. Smilint allows to increase the verbosity of the parser(s), so that MIB module files can be checked for syntax and semantic errors.
Smidump can be used to dump MIB modules in various formats. The current output backends allow to dump trees of OIDs, type definitions and recursive imports, to convert modules between SMIv1 and SMIv2, to produce JIDM compliant CORBA-IDL files, UCD-SNMP code stubs, MOSY style output, JAX Java AgentX sub-agent templates, XML and XML-Schema MIB representations, Perl and Python representations, graphical conceptual MIB models, and SCLI code stubs.
Smidiff allows MIB authors, MIB reviewers and implementors to compare two revisions of the same MIB for legal and illegal changes.
Finally, smistrip allows to strip SMIv1/v2 modules from documents like RFCs and Internet-Drafts.
Enclosed with the libsmi package, there are all (bug fixed) current IETF standard MIB modules as of 2001-11-23, as well as some other modules, man pages for all library functions and tools, and a small libsmi test suite.
The software comes with automake/autoconf and libtool support. Hence it should compile and build with or without shared libraries on most UNIX style platforms, as well as on W32/cygwin, though it's just developed on Sun Solaris 2.5.x and Linux. However, questions about all platforms can be discussed on the libsmi mailinglist.
For those familiar with recent libsmi development: The most significant change since the previous 0.2.x releases is the addition of the smidiff tool for MIB revision comparison. It has been developed during the past three months primarily by Torsten Klie.
Online information on libsmi together with download and CVS access information, the (free) license terms, manual pages, and the mailing list is available at:
http://www.ibr.cs.tu-bs.de/projects/libsmi/
Enjoy!
Frank Strauss <strauss@ibr.cs.tu-bs.de>
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.

[Please send specific libsmi questions to the libsmi@ibr.cs.tu-bs.de mailing list since this is the preferred place for libsmi issues.]
David T Perkins writes:
David> Is there available a set of test MIB modules that demonstrate David> the operation of Smidiff?
There are some test modules but they are not 100 % complete. We also use some IETF MIB revisions as (regression) test cases. For details, see the files in test/smidiff in the source distribution. Below is the output generated if you compare the IF-MIB in RFC 1573 with the IF-MIB in RFC 2863. (Note that smidiff does not check compliance definitions yet.)
/js
../../mibs/ietf/IF-MIB:16 contact of `IF-MIB' changed ./IF-MIB.old:18 previous definition of `IF-MIB' ../../mibs/ietf/IF-MIB:35 revision `2000-06-14 00:00' added ../../mibs/ietf/IF-MIB:39 revision `1996-02-28 21:55' added ../../mibs/ietf/IF-MIB:60 legal status change from `current' to `deprecated' for `OwnerString' ./IF-MIB.old:52 previous definition of `OwnerString' ../../mibs/ietf/IF-MIB:79 range `(1..2147483647)' added to type `InterfaceIndex' ../../mibs/ietf/IF-MIB:93 type `InterfaceIndexOrZero' has been added ../../mibs/ietf/IF-MIB:185 range `(1..2147483647)' added to type used in `ifIndex' ../../mibs/ietf/IF-MIB:250 description of `ifPhysAddress' changed ./IF-MIB.old:220 previous definition of `ifPhysAddress' ../../mibs/ietf/IF-MIB:285 named number `notPresent' added to type used in `ifOperStatus' ../../mibs/ietf/IF-MIB:285 named number `lowerLayerDown' added to type used in `ifOperStatus' ../../mibs/ietf/IF-MIB:285 description of `ifOperStatus' changed ./IF-MIB.old:253 previous definition of `ifOperStatus' ../../mibs/ietf/IF-MIB:327 description of `ifInOctets' changed ./IF-MIB.old:293 previous definition of `ifInOctets' ../../mibs/ietf/IF-MIB:343 description of `ifInUcastPkts' changed ./IF-MIB.old:302 previous definition of `ifInUcastPkts' ../../mibs/ietf/IF-MIB:358 description of `ifInNUcastPkts' changed ./IF-MIB.old:312 previous definition of `ifInNUcastPkts' ../../mibs/ietf/IF-MIB:376 description of `ifInDiscards' changed ./IF-MIB.old:326 previous definition of `ifInDiscards' ../../mibs/ietf/IF-MIB:395 description of `ifInErrors' changed ./IF-MIB.old:338 previous definition of `ifInErrors' ../../mibs/ietf/IF-MIB:413 description of `ifInUnknownProtos' changed ./IF-MIB.old:352 previous definition of `ifInUnknownProtos' ../../mibs/ietf/IF-MIB:435 description of `ifOutOctets' changed ./IF-MIB.old:370 previous definition of `ifOutOctets' ../../mibs/ietf/IF-MIB:449 description of `ifOutUcastPkts' changed ./IF-MIB.old:379 previous definition of `ifOutUcastPkts' ../../mibs/ietf/IF-MIB:465 description of `ifOutNUcastPkts' changed ./IF-MIB.old:392 previous definition of `ifOutNUcastPkts' ../../mibs/ietf/IF-MIB:485 description of `ifOutDiscards' changed ./IF-MIB.old:407 previous definition of `ifOutDiscards' ../../mibs/ietf/IF-MIB:501 description of `ifOutErrors' changed ./IF-MIB.old:420 previous definition of `ifOutErrors' ../../mibs/ietf/IF-MIB:526 description of `ifSpecific' changed ./IF-MIB.old:440 previous definition of `ifSpecific' ../../mibs/ietf/IF-MIB:599 description of `ifName' changed ./IF-MIB.old:509 previous definition of `ifName' ../../mibs/ietf/IF-MIB:621 description of `ifInMulticastPkts' changed ./IF-MIB.old:530 previous definition of `ifInMulticastPkts' ../../mibs/ietf/IF-MIB:639 description of `ifInBroadcastPkts' changed ./IF-MIB.old:542 previous definition of `ifInBroadcastPkts' ../../mibs/ietf/IF-MIB:654 description of `ifOutMulticastPkts' changed ./IF-MIB.old:552 previous definition of `ifOutMulticastPkts' ../../mibs/ietf/IF-MIB:671 description of `ifOutBroadcastPkts' changed ./IF-MIB.old:565 previous definition of `ifOutBroadcastPkts' ../../mibs/ietf/IF-MIB:697 description of `ifHCInOctets' changed ./IF-MIB.old:587 previous definition of `ifHCInOctets' ../../mibs/ietf/IF-MIB:712 description of `ifHCInUcastPkts' changed ./IF-MIB.old:597 previous definition of `ifHCInUcastPkts' ../../mibs/ietf/IF-MIB:728 description of `ifHCInMulticastPkts' changed ./IF-MIB.old:608 previous definition of `ifHCInMulticastPkts' ../../mibs/ietf/IF-MIB:747 description of `ifHCInBroadcastPkts' changed ./IF-MIB.old:623 previous definition of `ifHCInBroadcastPkts' ../../mibs/ietf/IF-MIB:763 description of `ifHCOutOctets' changed ./IF-MIB.old:634 previous definition of `ifHCOutOctets' ../../mibs/ietf/IF-MIB:778 description of `ifHCOutUcastPkts' changed ./IF-MIB.old:644 previous definition of `ifHCOutUcastPkts' ../../mibs/ietf/IF-MIB:797 description of `ifHCOutMulticastPkts' changed ./IF-MIB.old:657 previous definition of `ifHCOutMulticastPkts' ../../mibs/ietf/IF-MIB:815 description of `ifHCOutBroadcastPkts' changed ./IF-MIB.old:673 previous definition of `ifHCOutBroadcastPkts' ../../mibs/ietf/IF-MIB:947 description of `ifStackTable' changed ./IF-MIB.old:752 previous definition of `ifStackTable' ../../mibs/ietf/IF-MIB:1002 range `(0..2147483647)' added to type used in `ifStackHigherLayer' ../../mibs/ietf/IF-MIB:1015 range `(0..2147483647)' added to type used in `ifStackLowerLayer' ../../mibs/ietf/IF-MIB:1440 legal status change from `current' to `deprecated' for `ifTestTable' ./IF-MIB.old:846 previous definition of `ifTestTable' ../../mibs/ietf/IF-MIB:1572 legal status change from `current' to `deprecated' for `ifTestEntry' ./IF-MIB.old:984 previous definition of `ifTestEntry' ../../mibs/ietf/IF-MIB:1594 legal status change from `current' to `deprecated' for `ifTestId' ./IF-MIB.old:1004 previous definition of `ifTestId' ../../mibs/ietf/IF-MIB:1603 legal status change from `current' to `deprecated' for `ifTestStatus' ./IF-MIB.old:1013 previous definition of `ifTestStatus' ../../mibs/ietf/IF-MIB:1616 legal status change from `current' to `deprecated' for `ifTestType' ./IF-MIB.old:1029 previous definition of `ifTestType' ../../mibs/ietf/IF-MIB:1644 legal status change from `current' to `deprecated' for `ifTestResult' ./IF-MIB.old:1058 previous definition of `ifTestResult' ../../mibs/ietf/IF-MIB:1665 legal status change from `current' to `deprecated' for `ifTestCode' ./IF-MIB.old:1081 previous definition of `ifTestCode' ../../mibs/ietf/IF-MIB:1665 description of `ifTestCode' changed ./IF-MIB.old:1081 previous definition of `ifTestCode' ../../mibs/ietf/IF-MIB:1685 legal status change from `current' to `deprecated' for `ifTestOwner' ./IF-MIB.old:1101 previous definition of `ifTestOwner' ../../mibs/ietf/IF-MIB:1070 description of `ifRcvAddressTable' changed ./IF-MIB.old:1123 previous definition of `ifRcvAddressTable' ../../mibs/ietf/IF-MIB:1112 access of `ifRcvAddressAddress' changed from `read write' to `not accessible' ./IF-MIB.old:1163 previous definition of `ifRcvAddressAddress' ../../mibs/ietf/IF-MIB:892 column `ifAlias' has been added ../../mibs/ietf/IF-MIB:924 column `ifCounterDiscontinuityTime' has been added ../../mibs/ietf/IF-MIB:117 scalar `ifTableLastChange' has been added ../../mibs/ietf/IF-MIB:1045 scalar `ifStackLastChange' has been added ../../mibs/ietf/IF-MIB:1211 description of `linkDown' changed ./IF-MIB.old:1157 previous definition of `linkDown' ../../mibs/ietf/IF-MIB:1223 description of `linkUp' changed ./IF-MIB.old:1169 previous definition of `linkUp' ../../mibs/ietf/IF-MIB:1697 legal status change from `current' to `deprecated' for `ifGeneralGroup' ./IF-MIB.old:1326 previous definition of `ifGeneralGroup' ../../mibs/ietf/IF-MIB:1697 description of `ifGeneralGroup' changed ./IF-MIB.old:1326 previous definition of `ifGeneralGroup' ../../mibs/ietf/IF-MIB:1315 description of `ifFixedLengthGroup' changed ./IF-MIB.old:1340 previous definition of `ifFixedLengthGroup' ../../mibs/ietf/IF-MIB:1340 description of `ifPacketGroup' changed ./IF-MIB.old:1364 previous definition of `ifPacketGroup' ../../mibs/ietf/IF-MIB:1709 legal status change from `current' to `deprecated' for `ifTestGroup' ./IF-MIB.old:1428 previous definition of `ifTestGroup' ../../mibs/ietf/IF-MIB:1719 legal status change from `current' to `deprecated' for `ifStackGroup' ./IF-MIB.old:1437 previous definition of `ifStackGroup' ../../mibs/ietf/IF-MIB:1719 description of `ifStackGroup' changed ./IF-MIB.old:1437 previous definition of `ifStackGroup' ../../mibs/ietf/IF-MIB:1300 group `ifGeneralInformationGroup' has been added ../../mibs/ietf/IF-MIB:1402 group `ifStackGroup2' has been added ../../mibs/ietf/IF-MIB:1728 group `ifOldObjectsGroup' has been added ../../mibs/ietf/IF-MIB:1410 group `ifCounterDiscontinuityGroup' has been added ../../mibs/ietf/IF-MIB:1418 group `linkUpDownNotificationsGroup' has been added -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.

Hi!
David> Is there available a set of test MIB modules that demonstrate the David> operation of Smidiff?
There are some test modules in the test suite in ./test/smidiff. To run them manually, you might do, e.g.
$ cd test/smidiff $ smidiff ./DISMAN-SCRIPT-MIB.old DISMAN-SCRIPT-MIB
In this example the first argument (old revision) specifies a named MIB file in the current directory while the second argument (new revision) is taken from the libsmi MIB repository according to your configuration file and SMIPATH settings.
Note that parser messages go to stderr and smidiff output goes to stdout, so you might prefer to append `2>/dev/null' if you're only interested in the smidiff output.
-frank -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.
participants (3)
-
David T. Perkins
-
Frank Strauss
-
Juergen Schoenwaelder