Fwd: [erlang-questions] SNMP AGENT-CAPABILITIES
Wed Dec 1 21:33:43 CET 2010
Patch proposed allowing to compile and use (in limited way - see below)
AGENT-CAPABILITIES macro in the MIBs.
git fetch git://github.com/xoid/otp.git agent_capabilities
---------- Forwarded message ----------
From: Dmitriy Kargapolov <>
Date: Wed, Dec 1, 2010 at 3:21 PM
Subject: Re: [erlang-questions] SNMP AGENT-CAPABILITIES
To: Martin Bjorklund <>
On Wed, Dec 1, 2010 at 7:09 AM, Martin Bjorklund <> wrote:
> Dmitriy Kargapolov <> 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
> > 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
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...
I have published my changes to the branch agent_capabilities at git://
More information about the erlang-patches