Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / tools / smilint.1
1 .\"
2 .\" $Id: smilint.1.in 1676 2004-08-10 10:58:12Z strauss $
3 .\"
4 .TH smilint 1  "August 10, 2004" "IBR" "SMI Tools"
5 .SH NAME
6 smilint \- syntax and semantic checks of SMIv1/v2 and SPPI modules
7 .SH SYNOPSIS
8 .B smilint
9 [
10 .B "-Vhersm"
11 ] [
12 .BI "-c " file
13 ] [
14 .BI "-p " module
15 ] [
16 .BI "-l " level
17 ] [
18 .BI "-i " error-pattern
19 ]
20 .I "module(s)"
21 .SH DESCRIPTION
22 The \fBsmilint\fP program is used to check MIB or PIB modules for syntax
23 errors and semantics at some degree.  SMIv1/v2 style
24 MIB modules as well as SPPI PIB modules are supported.
25 .PP
26 The rules that \fBsmilint\fP is based on are taken from RFC 1155, RFC
27 1212 and RFC 1215 for SMIv1, RFCs 2578-2580 for SMIv2, RFC 3159 for SPPI.
28 .\" and the specification of SMIng that has been a research project
29 .\" within the Network Management Research Group of the IRTF.
30 .SH OPTIONS
31 .TP
32 \fB-V, --version\fP
33 Show the smilint version and exit.
34 .TP
35 \fB-h, --help\fP
36 Show a help text and exit.
37 .TP
38 \fB-e, --error-list\fP
39 Show a list of all known error messages and exit. Error messages can
40 have associated tags, shown in braces at the end of each line. The
41 tags can be used with the -i option to ignore certain error messages.
42 .TP
43 \fB-r, --recursive\fP
44 Report errors and warnings also for recursively imported modules. 
45 .TP
46 \fB-s, --severity\fP
47 Show the error severity in brackets before error messages.
48 .TP
49 \fB-m, --error-names\fP
50 Show the error names in braces before error messages.
51 .TP
52 \fB-c \fIfile\fB, --config=\fIfile\fP
53 Read \fIfile\fP instead of any other (global and user)
54 configuration file.
55 .TP
56 \fB-p \fImodule\fB, --preload=\fImodule\fP
57 Preload the module \fImodule\fP before reading the main
58 module(s). This may be helpful if an incomplete main module misses to
59 import some definitions.
60 .TP
61 \fB-l \fIlevel\fB, --level=\fIlevel\fP
62 Report errors and warnings up to the given severity \fIlevel\fP.
63 See below for a description of the error levels. The default error
64 level is 3.
65 .TP
66 \fB-i \fIprefix\fB, --ignore=\fIprefix\fP
67 Ignore all errors that have a tag which matches \fIprefix\fP.
68 A list of error tags can be retrieved by calling smilint with the
69 -e option.
70 .TP
71 .I module(s)
72 These are the modules to be checked. If a module argument represents a
73 path name (identified by containing at least one dot or slash character),
74 this is assumed to be the exact file to read. Otherwise, if a module is
75 identified by its plain module name, it is searched according to libsmi
76 internal rules. See \fBsmi_config(3)\fP for more details.
77 .SH "ERROR AND WARNING LEVELS"
78 All generated error and warning messages have an associated severity level.
79 The actual severity levels are:
80 .IP 0 3
81 Internal error, no recovery possible. Examples are memory allocation
82 failures. Errors of this level usually cause the application to abort.
83 .IP 1 3
84 Major SMI/SPPI error, recovery somehow possible but may lead to severe
85 problems. Examples are lexically unexpected characters or unknown
86 keywords. Errors of this kind usually lead to follow-on errors.
87 .IP 2 3
88 SMI/SPPI error which is probably tolerated by some
89 implementations. Examples are MIB/PIB modules which mix constructs
90 from different SMI/SPPI versions.
91 .IP 3 3 
92 SMI/SPPI error which is likely tolerated by many
93 implementations. Examples are misplaced SMIv2 MODULE-IDENTITY
94 invocations or SMIv2 textual conventions derived from other textual
95 conventions.
96 .IP 4 3
97 Something which is not strictly an error but which is recommended to
98 be changed. Warnings of this level are usually considered during MIB
99 reviews.
100 .IP 5 3
101 Something that is basically correct but might be problematic in
102 certain environments or usage scenarios. Examples are warnings that
103 identifiers only differ in case or that type definitions are not used
104 within the defining module.
105 .IP 6 3
106 Messages of this level are auxiliary notices. Examples are messages
107 that point to a previous definition in case of a redefinition.
108 .PP
109 Higher levels are currently not used and lead to the same effects as
110 level 6 does. Note that errors up to level 3 are errors violating the
111 specifications and must be fixed by the responsible author. The
112 warnings generated with level 4 should be considered during normal
113 MIB/PIB reviews.
114 .SH "EXAMPLE"
115 This example checks the file RMON2-MIB in the current directory (note
116 that the `./' prefix ensures this). The error level is raised to 6
117 and warnings that claim about identifier names that exceed a length
118 of 32 characters are suppressed.
119 .nf
120
121   $ smilint -l 6 -i namelength-32 ./RMON2-MIB
122   ./RMON2-MIB:3935: unexpected type restriction
123   ./RMON2-MIB:3936: unexpected type restriction
124   ./RMON2-MIB:3937: unexpected type restriction
125   ./RMON2-MIB:3938: unexpected type restriction
126   ./RMON2-MIB:3939: unexpected type restriction
127   ./RMON2-MIB:3940: unexpected type restriction
128   ./RMON2-MIB:4164: scalar object must not have a `read-create' access value
129
130 .fi
131 .SH "SEE ALSO"
132 The 
133 .BR libsmi (3)
134 project is documented at
135 .BR "http://www.ibr.cs.tu-bs.de/projects/libsmi/" "."
136 Other commonly used MIB checkers are
137 .BR mosy "(1) and "
138 .BR smicng "(1)."
139 .SH "AUTHORS"
140 (C) 1999-2004 F. Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de>
141 .br
142 (C) 1999-2002 J. Schoenwaelder, TU Braunschweig, Germany <schoenw@ibr.cs.tu-bs.de>
143 .br
144 (C) 2002-2003 J. Schoenwaelder, University of Osnabrueck, Germany
145 .br
146 (C) 2003-2004 J. Schoenwaelder, International University Bremen, Germany
147 .br
148 (C) 2001-2002 T. Klie, TU Braunschweig, Germany <tklie@ibr.cs.tu-bs.de>
149 .br
150 (C) 2002 M. Bunkus, TU Braunschweig, Germany <bunkus@ibr.cs.tu-bs.de>
151 .br
152 and contributions by many other people.
153 .br