Wes,
Thanks for the info. I have another question about my subagent. WHen I get an
SNMP get request I have to translate it (using my mib) and ask an external
source for the value of what I want. So in my handler function I just set the
delegated flag to 1 and build a cache object which I save off in a container.
When the response from the external source comes back I find the cache object
and set the requests->requestvb using snmp_set_var_typed_value function.
No matter what I set my timeout to in the snmpget command line application I
always get a nosuchname response. If I don't do the delegated and just set some
hardcoded value using the same mechanism in the handler, I get the value back.
Is there some trick to using the delegated flag? (I do set the delegated flag to
false in the delayed handler)
Thanks
Glenn
Quoting Wes Hardaker <[EMAIL PROTECTED]>:
> >>>>> On Wed, 9 Jun 2004 08:39:07 -0700, Glenn MacGregor
> <[EMAIL PROTECTED]> said:
>
> Glenn> I am writing a subagent for net-snmp-5.1.1. Just getting into
> Glenn> handling the getnext request. I am not too sure how to handle
> Glenn> this... I have a mib and I get the struct tree for the oid that
> Glenn> is asked for, is there a way to get the next oid in the tree
> Glenn> from that?
>
> Glenn> Is there some alogrithm that I can implement to simplify this
> Glenn> process?
>
> I'm not sure what API mechanism you're working with in the agent, but
> it sounds like you might look into one of our "helper" APIs that take
> the burden off of you for implement proper GETNEXT ordering. The
> table_iterator has been the most popular helper in these types of
> problems if the data is stored somewhere outside the agent (in the
> kernel, file, etc). The array helper has been the most popular if you can
> actually keep the data stored within the mib code itself.
>
>
> --
> Wes Hardaker
> Sparta
>
Glenn MacGregor
HighStreet Networks
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders