IPWorks SNMP 2020 .NET Edition

Questions / Feedback?

BadPacket Event

Fired for erroneous and/or malformed messages.

Syntax

public event OnBadPacketHandler OnBadPacket;

public delegate void OnBadPacketHandler(object sender, SnmptcpagentBadPacketEventArgs e);

public class SnmptcpagentBadPacketEventArgs : EventArgs {
  public string Packet { get; }
public byte[] PacketB { get; } public string SourceAddress { get; } public int SourcePort { get; } public int ErrorCode { get; } public string ErrorDescription { get; } public bool Report { get; set; } }
Public Event OnBadPacket As OnBadPacketHandler

Public Delegate Sub OnBadPacketHandler(sender As Object, e As SnmptcpagentBadPacketEventArgs)

Public Class SnmptcpagentBadPacketEventArgs Inherits EventArgs
  Public ReadOnly Property Packet As String
Public ReadOnly Property PacketB As Byte() Public ReadOnly Property SourceAddress As String Public ReadOnly Property SourcePort As Integer Public ReadOnly Property ErrorCode As Integer Public ReadOnly Property ErrorDescription As String Public Property Report As Boolean End Class

Remarks

The full message is provided in the Packet parameter.

The BadPacket event is also fired when authentication fails for received packets due to a bad password or other reasons.

If the Report parameter is set to True, an unauthenticated error report will be sent to the client, otherwise the packet will be silently ignored.

Please refer to the GetUserPassword event for more information concerning SNMPv3 authentication.

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