Decode SNMP packet header. This class decodes the initial sequence and SNMP protocol version number.

Namespace: SnmpSharpNet
Assembly: SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.9.1.0 (0.9.1)

Syntax

C#
public virtual int decode(
	byte[] buffer,
	int length
)
Visual Basic
Public Overridable Function decode ( _
	buffer As Byte(), _
	length As Integer _
) As Integer
Visual C++
public:
virtual int decode(
	array<unsigned char>^ buffer, 
	int length
)

Parameters

buffer
Type: array<System..::..Byte>[]()[][]
BER encoded SNMP packet
length
Type: System..::..Int32
Packet length

Return Value

Offset position after the initial sequence header and protocol version value

Exceptions

ExceptionCondition
SnmpSharpNet..::..SnmpDecodingExceptionThrown when invalid sequence type is found at the start of the SNMP packet being decoded

See Also