[erlang-questions] SNMP AGENT-CAPABILITIES

Dmitriy Kargapolov dmitriy.kargapolov@REDACTED
Wed Dec 1 21:21:15 CET 2010


Hi Martin,

On Wed, Dec 1, 2010 at 7:09 AM, Martin Bjorklund <mbj@REDACTED> wrote:

> Hi,
>
> Dmitriy Kargapolov <dmitriy.kargapolov@REDACTED> wrote:
> > Trying to improve SNMP agent for some app written in Erlang, I found that
> > Erlang MIB compiler does not support AGENT-CAPABILITIES statement which
> is
> > actually a macro from SNMPv2-CONF.
>
> Normally, an invocation of the AGENT-CAPABILITIES macro is specified
> in a separate document from the normal MIB modules.  It documents how
> a certain agent (or family of agents) conforms to a set of MIB
> modules.
>

Compiler is indifferent to the layout and AGENT-CAPABILITIES location. It
just did not recognize this construct.


> Do you mean that you want the MIB compiler to support this use case?
> If so, what exactly do you want the compiler to do?
>
In some (odd) cases you get files with both normal MIB modules, and an
> AGENT-CAPABILITIES invocation in the same file.  Is this the use case
> you want to support?
>

>From SNMP agent perspective, it is enough to register OID of the
AGENT-CAPABILITIES object, so I would later to use smpa:name_to_oid/1 to
resolve its name and snmpa/add_agent_caps/2 to add this OID to sysORTable...
This is exactly what I implemented in my minimalistic patch.

>From SNMP manager perspective it would be nice to have access to the whole
content of the AGENT-CAPABILITIES construct. To make possible to decide
which part of features of agent have to be supported in manager at runtime.
I understand that this task requires a bit more time (which I do not have),
so its ok to leave this for future, if needed.


> I have modified the MIB compiler to "support" this macro.  The grammar
> builds a record of the information, and then the compiler ignores this
> record.  Some day I should make it available in git...
>
>
> /martin
>

I have published my changes to the branch agent_capabilities at git://
github.com/xoid/otp.git.


More information about the erlang-questions mailing list