Hi,
I am Akim, working on a project to extend an snmp agent with pass-persist
module.
but I met a problem,
When I w?ant to Set a mib, net-snmp seems pass me a "GET" request first,
and I response the mib value, then net-snmp pass me the real "SET" request.
For example : I want to set a tabular.
1. what I did:

> > snmpset -v2c -c mycommunity 192.168.10.7 1.3.6.1.4.1.7679.4.1.1.2 =
> "test string"

2. what net-snmp passed to me:

> get
> 1.3.6.1.4.1.7679.4.1.1.2

3. what I response:

> string
> 1.3.6.1.4.1.7679.4.1.1.2
> abcde

4. then the real SET passed to me:

> set
> 1.3.6.1.4.1.7679.4.1.1.2
> string test string

5. I response

> DONE


Everything is fine.
But if the requested tabular INDEX doesn't exist in this table, (actually I
will create one in my program), the process becomes:
1. what I did:

> > snmpset -v2c -c mycommunity 192.168.10.7 1.3.6.1.4.1.7679.4.1.2.2 =
> "test string"
>                                                                 ^
> //assuming this index "2" doesn't exist yet.

2. what net-snmp passed to me:

> get
> 1.3.6.1.4.1.7679.4.1.2.2

3. what I response:

> NONE

4. then it is all over! net-snmp doesn't pass me anything.

So I can not create a new row for this table in my own program! But I have
to...
Who can help me ??

May Be :
- Is there a method to change the net-snmp behavior, just let SET request
be the SET request, instead of send me a GET first.
OR
- Does net-snmp have a way to inform me it's original request type, so that
I can reply a pre-defined stuffs if it is originally a SET.


Thank you all very much.

Akim
------------------------------------------------------------------------------
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