Package net.percederberg.mibble.value

Examples of net.percederberg.mibble.value.ObjectIdentifierValue


     *
     * @param loader            the MIB loader
     */
    private static void printOidTree(MibLoader loader) {
        Mib                    mib;
        ObjectIdentifierValue  root = null;
        Iterator               iter;
        MibSymbol              symbol;
        MibValue               value;

        if (loader.getAllMibs().length <= 0) {
            printError("no MIB modules have been loaded");
            return;
        }
        mib = loader.getAllMibs()[0];
        iter = mib.getAllSymbols().iterator();
        while (root == null && iter.hasNext()) {
            symbol = (MibSymbol) iter.next();
            if (symbol instanceof MibValueSymbol) {
                value = ((MibValueSymbol) symbol).getValue();
                if (value instanceof ObjectIdentifierValue) {
                    root = (ObjectIdentifierValue) value;
                }
            }
        }
        if (root == null) {
            printError("no OID value could be found in " + mib.getName());
        } else {
            while (root.getParent() != null) {
                root = root.getParent();
            }
            printOid(root);
        }
    }
View Full Code Here

TOP

Related Classes of net.percederberg.mibble.value.ObjectIdentifierValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.