Table of Contents

Class TrapV2Pdu

Namespace
Lextm.SharpSnmpLib
Assembly
SharpSnmpLib.dll

TRAP v2 PDU.

public sealed class TrapV2Pdu : ISnmpPdu, ISnmpData
Inheritance
TrapV2Pdu
Implements
Inherited Members
Extension Methods

Constructors

TrapV2Pdu(int, ObjectIdentifier, uint, IList<Variable>)

Creates a TrapV2Pdu instance with all content.

[CLSCompliant(false)]
public TrapV2Pdu(int requestId, ObjectIdentifier enterprise, uint time, IList<Variable> variables)

Parameters

requestId int

Request ID.

enterprise ObjectIdentifier

Enterprise.

time uint

Time stamp.

variables IList<Variable>

Variables.

TrapV2Pdu(Tuple<int, byte[]>, Stream)

Initializes a new instance of the TrapV2Pdu class.

public TrapV2Pdu(Tuple<int, byte[]> length, Stream stream)

Parameters

length Tuple<int, byte[]>

The length data.

stream Stream

The stream.

Properties

Enterprise

Enterprise.

public ObjectIdentifier Enterprise { get; }

Property Value

ObjectIdentifier

ErrorIndex

Gets the index of the error.

public Integer32 ErrorIndex { get; }

Property Value

Integer32

The index of the error.

ErrorStatus

Gets the error status.

public Integer32 ErrorStatus { get; }

Property Value

Integer32

The error status.

RequestId

Gets the request ID.

public Integer32 RequestId { get; }

Property Value

Integer32

The request ID.

TimeStamp

Time stamp.

[CLSCompliant(false)]
public uint TimeStamp { get; }

Property Value

uint

TypeCode

Type code.

public SnmpType TypeCode { get; }

Property Value

SnmpType

Variables

Variables.

public IList<Variable> Variables { get; }

Property Value

IList<Variable>

Methods

AppendBytesTo(Stream)

Appends the bytes to Stream.

public void AppendBytesTo(Stream stream)

Parameters

stream Stream

The stream.

Decorate(IList<Variable>)

Decorates a list of Variable objects with time and enterprise ID.

public IList<Variable> Decorate(IList<Variable> variables)

Parameters

variables IList<Variable>

The variables.

Returns

IList<Variable>

Decorated list.

ToString()

Returns a string that represents this TrapV2Pdu.

public override string ToString()

Returns

string