About SnmpExtensionTrap
The SNMP service polls the SnmpExtensionTrap function to acquire information from which it generates a trap message. The extension agent signals to the SNMP service that one or more traps need to be generated by implementing the phPollForTrapEvent event handle that is initialized in the SnmpExtensionInit function. The SNMP service then calls SnmpExtensionTrap to acquire trap information. The extension agent passes the components of the trap to be sent to the SNMP service and returns TRUE. By returning TRUE, the extension agent indicates to the SNMP service that it should poll SnmpExtensionTrap again. If no more traps need to be generated, the extension agent returns FALSE.
The SnmpExtensionTrap function has the following parameters:
An OID of the management enterprise whose registration authority defines the trap.
A pointer to the value of the generic trap field in the trap PDU.
A pointer to the value of the specific trap field in the trap PDU. Each trap that is defined in an enterprise-specific MIB contains an enumerated value that is specified in this parameter.
A pointer to the value of the time stamp that represents the number of centiseconds that have elapsed since the SNMP agent was initialized.
A set of variable bindings that are included in the trap PDU. The extension agent must initialize all of these variable bindings.
Note A SNMPv 1-trap PDU contains a field that specifies the network address of the agent. In Windows CE, the SNMP agent encodes the first IP address that is returned by a call to the gethostbyname function into the trap PDU.
See Also
Last updated on Saturday, April 10, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.