Code Monkey home page Code Monkey logo

smi4j's Introduction

smi4j

SMI and SNMP tools in Java.

Existing modules:

smiparser : The JCC based grammar and SMI parser that generates a MIB tree. smibrowser : A Swing based tool with which MIB modules can beloaded and the MIB tree can be browsed (based on the SMI Parser). smigenerator: An extension for the SMI Parser that can generate different formats of MIB modules, like HTML. snmp : An implementation of the SNMP protocol stack focusd on the SNMP manager.

See file: LICENSE

smi4j's People

Contributors

hhazewinkel avatar

Stargazers

Duke avatar zbv avatar  avatar 高卫东 avatar overflow avatar Oleg Gumennyj avatar  avatar Tiago Duarte avatar  avatar Dan avatar Chris Austin avatar

Watchers

Chris Austin avatar  avatar Chris Jackson avatar  avatar

smi4j's Issues

Some bug fixes required to parse some MIB files

First change is required because in case we have EXPORTS parser goes inn infinite loop. Also this change must be applied to SmiGrammar.jcc

Second change is required in order to check for optional node list and check it only if it is present.

com/mod_snmp/SmiParser/Grammar/SmiGrammar.java

@@ -389,7 +389,7 @@
Token tok;
while ( true ) {
tok = getToken(1);

  •    if ((tok.kind == SEMI_COLON_T) && (tok.kind == IMPORTS_T)) {
    
  •    if ((tok.kind == SEMI_COLON_T) || (tok.kind == IMPORTS_T)) {
         break;
     }
     if (tok.kind != COMMA_T) {
    

com/mod_snmp/SmiParser/Semantics/SemanticsCheck.java
@@ -536,13 +536,17 @@
if (n.module_id.present()) {
msg = "not defined in this module '" + n.module_id + "'";
table = ModuleHashTable.lookup(n.module_id.toString());

  •            checkVariablesDefined(((NodeList)n.mandatory_part.node),
    
  •                  ModuleHashTable.lookup(n.module_id.toString()),
    
  •                  msg);
    
  •            if (n.mandatory_part.present()) {
    
  •                checkVariablesDefined(((NodeList)n.mandatory_part.node),
    
  •                    ModuleHashTable.lookup(n.module_id.toString()),
    
  •                    msg);
    
  •            }
         } else {
             msg = "not defined in this module";
             table = current;
    
  •            checkVariablesDefined(((NodeList)n.mandatory_part.node));
    
  •            if (n.mandatory_part.present()) {
    
  •                checkVariablesDefined(((NodeList)n.mandatory_part.node));
    
  •            }
         }
         if (n.compliance_part.present()) {
             Enumeration e = n.compliance_part.elements();
    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.