Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Other versions of this page are also available for the following:
Windows Mobile Not Supported Windows Embedded CE Supported
8/28/2008

The SNMP service polls the SnmpExtensionTrapfunction 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 phPollForTrapEventevent handle that is initialized in the SnmpExtensionInitfunction. The SNMP service then calls SnmpExtensionTrapto acquire trap information. The extension agent passes trap information 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 SnmpExtensionTrapagain. If no more traps need to be generated, the extension agent returns FALSE.

The SnmpExtensionTrapfunction 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 Embedded CE, the SNMP agent encodes the first IP address that is returned by a call to the gethostbynameor getaddrinfofunction into the trap PDU.

See Also