Is there a way to get the opaque session pointer (struct session_list *) from the regular session pointer (struct snmp_session *) when using the Single API? If this is not possible, my description below may document a bug:
Using select and read functions to do asynchronous callbacks will make a series of function calls like this (take note of the session pointer type): snmp_sess_read() takes a struct session_list * as a void * _snmp_sess_read() takes a struct session_list * as a void * _sess_read takes() takes a struct session_list * as a void * In function _sess_read(): 1. creates a new struct session_list called nslp with a session and updated transport and internals based on the struct session_list parameter 2. performs the callback from snmp_callback function pointer: snmp_api.c:5495-5497 (void)nslp->session->callback(NETSNMP_CALLBACK_OP_CONNECT, nslp->session, 0, NULL, sp->callback_magic); In #2 above, nslp->session (a struct snmp_session *), a regular Traditional API session pointer, is passed to the callback function. If using the Single API, the callback function cannot use nslp->session (struct snmp_session *) and would actually want nslp (struct session_list *), the opaque session pointer. I had success creating a global opaque session pointer and using it for snmp_sess_async_send() in the callback function to continue a bulk walk. ------------------------------------------------------------------------------ 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
