Table of Contents

Class TrapV1Pdu

Namespace
Lextm.SharpSnmpLib
Assembly
SharpSnmpLib.dll

Trap v1 PDU.

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

Remarks

represents the PDU of trap v1 message.

Constructors

TrapV1Pdu(ObjectIdentifier, IP, Integer32, Integer32, TimeTicks, IList<Variable>)

Creates a TrapV1Pdu instance with PDU elements.

public TrapV1Pdu(ObjectIdentifier enterprise, IP agent, Integer32 generic, Integer32 specific, TimeTicks timestamp, IList<Variable> variables)

Parameters

enterprise ObjectIdentifier

Enterprise

agent IP

Agent address

generic Integer32

Generic trap type

specific Integer32

Specific trap type

timestamp TimeTicks

Time stamp

variables IList<Variable>

Variable binds

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

Initializes a new instance of the TrapV1Pdu class.

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

Parameters

length Tuple<int, byte[]>

The length data.

stream Stream

The stream.

TrapV1Pdu(uint[], IP, Integer32, Integer32, TimeTicks, IList<Variable>)

Creates a TrapV1Pdu instance with PDU elements.

[CLSCompliant(false)]
public TrapV1Pdu(uint[] enterprise, IP agent, Integer32 generic, Integer32 specific, TimeTicks timestamp, IList<Variable> variables)

Parameters

enterprise uint[]

Enterprise

agent IP

Agent address

generic Integer32

Generic trap type

specific Integer32

Specific trap type

timestamp TimeTicks

Time stamp

variables IList<Variable>

Variable binds

Properties

AgentAddress

Agent address.

public IP AgentAddress { get; }

Property Value

IP

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.

Generic

Generic trap type.

public GenericCode Generic { get; }

Property Value

GenericCode

RequestId

Gets the request ID.

public Integer32 RequestId { get; }

Property Value

Integer32

The request ID.

Specific

Specific trap type.

public int Specific { get; }

Property Value

int

TimeStamp

Time stamp.

public TimeTicks TimeStamp { get; }

Property Value

TimeTicks

TypeCode

Type code.

public SnmpType TypeCode { get; }

Property Value

SnmpType

Variables

Variable binds.

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.

ToString()

Returns a string that represents this TrapV1Pdu.

public override string ToString()

Returns

string