void snmpMasterHandlerAsync ( OCTET_T * pMsg, /* pointer to the message */ ALENGTH_T msgl, /* length of the message */ IPCCOMP_T * pIpcComp, /* completion routine */ IPCSEND_AS_T * pIpcSend, /* send routine */ IPCRCV_T * pIpcRcv, /* receive routine */ IPCFREE_T * pIpcFree, /* free routine */ IPCAYT_T * pIpcAyt, /* status check routine */ PTR_T ipchandle, /* ipchandle for the IPC scheme used */ PTR_T user_priv /* MIB tree identifier */ )
This function provides support for an asynchronous communication scheme between the master agent and its subagents. The shipped version of WindNet SNMP does not call this function. Instead, it calls snmpMasterHandlerWR( ), a function that supports a synchronous communication scheme. If you want master agents and subagents to use an asynchronous communication scheme, you must rewrite snmpQueMonitor( ) to call snmpMasterHandlerAsync( ) instead of snmpMasterHandlerWR( ). In addition, because snmpMasterHandlerAsync( ) does not return a function value, you will need to remove the snmpQueMonitor( ) code that responded to the snmpMasterHandlerWR( ) function value. The functionality handled by the removed code should instead be implemented in the function referenced by the pIpcComp parameter. Use the parameters as follows:
void masterIpcComp ( OCTET_T opcode, /* this specifies what needs to be done EBUFFER_T * ebuf, /* reply message to be sent VBL_T * vblist, /* list of varbinds message contained PTR_T ipchandle /* subagent address )
INT_32_T masterIpcSend ( EBUFFER_T * pBuf, /* message to be sent PTR_T ipchandle /* address of subagent UINT_16_T reqid /* ID for request sent )
void masterIpcFree ( PTR_T ipchandle )
INT_32_T masterIpcAyt ( PTR_T ipchandle )