Platform SDK: Network Management

SnmpGetRetransmitMode

The WinSNMP SnmpGetRetransmitMode function returns the current setting of the retransmission mode to a WinSNMP application. The Microsoft WinSNMP implementation uses the retransmission mode to govern transmission time-outs and retransmission attempts on calls to the SnmpSendMsg function.

SNMPAPI_STATUS SnmpGetRetransmitMode(
  smiLPUINT32 nRetransmitMode  // current retransmission mode 
);

Parameters

nRetransmitMode
[out] Pointer to an unsigned long integer variable to receive the current retransmission mode in effect for the implementation. This parameter can be one of the following values.
Value Meaning
SNMPAPI_ON The implementation is executing the WinSNMP application's retransmission policy.
SNMPAPI_OFF The implementation is not executing the WinSNMP 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. If SnmpGetRetransmitMode fails, the value of the nRetransmitMode parameter has no meaning for the application. 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.

Error Code Description
SNMPAPI_NOT_INITIALIZED The SnmpStartup function did not complete successfully.
SNMPAPI_ALLOC_ERROR An error occurred during memory allocation.
SNMPAPI_OTHER_ERROR An unknown or undefined error occurred.

Remarks

Typically a WinSNMP application, rather than an agent application, calls the SnmpGetRetransmitMode function. For additional information, see About Retransmission and Managing the Retransmission Policy.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Winsnmp.h.
  Library: Use Wsnmp32.lib.

See Also

WinSNMP API Overview, WinSNMP Functions, SnmpStartup, SnmpSetRetransmitMode