SnmpExtensionInit
The
extensible agent calls the SnmpExtensionInit function in the extension
agent DLL to perform bilateral initialization of both the extension and the
extensible agents.
BOOL SnmpExtensionInit(
DWORD dwTimeZeroReference, |
|
HANDLE *hPollForTrapEvent, |
|
AsnObjectIdentifier *supportedView |
|
); |
|
Parameters
dwTimeZeroReference
[in]
Specifies a time-zero reference for the extension agent.
hPollForTrapEvent
[out] Points
to an event handle that will indicate that there are traps available when the
extensible agent polls the SnmpExtensionTrap3JWJ9HX function entry point.
supportedView
[out] Points
to an object identifier variable structure that specifies the MIB subtree that
the extension agent supports.
Return Values
If the
function succeeds, the return value is TRUE.
If the
function fails, the return value is FALSE.
Remarks
The dwTimeZeroReference
parameter allows all extension agents to report time information from the same
reference point. The extension agent can compute elapsed time by subtracting dwTimeZeroReference
from the value returned by the GetCurrentTimeH.M.ZJ function. This time reference is necessary
to implement traps and initiate some MIB variables.
An extension
agent notifies the extensible agent that it needs to send a trap by setting the
state of the hPollForTrapEvent parameter that is passed back during the SnmpExtensionInit
entry point to signaled. Once this event has been set to the signaled state,
the extensible agent repeatedly calls the extension agent's SnmpExtensionTrap
If the
extension agent does not generate traps, the hPollForTrapEvent parameter
should return a value of NULL.
See Also
SnmpExtensionTrap, GetCurrentTimeJ_ZBJV, SetEventAT02D.