CheckEngine Event

Fired to check engine parameters (timeliness, etc.).

Syntax

ANSI (Cross Platform)
virtual int FireCheckEngine(SNMPTrapMgrCheckEngineEventParams *e);
typedef struct {
const char *EngineId; int lenEngineId;
int EngineBoots;
int EngineTime;
const char *User;
int SecurityLevel;
const char *RemoteAddress;
int RemotePort;
int IsNew;
int Accept; int reserved; } SNMPTrapMgrCheckEngineEventParams; Unicode (Windows) virtual INT FireCheckEngine(SNMPTrapMgrCheckEngineEventParams *e);
typedef struct {
LPCSTR EngineId; INT lenEngineId;
INT EngineBoots;
INT EngineTime;
LPCWSTR User;
INT SecurityLevel;
LPCWSTR RemoteAddress;
INT RemotePort;
BOOL IsNew;
BOOL Accept; INT reserved; } SNMPTrapMgrCheckEngineEventParams;
- (void)onCheckEngine:(NSData*)engineId :(int)engineBoots :(int)engineTime :(NSString*)user :(int)securityLevel :(NSString*)remoteAddress :(int)remotePort :(BOOL)isNew :(int*)accept;
#define EID_SNMPTRAPMGR_CHECKENGINE 3

virtual INT IPWORKSSNMP_CALL FireCheckEngine(LPSTR &lpEngineId, INT &lenEngineId, INT &iEngineBoots, INT &iEngineTime, LPSTR &lpszUser, INT &iSecurityLevel, LPSTR &lpszRemoteAddress, INT &iRemotePort, BOOL &bIsNew, BOOL &bAccept);

Remarks

The Accept parameter determines if the engine will be accepted or not. If you set Accept to False prior to exiting the event, the processing on the message will stop and a BadPacket event will be fired.

The default value of Accept is True if and only if:

a) the engine already exists in the internal authentication cache (the IsNew parameter is False) and the timeliness has been verified;

b) the engine does not exist in the internal authentication cache (the IsNew parameter is True), but the packet has been authenticated by the class (SecurityLevel >= 1).

In all other cases, the default value for Accept is False, and you are responsible for accepting or not accepting the engine based on other considerations.

If Accept is true upon event exit, then:

a) if the engine already exists in the internal authentication cache, its time is updated to reflect the new time and the processing of the packet continues;

b) if the engine does not exist in the internal authentication cache, it is added there and if User is authenticated, the User will be added too.

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