smilint(1)

πŸ’… smilint(1) β€” the SMI Tools era, bestie

okay so you found smilint, the actual icon of the SMI Tools lineup, and honestly? she's that girl. let's get into it ✨


πŸ’– NAME πŸ’–

smilint β€” syntax and semantic checks of SMIv1/v2 and SPPI modules πŸ¦‹

like literally, she reads your MIB/PIB modules and tells you what's wrong. no cap.


🌸 SYNOPSIS 🌸

smilint [ -Vhersm ] [ -c file ] [ -p module ] [ -l level ] [ -i error-pattern ] module(s)

✨ DESCRIPTION ✨

okay so the smilint program is here to check MIB or PIB modules for syntax errors and semantics β€” like, to some degree. and bestie, she's versatile: SMIv1/v2 style MIB modules and SPPI PIB modules are both supported πŸ’…

the rules she's built on are taken from RFC 1155, RFC 1212 and RFC 1215 for SMIv1, RFCs 2578-2580 for SMIv2, and RFC 3159 for SPPI. she did her homework fr fr πŸ“š


πŸŽ€ OPTIONS πŸŽ€

  • -V, --version β€” show the smilint version and exit. quick little vibe check and she's out 🫢
  • -h, --help β€” show a help text and exit.
  • -e, --error-list β€” show a list of all known error messages and exit. and listen: error messages can have associated tags, shown in braces at the end of each line. those tags are what you feed to the -i option when you want to ignore certain error messages. iykyk πŸ”₯
  • -r, --recursive β€” report errors and warnings also for recursively imported modules. she goes deep, she's thorough πŸ’€
  • -s, --severity β€” show the error severity in brackets before error messages.
  • -m, --error-names β€” show the error names in braces before error messages.
  • -c file, --config=file β€” read file instead of any other (global and user) configuration file. main character energy: she ignores the group chat and only listens to you πŸ‘‘
  • -p module, --preload=module β€” preload the module module before reading the main module(s). this may be helpful if an incomplete main module misses to import some definitions. very "let me just hand you the missing piece" of her 🧚
  • -l level, --level=level β€” report errors and warnings up to the given severity level. see below for a description of the error levels. the default error level is 3.
  • -i prefix, --ignore=prefix β€” ignore all errors that have a tag which matches prefix. a list of error tags can be retrieved by calling smilint with the -e option. so like, -i + -e = the pairing of the century πŸ’–
  • module(s) β€” these are the modules to be checked. if a module argument represents a path name (identified by containing at least one dot or slash character), this is assumed to be the exact file to read. otherwise, if a module is identified by its plain module name, it is searched according to libsmi internal rules. see smi_config(3) for more details. so: dot or slash = she reads exactly that file, plain name = she goes hunting 🎯

🌈 ERROR AND WARNING LEVELS 🌈

all generated error and warning messages have an associated severity level. the actual severity levels are:

  1. 0 β€” internal error, no recovery possible. examples are memory allocation failures. errors of this level usually cause the application to abort. it's giving catastrophic, ngl 😭
  2. 1 β€” major SMI/SPPI error, recovery somehow possible but may lead to severe problems. examples are lexically unexpected characters or unknown keywords. errors of this kind usually lead to follow-on errors. slippery slope behavior fr.
  3. 2 β€” SMI/SPPI error which is probably tolerated by some implementations. examples are MIB/PIB modules which mix constructs from different SMI/SPPI versions.
  4. 3 β€” SMI/SPPI error which is likely tolerated by many implementations. examples are misplaced SMIv2 MODULE-IDENTITY invocations or SMIv2 textual conventions derived from other textual conventions.
  5. 4 β€” something which is not strictly an error but which is recommended to be changed. warnings of this level are usually considered during MIB reviews.
  6. 5 β€” something that is basically correct but might be problematic in certain environments or usage scenarios. examples are warnings that identifiers only differ in case or that type definitions are not used within the defining module.
  7. 6 β€” messages of this level are auxiliary notices. examples are messages that point to a previous definition in case of a redefinition.

higher levels are currently not used and lead to the same effects as level 6 does. also, heads up bestie:

note that errors up to level 3 are errors violating the specifications and must be fixed by the responsible author. the warnings generated with level 4 should be considered during normal MIB/PIB reviews. so like, level 3 and below is not a suggestion, it's a requirement πŸ’€

πŸ¦‹ EXAMPLE πŸ¦‹

this example checks the file RMON2-MIB in the current directory (note that the ./ prefix ensures this β€” very important, the dot-slash is doing the heavy lifting here). the error level is raised to 6 and warnings that claim about identifier names that exceed a length of 32 characters are suppressed.

$ smilint -l 6 -i namelength-32 ./RMON2-MIB
./RMON2-MIB:3935: unexpected type restriction
./RMON2-MIB:3936: unexpected type restriction
./RMON2-MIB:3937: unexpected type restriction
./RMON2-MIB:3938: unexpected type restriction
./RMON2-MIB:3939: unexpected type restriction
./RMON2-MIB:3940: unexpected type restriction
./RMON2-MIB:4164: scalar object must not have a `read-create' access value

like she really said "here's six of the same thing and one extra problem for flavor" 😭 iconic behavior actually


⭐ SEE ALSO ⭐

the libsmi(3) project is documented at http://www.ibr.cs.tu-bs.de/projects/libsmi/. other commonly used MIB checkers are mosy(1) and smicng(1) β€” the whole friend group, love that for them 🫢


πŸ‘‘ AUTHORS πŸ‘‘

  • (C) 1999-2004 F. Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de>
  • (C) 1999-2002 J. Schoenwaelder, TU Braunschweig, Germany <schoenw@ibr.cs.tu-bs.de>
  • (C) 2002-2003 J. Schoenwaelder, University of Osnabrueck, Germany
  • (C) 2003-2004 J. Schoenwaelder, International University Bremen, Germany
  • (C) 2001-2002 T. Klie, TU Braunschweig, Germany <tklie@ibr.cs.tu-bs.de>
  • (C) 2002 M. Bunkus, TU Braunschweig, Germany <bunkus@ibr.cs.tu-bs.de>

and contributions by many other people. the whole squad ate πŸ’œ


and that's the page, bestie πŸŽ€ this smilint(1) moment came to you courtesy of IBR and is dated August 10, 2004 β€” oldie but a literal goldie, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from