IPWorks SNMP 2020 .NET Edition

Questions / Feedback?

DiscoveryRequest Event

Fired when an SNMPv3 discovery packet is received.

Syntax

public event OnDiscoveryRequestHandler OnDiscoveryRequest;

public delegate void OnDiscoveryRequestHandler(object sender, SnmpagentDiscoveryRequestEventArgs e);

public class SnmpagentDiscoveryRequestEventArgs : EventArgs {
  public string EngineId { get; }
public byte[] EngineIdB { get; } public int EngineBoots { get; } public int EngineTime { get; } public string User { get; } public int SecurityLevel { get; } public string SourceAddress { get; } public int SourcePort { get; } public bool Respond { get; set; } }
Public Event OnDiscoveryRequest As OnDiscoveryRequestHandler

Public Delegate Sub OnDiscoveryRequestHandler(sender As Object, e As SnmpagentDiscoveryRequestEventArgs)

Public Class SnmpagentDiscoveryRequestEventArgs Inherits EventArgs
  Public ReadOnly Property EngineId As String
Public ReadOnly Property EngineIdB As Byte() Public ReadOnly Property EngineBoots As Integer Public ReadOnly Property EngineTime As Integer Public ReadOnly Property User As String Public ReadOnly Property SecurityLevel As Integer Public ReadOnly Property SourceAddress As String Public ReadOnly Property SourcePort As Integer Public Property Respond As Boolean End Class

Remarks

EngineId, EngineBoots, EngineTime, and User are the values received from SourceAddress.

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.

Respond is True by default, and will automatically send a response using the value in LocalEngineId. To suppress the response, set Respond to False.

The value returned to SourceAddress for EngineBoots is always 0, and EngineTime is the number of seconds since January 1st, 1970 (GMT).

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