PowerSNMP for .NET
Open(IPEndPoint,Boolean,Boolean) Method




The local IPEndPoint the socket will bind to. Use port 161 for most agent applications; port 162 for most manager applications.
Specifies whether broadcast packets will be processed. Must be false when using an IPv4-mapped IPv6 dual mode socket.
Specifies whether the socket should be a dual mode IPv6 socket. Only supported on Vista and newer operating systems.
Opens System.Net.Sockets.Socket using the specified IPEndPoint. Only necessary if Receive is used.
Syntax
Public Overloads Sub Open( _
   ByVal localEP As IPEndPoint, _
   ByVal acceptBroadcast As Boolean, _
   ByVal dualMode As Boolean _
) 
Dim instance As SnmpBase
Dim localEP As IPEndPoint
Dim acceptBroadcast As Boolean
Dim dualMode As Boolean
 
instance.Open(localEP, acceptBroadcast, dualMode)

Parameters

localEP
The local IPEndPoint the socket will bind to. Use port 161 for most agent applications; port 162 for most manager applications.
acceptBroadcast
Specifies whether broadcast packets will be processed. Must be false when using an IPv4-mapped IPv6 dual mode socket.
dualMode
Specifies whether the socket should be a dual mode IPv6 socket. Only supported on Vista and newer operating systems.
Remarks

If dual mode (simultaneous IPv4 and IPv6) socket operation is desired, use IPAddress.IPv6Any (for all IPv4 and IPv6 interfaces) or an IPv4-mapped IPv6 address for the localEP address, and true for the dualMode argument. An IPv4-mapped IPv6 address is the IPv4 address of a network interface preceded by "::ffff:". Ex: ::ffff:192.168.1.1. If an IPv4-mapped IPv6 address is used then acceptBroadcast must be false. To accept broadcast packets in dual mode, IPAddress.IPv6Any must be used.

Open and Receive are used when the current thread should sleep while waiting for the next packet. This technique is typically used in scripting applications. Use Close to release resources.

See Also

Reference

SnmpBase Class
SnmpBase 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