Re: [lisp-snmp] Documentation?
Brought to you by:
binghe
From: Chun T. (binghe) <bin...@gm...> - 2013-02-23 15:26:30
|
Hi Larry There's no formal user manual for cl-net-snmp yet, but there's a paper (doc/papers/ILC09-SNMP.pdf) for you to understand most of its APIs. In cl-net-snmp, all your used SNMP vendor MIBs need to be loaded into Lisp environment as CLOS objects. There're two ways to do this work: 1. Use the ASN.1 compiler (compile-asn.1), compile the MIB from ASN.1 to Common Lisp, and then compile/load it into your Lisp environment. You can either manually call 'compile-asn.1 from your application, or directly modify the variable *preload-mibs* in cl-net-snmp's "update-mib.lisp" and then call (update-mibs) to get ASDF-loadable source and system definitions. (in the latter way you're modifying cl-net-snmp for your application) 2. Use the ASN.1 interpreter (load-asn.1) to load MIB directly into Lisp environment. Notice the the interpreter may not be able to load some complex MIB definitions correctly. You should be able to see the syntax of above mentioned Lisp functions by directly looking into their source code. Once you have your MIBs loaded, getting the DESCRIPTION of any loaded OID will be quite easy: 1. Get the OID object by using ASN.1:OID function 2. Get the DESCRIPTION slot from the object. Following is a sample use: CL-USER 14 > (asn.1::oid-description (asn.1:oid "1.3.6.1.2.1.1.1")) "A textual description of the entity. This value should include the full name and version identification of the system's hardware type, software operating-system, and networking software." Regards, Chun Tian (binghe) Il giorno 23/feb/2013, alle ore 18:01, Song Lining <son...@gm...> ha scritto: > Hi, > > This seems to be the one I am looking for. --- I have tried the Perl SNMP:MIB:Compiler module but found it's rather primitive and got the same issue --- few documents :-) > > I have downloaded this package and am trying to run some test codes but I found myself no where to find any API documents especially some code examples. > > I am particularly interested to search inside the loaded MIB for details such as DESCRIPTION of certain OID (The final goal is to load all the Cisco MIB's and return the DESCRIPTION of any trap OID upon request). Is there API's (or any means) for this purpose? > > Thanks, > > Larry Song > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb_______________________________________________ > cl-net-snmp-general mailing list > cl-...@li... > https://lists.sourceforge.net/lists/listinfo/cl-net-snmp-general |