Blob Blame History Raw
.\"
.\" $Id: smilint.1.in 1676 2004-08-10 10:58:12Z strauss $
.\"
.TH smilint 1  "August 10, 2004" "IBR" "SMI Tools"
.SH NAME
smilint \- syntax and semantic checks of SMIv1/v2 and SPPI modules
.SH SYNOPSIS
.B smilint
[
.B "-Vhersm"
] [
.BI "-c " file
] [
.BI "-p " module
] [
.BI "-l " level
] [
.BI "-i " error-pattern
]
.I "module(s)"
.SH DESCRIPTION
The \fBsmilint\fP program is used to check MIB or PIB modules for syntax
errors and semantics at some degree.  SMIv1/v2 style
MIB modules as well as SPPI PIB modules are supported.
.PP
The rules that \fBsmilint\fP is based on are taken from RFC 1155, RFC
1212 and RFC 1215 for SMIv1, RFCs 2578-2580 for SMIv2, RFC 3159 for SPPI.
.\" and the specification of SMIng that has been a research project
.\" within the Network Management Research Group of the IRTF.
.SH OPTIONS
.TP
\fB-V, --version\fP
Show the smilint version and exit.
.TP
\fB-h, --help\fP
Show a help text and exit.
.TP
\fB-e, --error-list\fP
Show a list of all known error messages and exit. Error messages can
have associated tags, shown in braces at the end of each line. The
tags can be used with the -i option to ignore certain error messages.
.TP
\fB-r, --recursive\fP
Report errors and warnings also for recursively imported modules. 
.TP
\fB-s, --severity\fP
Show the error severity in brackets before error messages.
.TP
\fB-m, --error-names\fP
Show the error names in braces before error messages.
.TP
\fB-c \fIfile\fB, --config=\fIfile\fP
Read \fIfile\fP instead of any other (global and user)
configuration file.
.TP
\fB-p \fImodule\fB, --preload=\fImodule\fP
Preload the module \fImodule\fP before reading the main
module(s). This may be helpful if an incomplete main module misses to
import some definitions.
.TP
\fB-l \fIlevel\fB, --level=\fIlevel\fP
Report errors and warnings up to the given severity \fIlevel\fP.
See below for a description of the error levels. The default error
level is 3.
.TP
\fB-i \fIprefix\fB, --ignore=\fIprefix\fP
Ignore all errors that have a tag which matches \fIprefix\fP.
A list of error tags can be retrieved by calling smilint with the
-e option.
.TP
.I 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 \fBsmi_config(3)\fP for more details.
.SH "ERROR AND WARNING LEVELS"
All generated error and warning messages have an associated severity level.
The actual severity levels are:
.IP 0 3
Internal error, no recovery possible. Examples are memory allocation
failures. Errors of this level usually cause the application to abort.
.IP 1 3
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.
.IP 2 3
SMI/SPPI error which is probably tolerated by some
implementations. Examples are MIB/PIB modules which mix constructs
from different SMI/SPPI versions.
.IP 3 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.
.IP 4 3
Something which is not strictly an error but which is recommended to
be changed. Warnings of this level are usually considered during MIB
reviews.
.IP 5 3
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.
.IP 6 3
Messages of this level are auxiliary notices. Examples are messages
that point to a previous definition in case of a redefinition.
.PP
Higher levels are currently not used and lead to the same effects as
level 6 does. 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.
.SH "EXAMPLE"
This example checks the file RMON2-MIB in the current directory (note
that the `./' prefix ensures this). The error level is raised to 6
and warnings that claim about identifier names that exceed a length
of 32 characters are suppressed.
.nf

  $ 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

.fi
.SH "SEE ALSO"
The 
.BR libsmi (3)
project is documented at
.BR "http://www.ibr.cs.tu-bs.de/projects/libsmi/" "."
Other commonly used MIB checkers are
.BR mosy "(1) and "
.BR smicng "(1)."
.SH "AUTHORS"
(C) 1999-2004 F. Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de>
.br
(C) 1999-2002 J. Schoenwaelder, TU Braunschweig, Germany <schoenw@ibr.cs.tu-bs.de>
.br
(C) 2002-2003 J. Schoenwaelder, University of Osnabrueck, Germany
.br
(C) 2003-2004 J. Schoenwaelder, International University Bremen, Germany
.br
(C) 2001-2002 T. Klie, TU Braunschweig, Germany <tklie@ibr.cs.tu-bs.de>
.br
(C) 2002 M. Bunkus, TU Braunschweig, Germany <bunkus@ibr.cs.tu-bs.de>
.br
and contributions by many other people.
.br