Dart SNMP Library 4.0
SendResponse Method
Response to send. Usually generated by CreateInformResponse.
Response destination. Typically informRequestMessage.Origin.
Description
Encode the inform response and send it to an agent or manager.
Syntax
Visual Basic
Public Sub SendResponse( _
   ByVal informResponseMessage As SnmpMessage, _
   ByVal targetEP As IPEndPoint _
) 
Parameters
informResponseMessage
Response to send. Usually generated by CreateInformResponse.
targetEP
Response destination. Typically informRequestMessage.Origin.
Remarks
The inform response only echoes back the variables included in the request, acknowledging receipt of the inform.
Example
Demonstrates how to receive and respond to Inform messages.
Private Sub StartManager(localAddress As String)
    Dim localEP As New IPEndPoint
    localEP.NameOrAddress = localAddress
    localEP.Port = 162
    Manager1.Start localEP
End Sub

Private Sub Manager1_Trap(ByVal trapMessage As DartSnmpCtl.ISnmpMessage)
    'Process trap as needed here, or display:
    Text1.Text = Text1.Text + trapMessage.ToString + vbCrLf
End Sub

Private Sub Manager1_Inform(ByVal informMessage As DartSnmpCtl.ISnmpMessage)
    ' Inform message has arrived. Send back a response (acknowlegement)
    Dim message As SnmpMessage
    Set message = Manager1.CreateInformResponse(informMessage)
    Manager1.SendResponse message, informMessage.Origin
    
    'Update UI as needed
    Text1.Text = Text1.Text + "Manager received inform:" + vbCrLf + informMessage.ToString + vbCrLf
End Sub
See Also

Manager Object  | Manager Members


PowerSNMP for ActiveX Documentation Version 4.0
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic