Assigning Request Identifiers

[This is preliminary documentation and subject to change.]

A WinSNMP manager application can call the SnmpCreatePdu function or the SnmpSetPduData function to assign an application-generated request identifier to a PDU. The application must pass the value in the request_id parameter.

An application can request that the Microsoft WinSNMP implementation generate and assign a request identifier to a PDU by passing zero in the request_id parameter of the SnmpCreatePdu function. The application can retrieve the assigned request identifier with a call to the SnmpGetPduData function.

To assign a request identifier equal to a specific value, including zero, the application must pass that value in the request_id parameter of the SnmpSetPduData function.

When the implementation executes the application's retransmission policy, it includes the request_id field of the original PDU in each retransmitted SNMP message. For additional information, see About Retransmission and Managing the Retransmission Policy.

Note  When the implementation receives traps from an SNMPv1 entity, it assigns a non-zero value to the request_id field of the PDU. This value may duplicate a request identifier used by the application in a request PDU. Applications must check for duplication.