SnmpGetTimeout

[This is preliminary documentation and subject to change.]

The WinSNMP SnmpGetTimeout function returns the time-out value, in hundredths of a second, for the transmission of SNMP message requests. The time-out value applies to calls that a WinSNMP manager application makes to the SnmpSendMsg function for a specified management entity.

SNMPAPI_STATUS SnmpGetTimeout(
  HSNMP_ENTITY hEntity,          // destination management entity 
  smiLPTIMETICKS nPolicyTimeout, // time-out value from the database
  smiLPTIMETICKS nActualTimeout  // last actual or estimated
                                 // response time 
);
 

Parameters

hEntity
Handle to the destination management entity of interest.
nPolicyTimeout
Pointer to an integer variable to receive the time-out value, in hundredths of a second, for the specified management entity. This is a value that the Microsoft WinSNMP implementation stores in a database.
nActualTimeout
Pointer to an integer variable to receive the last actual or estimated response interval for the destination entity, as reported by the implementation. For additional information, see the following Remarks section.

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_ENTITY_INVALID The hEntity parameter is invalid.
SNMPAPI_OTHER_ERROR An unknown or undefined error occurred.

Remarks

The time-out period is the interval between the application's call to the SnmpSendMsg function and its call to the SnmpRecvMsg function.

A WinSNMP manager application can modify the time-out value with a call to the SnmpSetTimeout function.

The WinSNMP manager application can monitor the value of the nActualTimeout parameter and compare it to the value of the nPolicyTimeout parameter to optimize transmission performance. 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, SnmpSetTimeout, SnmpSetRetransmitMode, SnmpGetRetransmitMode