[This is preliminary documentation and subject to change.]
The WinSNMP SnmpGetRetry function returns the retry count value, in units, for the retransmission of SNMP message requests. The retry count applies to calls that a WinSNMP manager application makes to the SnmpSendMsg function for a specified management entity.
SNMPAPI_STATUS SnmpGetRetry(
HSNMP_ENTITY hEntity, // destination management entity
smiLPUINT32 nPolicyRetry, // retry count value from the database
smiLPUINT32 nActualRetry // last actual or estimated response
// retry count
);
If the function succeeds, the return value is SNMPAPI_SUCCESS.
If the function fails, the return value is SNMPAPI_FAILURE. To get extended error information, call SnmpGetLastError. The SnmpGetLastError function can return one of the following errors.
Error Code | Description |
---|---|
SNMPAPI_NOT_INITIALIZED | The SnmpStartup function did not complete successfully. |
SNMPAPI_ALLOC_ERROR | An error occurred during memory allocation. |
SNMPAPI_ENTITY_INVALID | The hEntity parameter is invalid. |
SNMPAPI_OTHER_ERROR | An unknown or undefined error occurred. |
A WinSNMP manager application can modify the retry count value with a call to the SnmpSetRetry function.
The WinSNMP manager application can monitor the value of the nActualRetry parameter and compare it to the value of the nPolicyRetry parameter to optimize transmission performance. For additional information, see About Retransmission and Managing the Retransmission Policy.
Windows NT: Requires version 5.0 or later. Available as a redistributable for Windows NT 4.0.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winsnmp.h.
Import Library: Use wsnmp32.lib.
WinSNMP Manager API Overview, WinSNMP Functions, SnmpSetRetry, SnmpSetRetransmitMode, SnmpGetRetransmitMode