Decode BER encoded Pdu

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

Syntax

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

Parameters

buffer
Type: array<System..::..Byte>[]()[][]
BER encoded buffer
offset
Type: System..::..Int32
The offset byte to begin decoding

Return Value

Buffer position after the decoded value

Remarks

Decodes the protocol data unit from the passed buffer. If an error occurs during the decoding sequence then an AsnDecodingException is thrown by the method. The value is decoded using the AsnEncoder passed to the object.

Exceptions

ExceptionCondition
System..::..OverflowExceptionThrown when header points to more data then is available.

See Also