[AGENT++] Load/Parse MIB

Miroslav Beranič ml. miroslav.beranic at gmail.com
Fri Jan 2 03:18:00 CET 2009


Hi,

2009/1/2 Frank Fock <fock at agentpp.com>:
> Miroslav,
>
> Miroslav Beranič ml. wrote:
>>
>> Greetings,
>>
>> how do I load ASN.1 data from MIB into agent?
>
> Why ASN.1? MIBs are written in SMI!
Oh, my mistake. I thought MIBs are written in ASN.1. Yes, I see now, I
have not read the whole WIKI. SMI is subset of ASN.1.

>
>> Is there an example in Agent++ or some other docs, or some class I
>> could look at?
>
> No.
I read documentation in PS : "AGENT++ An Object Oriented API for ...",
I found a method there:
void MibEntry::load_from_file(const char* path);

Is this the method I could use to read from MIB? The better question
would be: does method save_to_file saves internal data in MIB like
format, or does it use some custom format?
Is there any example how do I use this method?

>
>>
>> I would like to load MIB file into my agent.
>
> Why? In an agent (production) it makes no sense
> to have runtime MIB information.
Well, I am looking more for a ASN.1 (SMI) parser/reader. I would like
to learn more about the ASN.1 (and MIB, SNMP, ...). I have looked at
the NET-SNMP project, but it seems to be to big library for my needs.
I would like to have a parser, much like Apache XML parser (I hoped
there is something like it), but any (good) parser would do. Would you
know of one?

>
> At compile time, you may use AgenPro to use
> MIB specification for code generation.
I have not looked at the AgentPro, only at Agent++. I am looking at
the feature list now. It seems like there are some features, that
could help me. I will check it out.

>
>>
>> And: Is it possible to validate MIB file -- or is there some other
>> library that does this?
>
> You can validate MIB files online at:
> http://www.agentpp.com/mibtools/mibtools.html
No, I was thinking like at compile time or runtime ...

>
> Best regards,
> Frank
>
> --
> AGENT++
> http://www.agentpp.com
> http://www.mibexplorer.com
> http://www.mibdesigner.com
>
>

Best regards,
Miroslav


More information about the AGENTPP mailing list