com.outbackinc.services.protocol.snmp.mib
Class jMIBC

java.lang.Object
  |
  +--com.outbackinc.services.protocol.snmp.mib.jMIBC

public class jMIBC
extends java.lang.Object

Mib compiler for jSNMP com.outbackinc.services.protocol.snmp.mib package.

See Also:
SnmpMIBService, SnmpMIBDictionary

Method Summary
static java.io.InputStream loadMib(java.lang.String szMibFilename)
          Load a mib file.
static void main(java.lang.String[] szArgs)
          Convert through a command line interface MIB file(s) to jMIB format suitable for jSNMP to load using the com.outbackinc.services.protocol.snmp.mib package.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadMib

public static java.io.InputStream loadMib(java.lang.String szMibFilename)
                                   throws ParsingException
Load a mib file. More accurately, it translates file(s) in MIB format to jMIB format. The MIB compiler will look for the files referenced in the IMPORT statement in the MIB file in the directory where the input file exists. The returned value is suitable for loading with the com.outbackinc.services.protocol.snmp.mib.SnmpMIBService. This routine can be called more than once to load different MIB files.
Parameters:
szMibFilename - name of the MIB file to load
Returns:
an InputStream in JMIB format
Throws:
ParsingException - if a a parsing error occurs in a MIB file

main

public static void main(java.lang.String[] szArgs)
                 throws ParsingException
Convert through a command line interface MIB file(s) to jMIB format suitable for jSNMP to load using the com.outbackinc.services.protocol.snmp.mib package. The command line is of the form:
 java -jar jMIBC.jar [-b{name=value}]* [-i{mibfile}]* [-o{outputfile}] [-d] [-v] [-mosy] [-smi{name}]* {mibfile}*
 
The MIB compiler will look for the files referenced in the IMPORT statement in the MIB file in the directory where the input file exists. In the following example, the current directory is the directory that is searched to resolve names:
     java -jar jMIBC.jar BRIDGE-MIB.my -o BRIDGE-MIB.jmib
 
The following example illustrates compiling the SNMPv1 MIB file BRIDGE-MIB.my into the dictionary file BRIDGE-MIB.jmib by including all dependent MIBs via the -i option:
     java -jar jMIBC.jar -iRFC1155-SMI.my -iRFC1213-MIB.my BRIDGE-MIB.my -o BRIDGE-MIB.jmib
 
Parameters:
szArgs - compiler arguments
Argument Description Example Occurrence
-b{name=value} Predefines an OID. This allows the user to define an OID without includeinf all dependent MIB files. -bmib-2=mgmt.1 Zero or more times.
-d Allow duplicate definitions of identifiers ot types without printing an error. -d Zero or one time.
-mosy Create output in MOSY format. -mosy Zero or one time. Default is jmib format.
-i{mibfile} Include a MIB file for definition but do not include the contents (OIDs) of the file in the output. -iSNMPv2-CONF.my Zero or more times. If no -i options are specified, the compiler will try to "find" the files specified in the IMPORT statments.
-smi{name} Automatically defines a type. -smiDisplayString Zero or more times.
-o{outputfile} The file name where the output will be written -v Zero or one time. If not specified, the output will be written to standard output.
{mibfile} A list of one or more MIB files that will be compiled. BRIDGE-MIB.my One or more times.
Throws:
ParsingException - if a a parsing error occurs in a MIB file


Home  Services  Products  Purchase  Contact Us  About Us  Legal  Ceramics
Copyright © 2003-2008 jSNMP Enterprises All rights reserved.