Thank You Magnus. Sorry, I not quite explained my problem.

Let see an example based on delayed_instance module:
User made regular request to this module:
$ snmpget -v2c -c private 192.168.229.128 .1.3.6.1.4.1.8072.2.1.2.0

NET-SNMP-EXAMPLES-MIB::netSnmpExampleSleeper.0 = INTEGER: 1
The module gives answer.

But if the request id consists partly of defined OID + unknown subid, say 
5.4.3.2.1.0:

$ snmpget -v2c -c private 192.168.229.128 .1.3.6.1.4.1.8072.2.1.2.5.4.3.2.1.0
NET-SNMP-EXAMPLES-MIB::netSnmpExampleSleeper.5.4.3.2.1.0 = No Such Object 
available on this agent at this OID

Internal net-snmp helpers returns an error. In this case I need the execution 
flow to run into delayed_instance_handler() which will perform this request.Let 
handler do this work for any OID, consisted of defined and unknown parts.

 
Best regards,
Dmitriy Alekseev


----- Original Message -----
From: Magnus Fromreide <ma...@lysator.liu.se>
To: Dmitriy Alekseev <alexe...@yahoo.com>
Cc: "net-snmp-coders@lists.sourceforge.net" 
<net-snmp-coders@lists.sourceforge.net>
Sent: Friday, August 30, 2013 5:17 PM
Subject: Re: Handler for OID subtree.

On Fri, 2013-08-30 at 06:01 -0700, Dmitriy Alekseev wrote:
> Hello, developers.
> 
> 
> I need to create MIB module which accepts any requests for oid which
> is descendant of specified subtree. It should interact as some kind of
> proxy - doesn't know which requests are valid, but only redirects
> request to dummy devices via serial interface. The endpoint device
> generates anwer and sends it backward to module, next snmp response
> will be sent to recipient.
> Does the net-snmp architecture allow it, without registering any
> particular OIDs for every object?

Yes.
> 
> Would be greatful for any remarks and advices.

Look at the delayed_instance example.

/MF

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to