SNMP4J-SMI-PRO 2.1.0 Release

This next optimization step provided by SNMP4J-SMI-PRO 2.1.0 released 2026-06-28T22:00:00Z adds the following key features:

  • Strictness.lenientIfStandardFails now allows to compile MIB modules in one go with the best matching mode.
  • The multi-threaded new SmiManager.compile method with maxThreads parameter allows ~2.5x faster compilation on many notebooks.
  • The new MIB sorter performs now 100% correct and faster than before even if there are parse errors in the MIB modules as long as the IMPORTS section could be properly read.

CHANGES

  • Added: SmiManager.compile(..., maxThreads) to compile MIB modules concurrently. This can speed up the compilation of MIB files by a factor up to the number of threads specified by maxThreads.
  • Added: New strictness mode SmiCompiler.Strictness.lenientIfStandardFails. In this mode every MIB module is first compiled with full standard checks; if a module fails for reasons other than unresolvable imports (error number 1100), it is automatically recompiled in lenient mode. SmiManager.compile(..) honors the new mode for both dry-run and store target modes.
  • Added: New interface com.snmp4j.smi.SmiModuleImport with getModuleName() and getImportedModuleNames() describing a (sorted) MIB module together with the names of the modules it imports.
  • Added: SmiModule.getCompilerStrictness() returns the Strictness (standard or lenient) with which a module was compiled. The value is now persisted with the module in the MIB repository and is therefore available again after the module has been read back from a repository.
  • Added: SmiManager.loadAllModules() and SmiManager.getLoadedSmiModules() return all repository modules resp. all currently loaded modules as SmiModule instances; getLoadedModuleNames() and getExplicitlyLoadedModuleNames() return the corresponding module names.
  • Changed: CompilationMonitor.compilationProgress(..) has an additional SmiCompiler.Strictness parameter that reports the strictness actually used to compile the module (relevant for lenientIfStandardFails). This is a source-incompatible change for existing CompilationMonitor implementations.
  • Added: CompilationMonitor.sorted(List<SmiModuleImport>, int failedOffset, Set<String> missingModules) default callback. It is invoked after dependency sorting with the sorted modules and their imports, the offset of the first module that could not be fully sorted (0 if all modules could be sorted), and the set of missing (unresolvable) module names.
  • Improved: ModuleInfoSorter now returns the missing modules correctly, keeps modules whose dependencies could only be partially resolved in dependency order instead of dropping them, and sorts the modules in O(V log V + E) time.
  • Fixed: The IMPORTS of PIB modules (PIB-DEFINITIONS) were not recognised, so SmiManager and ModuleInfoSorter could not resolve PIB module dependencies. PIB imports are now detected.
  • Fixed: A valid PIB EXTENDS clause that references a base PRC no longer raises a false “reference is not a table” error (error number 1600), in particular during lenient compilation.
  • Removed: Unused code.
  • Added: New command line example MibManager (examples/MibManager.java with compile-mib-manager.sh and mib-manager.sh) to create, update, check, and query a MIB repository from the command line.