SnmpSetRetransmitMode

[This is preliminary documentation and subject to change.]

The WinSNMP SnmpSetRetransmitMode function enables a WinSNMP manager 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.

SNMPAPI_STATUS SnmpSetRetransmitMode(
  smiUINT32 nRetransmitMode  // new retransmission mode 
);
 

Parameters

nRetransmitMode
Specifies a value for the new retransmission mode. This parameter must be one of the following values.
Value Meaning
SNMPAPI_ON The implementation executes the WinSNMP manager application's retransmission policy.
SNMPAPI_OFF The implementation does not execute the WinSNMP manager application's retransmission policy.

Return Values

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_MODE_INVALID The implementation does not support the requested retransmission mode.
SNMPAPI_OTHER_ERROR An unknown or undefined error occurred.

Remarks

If a WinSNMP manager 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 manager application sets the retransmission mode back to SNMPAPI_ON.

Note  If the implementation returns the error SNMPAPI_MODE_INVALID to a call to SnmpSetRetransmitMode, the WinSNMP manager application must execute the retransmission policy.

For additional information, see About Retransmission and Managing the Retransmission Policy.

QuickInfo

  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.

See Also

WinSNMP Manager API Overview, WinSNMP Functions, SnmpSendMsg, SnmpRegister, SnmpGetRetransmitMode, SnmpGetTimeout, SnmpGetRetry