SnmpSetRetransmitMode function (winsnmp.h)
[SNMP is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use Windows Remote Management, which is the Microsoft implementation of WS-Man.]
The WinSNMP SnmpSetRetransmitMode function enables a WinSNMP application to set the retransmission mode. The Microsoft WinSNMP implementation uses the new retransmission mode to govern transmission time-outs and retransmission attempts on subsequent calls to the SnmpSendMsg function.
Syntax
SNMPAPI_STATUS SNMPAPI_CALL SnmpSetRetransmitMode(
[in] smiUINT32 nRetransmitMode
);
Parameters
[in] nRetransmitMode
Specifies a value for the new retransmission mode. This parameter must be one of the following values.
Value | Meaning |
---|---|
|
The implementation executes the WinSNMP application's retransmission policy. |
|
The implementation does not execute the WinSNMP application's retransmission policy. |
Return value
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 specifying a NULL value in its session parameter. The SnmpGetLastError function can return one of the following errors.
Return code | Description |
---|---|
|
The SnmpStartup function did not complete successfully. |
|
An error occurred during memory allocation. |
|
The implementation does not support the requested retransmission mode. |
|
An unknown or undefined error occurred. |
Remarks
Typically a WinSNMP manager application, rather than an agent application, calls the SnmpSetRetransmitMode function.
If a WinSNMP application sets the retransmission mode to SNMPAPI_OFF, the implementation does not initiate retransmission attempts for new SNMP communications operations. The new setting affects all subsequent calls to the SnmpSendMsg function, until the WinSNMP application sets the retransmission mode back to SNMPAPI_ON.
Calling the SnmpCancelMsg function is equivalent to calling the SnmpSetRetransmitMode function, for a specific SNMP message, with the retransmission mode equal to SNMPAPI_OFF.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winsnmp.h |
Library | Wsnmp32.lib |
DLL | Wsnmp32.dll |