[ First - *please* don't mail me privately, without copying
any responses to the mailing list. I don't have the time
or inclination to offer private, unpaid, SNMP consultancy.
Keep discussions to the list, where others can both learn
and offer advice. Thanks. ]
On 2 March 2012 16:34, Chris Smith <[email protected]> wrote:
> Hi Dave,
>
> On 29/02/2012 22:26, Dave Shield wrote:
>> Try manipulating the snmpTargetAddrTable and snmpNotifyTable.
>> Setting entries in these tables will control where traps are directed.
>> (This is essentially what the 'trapsink' and similar directives set up)
>
> That sounds promising. Can I confirm that this is possible with a
> subagent over the AgentX protocol?
No.
The AgentX protocol is specifically concerned with processing
GET*/SET requests passed *from* the master agent to the subagent.
i.e. the master agent asks the question (on behalf of some client
application), and the subagent provides the answer. It doesn't
work the other way round.
You'd have to open a separate SNMP session from the subagent
back to the master agent, and issue the SNMP queries over that.
(Being careful not to get into loops!)
> Also, is there some example code
> that shows how to query and modify another module's table?
The simplest approach would probably be to use the 'netsnmp_query_xxx'
API calls. See the code about 2/3 down the file 'snmplib/snmp_client.c'
(There are also some "internal query" API calls defined in
agent/mibgroup/utilities/iquery
but these are aimed at handling queries from the agent to itself, or possibly
from a master agent to the subagents)
Dave
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users