Table of Contents

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 VersionCode

The version.

messageId int

The message id.

requestId int

The request id.

userName OctetString

Name of the user.

enterprise ObjectIdentifier

The enterprise.

time uint

The time.

variables IList<Variable>

The variables.

privacy IPrivacyProvider

The privacy.

maxMessageSize int

Size of the max message.

engineId OctetString

The engine ID.

engineBoots int

The engine boots.

engineTime int

The 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 int

Request ID.

version VersionCode

Version code.

community OctetString

Community.

enterprise ObjectIdentifier

Enterprise.

time uint

Time stamp.

variables IList<Variable>

Variables.

Properties

Enterprise

Enterprise.

public ObjectIdentifier Enterprise { get; }

Property Value

ObjectIdentifier

Header

Gets the header.

public Header Header { get; }

Property Value

Header

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

uint

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()

Returns

string