Dart SNMP Library 4.0
CreateInformResponse Method
Received inform request.
Description
Construct and return the default response message to an inform request.
Syntax
Visual Basic
Public Function CreateInformResponse( _
   ByVal informRequestMessage As SnmpMessage _
) As SnmpMessage
Parameters
informRequestMessage
Received inform request.
Return Value
SnmpMessage that should be sent to the manager or agent that sent the inform request. Use SendResponse to send the returned response.
Remarks
Used to construct an acknowledgement message to send to the manager or agent that sent the request.
Example
Demonstrates generating and sending the response for a received Inform message.
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