IPWorks SNMP 2020 Python Edition

Questions / Feedback?

on_packet_trace Event

Fired for every packet sent or received.

Syntax

class SNMPTCPAgentPacketTraceEventParams(object):
  @property
  def packet() -> bytes: ...
  @property
  def direction() -> int: ...
  @property
  def packet_address() -> str: ...
  @property
  def packet_port() -> int: ...

# In class SNMPTCPAgent:
@property
def on_packet_trace() -> Callable[[SNMPTCPAgentPacketTraceEventParams], None]: ...
@on_packet_trace.setter
def on_packet_trace(event_hook: Callable[[SNMPTCPAgentPacketTraceEventParams], None]) -> None: ...

Remarks

The on_packet_trace event shows all the packets sent or received by the class.

Packet contains the full contents of the datagram.

Direction shows the direction of the packet: 1 for incoming packets, and 2 for outgoing packets.

In the case of an incoming packet, PacketAddress and PacketPort identify the source of the packet.

In the case of an outgoing packet, PacketAddress and PacketPort identify the destination of the packet.

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