Discover Method

Performs SNMPv3 discovery.

Syntax

ANSI (Cross Platform)
int Discover();

Unicode (Windows)
INT Discover();
- (void)discover;
#define MID_SNMPMGR_DISCOVER 3

IPWORKSSNMP_EXTERNAL int IPWORKSSNMP_CALL IPWorksSNMP_SNMPMgr_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

When the method is called an SNMPv3 engine discovery request is sent to RemoteHost.

If an AuthenticationPassword is provided, the engine id discovery request is followed by an engine time discovery request, as required by the SNMPv3 User Security Model (USM). In this case Timeout must be set to a non-zero value before calling Discover and the class will wait until a response is received from RemoteHost.

The DiscoveryResponse event is fired upon receipt of a valid discovery response and the values of RemoteEngineId, RemoteEngineBoots, and RemoteEngineTime will then be updated with the received Engine Id, Time, and Boots.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks SNMP 2020 C++ Edition - Version 20.0 [Build 8202]