PacketTrace Event

Fired for every packet sent or received.

Syntax

ANSI (Cross Platform)
virtual int FirePacketTrace(SNMPTCPAgentPacketTraceEventParams *e);
typedef struct {
const char *Packet; int lenPacket;
int Direction;
const char *PacketAddress;
int PacketPort; int reserved; } SNMPTCPAgentPacketTraceEventParams; Unicode (Windows) virtual INT FirePacketTrace(SNMPTCPAgentPacketTraceEventParams *e);
typedef struct {
LPCSTR Packet; INT lenPacket;
INT Direction;
LPCWSTR PacketAddress;
INT PacketPort; INT reserved; } SNMPTCPAgentPacketTraceEventParams;
- (void)onPacketTrace:(NSData*)packet :(int)direction :(NSString*)packetAddress :(int)packetPort;
#define EID_SNMPTCPAGENT_PACKETTRACE 14

virtual INT IPWORKSSNMP_CALL FirePacketTrace(LPSTR &lpPacket, INT &lenPacket, INT &iDirection, LPSTR &lpszPacketAddress, INT &iPacketPort);

Remarks

The PacketTrace 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 C++ Edition - Version 20.0 [Build 8202]