Class TrapV2Message
- Namespace
- Lextm.SharpSnmpLib.Messaging
- Assembly
- SharpSnmpLib.dll
TRAP v2 message.
public sealed class TrapV2Message : ISnmpMessage
- Inheritance
-
TrapV2Message
- Implements
- Inherited Members
- Extension Methods
Constructors
TrapV2Message(VersionCode, int, int, OctetString, ObjectIdentifier, uint, IList<Variable>, IPrivacyProvider, int, OctetString, int, int)
Initializes a new instance of the TrapV2Message class.
[CLSCompliant(false)]
public TrapV2Message(VersionCode version, int messageId, int requestId, OctetString userName, ObjectIdentifier enterprise, uint time, IList<Variable> variables, IPrivacyProvider privacy, int maxMessageSize, OctetString engineId, int engineBoots, int engineTime)
Parameters
version
VersionCodeThe version.
messageId
intThe message id.
requestId
intThe request id.
userName
OctetStringName of the user.
enterprise
ObjectIdentifierThe enterprise.
time
uintThe time.
variables
IList<Variable>The variables.
privacy
IPrivacyProviderThe privacy.
maxMessageSize
intSize of the max message.
engineId
OctetStringThe engine ID.
engineBoots
intThe engine boots.
engineTime
intThe engine time.
TrapV2Message(int, VersionCode, OctetString, ObjectIdentifier, uint, IList<Variable>)
Creates a TrapV2Message instance with all content.
[CLSCompliant(false)]
public TrapV2Message(int requestId, VersionCode version, OctetString community, ObjectIdentifier enterprise, uint time, IList<Variable> variables)
Parameters
requestId
intRequest ID.
version
VersionCodeVersion code.
community
OctetStringCommunity.
enterprise
ObjectIdentifierEnterprise.
time
uintTime stamp.
variables
IList<Variable>Variables.
Properties
Enterprise
Enterprise.
public ObjectIdentifier Enterprise { get; }
Property Value
Header
Gets the header.
public Header Header { get; }
Property Value
Parameters
Gets the parameters.
public SecurityParameters Parameters { get; }
Property Value
- SecurityParameters
The parameters.
Privacy
Gets the privacy provider.
public IPrivacyProvider Privacy { get; }
Property Value
- IPrivacyProvider
The privacy provider.
Scope
Gets the scope.
public Scope Scope { get; }
Property Value
- Scope
The scope.
TimeStamp
Time stamp.
[CLSCompliant(false)]
public uint TimeStamp { get; }
Property Value
Version
Gets the version.
public VersionCode Version { get; }
Property Value
- VersionCode
The version.
Methods
ToBytes()
Converts to byte format.
public byte[] ToBytes()
Returns
- byte[]
ToString()
Returns a string that represents the current TrapV2Message.
public override string ToString()