PowerSNMP for .NET
Version Property (MessageBase)




Gets or sets the SNMP version used for encoding.
Syntax
Public Property Version As SnmpVersion
Dim instance As MessageBase
Dim value As SnmpVersion
 
instance.Version = value
 
value = instance.Version
public SnmpVersion Version {get; set;}
public: __property SnmpVersion get_Version();
public: __property void set_Version( 
   SnmpVersion value
);
public:
property SnmpVersion Version {
   SnmpVersion get();
   void set (    SnmpVersion value);
}

Property Value

This value is initialized when a message is decoded. The application can set this property to indicate the SNMP version to be used for encoding.
Exceptions
ExceptionDescription
System.ArgumentExceptionAn invalid version is being specified for the message.
Remarks

Messages of type Trap1Message can only be set to SnmpVersion.One.

Messages of type InformMessage, GetBulkMessage, ReportMessage and Trap2Message can only be set to SnmpVersion.Two or SnmpVersion.Three.

Messages of type ResponseMessage, SetMessage, GetMessage and GetNextMessage can be set to any value.

If set to SnmpVersion.Three then StandardMessage.Security should be initialized to the security values needed to control the authentication and encryption process while encoding. When decoding SnmpVersion.Three packets the Agent and Manager get their passwords from the Users property.

See Also

Reference

MessageBase Class
MessageBase Members


PowerSNMP for .NET Documentation Version 5.0
© 2021 Dart Communications. All Rights Reserved.
Send comments on this topic