Thank you for your help.  I must be doing something wrong because 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.  I have compile errors
If I use any other callback function signature with
snmp_sess_async_send() than this:

int callback_func(int operation, struct snmp_session *sp, int reqid,
struct snmp_pdu *cb_pdu, void *cb_data)

Am I doing something wrong?

Thanks,
Brendan

On Tue, Jul 20, 2010 at 11:13, Dave Shield <[email protected]> wrote:
> On 20 July 2010 15:54, Brendan Tauras <[email protected]> wrote:
>> Is there a way to get the opaque session pointer (struct session_list
>> * typecasted as a void *) from the regular session pointer (struct
>> snmp_session *) when using the Single API?
>
> I don't believe so, no.
>
> If you're using the Single Session API, then you should only ever
> be working with the opaque session pointer - you should never
> be passed the internal 'snmp_session' element of this.
>
> In general, there's no link from the snmp_session structure back
> to the enclosing opaque session structure.   The only way that
> the Traditional Session API can do this, is because it keeps an
> internal list of SingleSessions, which it can then search when
> necessary.
>   A Single Session (when explicitly created as such), won't be
> included in this list, so there's no way to reverse the SS->TS
> link.
>
>
> 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