What are you trying to do in the callback?
I am trying to continue a walk that uses bulk requests.

Why do you need access to the opaque session structure?
I need to continue the bulk walk request.  The original call used the
Single API via snmp_sess_async_send(), so I understand that I must use
the opaque session pointer for subsequent calls.  Since the callback
function is asynchronous and does not return to the original calling
code, the callback function is the only place that knows whether the
walk is finished or requires another (bulk) request.

Now you're probably thinking why do asynchronous Single API requests.
I have been tasked to write a snmp monitoring program.  It must
request different OIDs at different time intervals, and one request
cannot hold up another (e.g. walks can take a while).  I am using
threads for timing different intervals and asynchronous methods to
keep multiple requests in a single interval from delaying each other.

I am having success with putting the opaque session pointer in my
callback data struct, but I need to finish testing it.  Is this
callback data solution my best option?

Would it be useful to provide an asynchronous walk example for the
wiki when I get things working?

Thank you for your help.
Brendan

On Wed, Jul 21, 2010 at 03:33, Dave Shield <[email protected]> wrote:
> On 20 July 2010 17:54, Brendan Tauras <[email protected]> wrote:
>>  I am getting the internal snmp_session pointer from the Single API.
>>  When I use snmp_sess_async_send(), my callback function gets
>> a snmp_session pointer instead of an opaque session pointer.
>
> OK - I see where this is coming from.
>
>> Am I doing something wrong?
>
> No.
> You're probably seeing something of the history of the Net-SNMP
> development.   The SSI approach was a later addition, with the
> traditional API re-worked as a wrapper around it.
>   It looks as if the asynchronous callbacks still show something
> of the traditional parentage.
>
> I'm not really an expert on the SSI style of working (and unfortunately
> the person who did most of this work is no longer actively involved in
> the project).   But my understanding is that the 'snmp_session'
> structure is meant to hold all of the "user-interesting" information,
> with the opaque session being for the internal housekeeping stuff.
>
>
> Let's turn the question around.
> What are you trying to do in the callback?
> Why do you need access to the opaque session structure?
>
> Dave
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to