IPWorks SNMP 2020 Python Edition

Questions / Feedback?

on_report Event

Fired when a Report packet is received.

Syntax

class SNMPMgrReportEventParams(object):
  @property
  def request_id() -> int: ...
  @property
  def snmp_version() -> int: ...
  @property
  def community() -> str: ...
  @property
  def user() -> str: ...
  @property
  def security_level() -> int: ...
  @property
  def source_address() -> str: ...
  @property
  def source_port() -> int: ...
  @property
  def error_index() -> int: ...
  @property
  def error_status() -> int: ...
  @property
  def error_description() -> str: ...

# In class SNMPMgr:
@property
def on_report() -> Callable[[SNMPMgrReportEventParams], None]: ...
@on_report.setter
def on_report(event_hook: Callable[[SNMPMgrReportEventParams], None]) -> None: ...

Remarks

For SNMPv3, the User parameter shows the user that was supplied with the packet. This parameter MUST be used together with the SecurityLevel parameter which shows the level of security in the message.

The SecurityLevel parameter shows whether the request has been authenticated. If SecurityLevel is 0, the request has NOT been authenticated (i.e. the packet signature has not been verified). For an authenticated, non encrypted request, SecurityLevel is 1. For an authenticated and encrypted request, SecurityLevel is 2.

The list of variables in the SNMP packet, including optional values and types, is provided through the objects collection. Each object is of type snmpobject. This type describes the obj_id, obj_type, and obj_value of each SNMP object. These variables must be copied to another location before the event has completed executing, or they may be overridden by other events.

The SourceAddress and SourcePort parameters show the address and port of the sender as reported by the TCP/IP stack.

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