on_check_engine Event
Fired to check engine parameters (timeliness, etc.).
Syntax
class SNMPTCPTrapMgrCheckEngineEventParams(object): @property def engine_id() -> bytes: ... @property def engine_boots() -> int: ... @property def engine_time() -> int: ... @property def user() -> str: ... @property def security_level() -> int: ... @property def remote_address() -> str: ... @property def remote_port() -> int: ... @property def is_new() -> bool: ... @property def accept() -> bool: ... @accept.setter def accept(value) -> None: ... # In class SNMPTCPTrapMgr: @property def on_check_engine() -> Callable[[SNMPTCPTrapMgrCheckEngineEventParams], None]: ... @on_check_engine.setter def on_check_engine(event_hook: Callable[[SNMPTCPTrapMgrCheckEngineEventParams], None]) -> None: ...
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 on_bad_packet 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.