Blob Blame History Raw
.\"
.\" $Id: smidump.1.in 7608 2008-01-22 13:05:41Z schoenw $
.\"
.TH smidump 1  "August 10, 2004" "IBR" "SMI Tools"
.SH NAME
smidump \- dump SMI or SPPI modules in various formats
.SH SYNOPSIS
.B smidump
[
.B "-Vhqusmk"
] [
.BI "-c " file
] [
.BI "-o " name
] [
.BI "-p " module
] [
.BI "-l " level
] [
.BI "-f " format
]
.I "module(s)"
.SH DESCRIPTION
The \fBsmidump\fP program is used to dump the contents of a single MIB
or PIB
module or a collection of modules to stdout in a selectable output
format.  This format may be a simple tree of nodes, types or imported
modules, but also a format fully compliant to SMIv1, SMIv2, SPPI or SMIng or
CORBA IDL or C source code. Smidump can thus be used to convert
modules from SMIv2 to SMIng and from SMIng to SMIv2, or to develop
template based agent code.
.SH OPTIONS
.TP
\fB-V, --version\fP
Show the smidump version and exit.
.TP
\fB-h, --help\fP
Show a help text and exit. The help text contains a list of all
supported output formats.
.TP
\fB-c \fIfile\fB, --config=\fIfile\fP
Read \fIfile\fP instead of any other (global and user)
configuration file.
.TP
\fB-f \fIformat\fB, --format=\fIformat\fP
Use \fIformat\fP when dumping a module. Supported output formats are described 
below. The default output format is SMIng. The \fIformat\fP argument is
case insensitive.
.TP
\fB-l \fIlevel\fB, --level=\fIlevel\fP
Report errors and warnings up to the given severity \fIlevel\fP. See
the smilint(1) manual page for a description of the error levels. The
default error level is 3.
.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-o \fIname\fB, --output=\fIname\fB
Write the output in one or multiple files instead of stdout. The file
name(s) are derived from the \fIname\fP argument.  Not all format
support this option.
.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-q, --quiet\fP
Suppress comments from dumped modules. What kind of information
gets suppressed depends on the output format.
.TP
\fB-u, --unified\fP
Dump a unified output in case of multiple \fImodule(s)\fP instead of
multiple concatenated output sections. This is not supported for all
output formats.
.TP
\fB-k, --keep-going\fP
Continue as much as possible after serious parse errors. Note that
the output generated after serious parse errors may be incomplete
and should be used with care.
.TP
.I module(s)
These are the module(s) to be dumped. 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 "OUTPUT FORMATS"
The \fBsmidump\fP program supports the following output formats:
.TP 12
sming
SMIng compliant format as defined in the SMIng Internet-Draft.
.TP
smiv2
SMIv2 compliant format as defined in RFC 2578, RFC 2579, RFC 2580.
.TP
smiv1
SMIv2 compliant format as defined in RFC 1155, RFC 1212, RFC 1215.
.TP
sppi
SPPI compliant format as defined in RFC 3159. If the underlying module
is not SPPI, there might be some mandatory information missing.
.TP
mosy
Format generated by the mosy compiler.
.TP
imports
Import hierarchy of a module.
.TP
types
Types defined in a module.
.TP
tree
OID registration tree structure of a module.
.TP
metrics
Metrics derived from a module (experimental).
.TP
identifiers
List of identifiers defined in a module.
.TP
compliances
Compliance definitions with all included objects and notifications.
.TP
corba
CORBA IDL and OID definitions following the JIDM specification translation
rules.
.TP
netsnmp
C source code files for usage within the net-snmp package (experimental).
.TP
scli
ANSI C manager stubs for usage within the scli package (experimental).
.TP
cm
Reverse engineered conceptual model in DIA XML file format (experimental).
.TP
svg
SVG diagram of a module (experimental). Use with \fB-u\fP when dumping multiple \fImodules\fP.
.TP
jax
Java AgentX sub-agent classes in separate files (experimental).
.TP
perl
Perl represention of the MIB module
(contributed by Martin Schulz <schulz@videotron.ca>).
.TP
python
Python dictionaries represention of the MIB module
(contributed by Pat Knight <pat@ktgroup.co.uk>).
.TP
xml
SMI in XML format (experimental).
.TP
xsd
SMI in XML schema format (experimental).
.TP
sizes
SNMP best case / worst case RFC 3416 PDU sizes for typical PDUs
excluding SNMP message and transport headers (experimental).

.SH "EXAMPLE"
This example converts the SMIv2 module IF-MIB in the current directory
to IF-MIB.sming in SMIng format. Note that the ./ prefix is used to
ensure reading the module from the current directory and not from a
place that libsmi guesses on its own.
.nf

  $ smidump -f sming ./IF-MIB > IF-MIB.sming
.fi
.SH "SEE ALSO"
The
.BR libsmi (3)
project is documented at
.BR "http://www.ibr.cs.tu-bs.de/projects/libsmi/" "."
.PP
.BR smilint "(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