PowerSNMP for .NET
GetResponses(RequestMessage,IPEndPoint) Method




A GetMessage, GetNextMessage, GetBulkMessage, InformMessage or SetMessage.
The broadcast IPEndPoint to use. The AddressFamily must match System.Net.Sockets.Socket.AddressFamily.
Sends a request to any IPEndPoint and returns the responses. Can be used to discover multiple agents on the network.
Syntax
Public Overloads Function GetResponses( _
   ByVal request As RequestMessage, _
   ByVal broadcastEP As IPEndPoint _
) As ResponseMessage()
Dim instance As SnmpSocket
Dim request As RequestMessage
Dim broadcastEP As IPEndPoint
Dim value() As ResponseMessage
 
value = instance.GetResponses(request, broadcastEP)

Parameters

request
A GetMessage, GetNextMessage, GetBulkMessage, InformMessage or SetMessage.
broadcastEP
The broadcast IPEndPoint to use. The AddressFamily must match System.Net.Sockets.Socket.AddressFamily.

Return Value

A ResponseMessage[] from SNMP agents (or managers for InformMessages) that respond. Since multiple responses are typically received, this method reads packets from the socket until a timeout occurs.
Remarks

Use this method to request a Variable value and find Agents available on the network. Note that some Agents will not respond to broadcast requests.

If a response throws a DecodingException, the Error event is raised, providing access to the response, including the encoded bytes received. The returned array will not include this packet.

If using SNMPv3 one or more ReportMessages may be returned to indicate a communications failure.

The returned Response array may contain as few as 0 responses up to as many agents as are available on the network. Origin provides the source of each ResponseMessage.

See Also

Reference

SnmpSocket Class
SnmpSocket Members
Overload List

6.1.1.2
PowerSNMP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic