C# Class SnmpSharpNet.AsnType

Base class for all ASN.1 value classes
Inheritance: ICloneable
Afficher le fichier Open project: griffina/SnmpSharpNet Class Usage Examples

Méthodes publiques

Свойство Type Description
APPLICATION byte
BITSTRING byte
BOOLEAN byte
CONSTRUCTOR byte
CONTEXT byte
INTEGER byte
NULL byte
OBJECTID byte
OCTETSTRING byte
PRIMITIVE byte
PRIVATE byte
SEQUENCE byte
SET byte
UNIVERSAL byte

Protected Properties

Свойство Type Description
EXTENSION_ID byte
HIGH_BIT byte
_asnType byte

Méthodes publiques

Méthode Description
Clone ( ) : object

Abstract Clone() member function

decode ( byte buffer, int offset ) : int

Decodes the ASN.1 buffer and sets the values in the AsnType object.

encode ( MutableByte buffer ) : void

Encodes the data object in the specified buffer

Private Methods

Méthode Description
BuildHeader ( MutableByte mb, byte asnType, int asnLength ) : void

Build ASN.1 header in the MutableByte array.

Header is the TL part of the TLV (type, length, value) BER encoded data representation. Each value is encoded as a Type byte, length of the data field and the actual, encoded data. This method will encode the type and length fields.

BuildLength ( MutableByte mb, int asnLength ) : void

Append BER encoded length to the MutableByte

ParseHeader ( byte mb, int &offset, int &length ) : byte

Parse ASN.1 header.

ParseLength ( byte mb, int &offset ) : int

MutableByte version of ParseLength. Retrieve BER encoded length from a byte array at supplied offset

Method Details

Clone() public abstract méthode

Abstract Clone() member function
public abstract Clone ( ) : object
Résultat object

decode() public abstract méthode

Decodes the ASN.1 buffer and sets the values in the AsnType object.
public abstract decode ( byte buffer, int offset ) : int
buffer byte The encoded data buffer
offset int The offset of the first valid byte.
Résultat int

encode() public abstract méthode

Encodes the data object in the specified buffer
public abstract encode ( MutableByte buffer ) : void
buffer MutableByte The buffer to write the encoded information
Résultat void

Property Details

APPLICATION public_oe static_oe property

Relevant to a particular application. These are defined in standards other than ASN.1.
public static byte APPLICATION
Résultat byte

BITSTRING public_oe static_oe property

Bit sequence type
public static byte BITSTRING
Résultat byte

BOOLEAN public_oe static_oe property

Bool true/false value type
public static byte BOOLEAN
Résultat byte

CONSTRUCTOR public_oe static_oe property

A constructed data object such as a set or sequence.
public static byte CONSTRUCTOR
Résultat byte

CONTEXT public_oe static_oe property

Also relevant to a particular application, but limited by context
public static byte CONTEXT
Résultat byte

EXTENSION_ID protected_oe static_oe property

Defines the BER extension "value" that is used to mark an extension type.
protected static byte EXTENSION_ID
Résultat byte

HIGH_BIT protected_oe static_oe property

Defines the "high bit" that is the sign extension bit for a 8-bit signed value.
protected static byte HIGH_BIT
Résultat byte

INTEGER public_oe static_oe property

Signed 32-bit integer type
public static byte INTEGER
Résultat byte

NULL public_oe static_oe property

Null (no value) type
public static byte NULL
Résultat byte

OBJECTID public_oe static_oe property

Object id type
public static byte OBJECTID
Résultat byte

OCTETSTRING public_oe static_oe property

Octet (byte) value type
public static byte OCTETSTRING
Résultat byte

PRIMITIVE public_oe static_oe property

A primitive data object.
public static byte PRIMITIVE
Résultat byte

PRIVATE public_oe static_oe property

These are types not covered by any standard but instead defined by users.
public static byte PRIVATE
Résultat byte

SEQUENCE public_oe static_oe property

Arbitrary data type
public static byte SEQUENCE
Résultat byte

SET public_oe static_oe property

Defined by referencing a fixed, unordered list of types, some of which may be declared optional. Each value is an unordered list of values, one from each component type.
public static byte SET
Résultat byte

UNIVERSAL public_oe static_oe property

Generally useful, application-independent types and construction mechanisms.
public static byte UNIVERSAL
Résultat byte

_asnType protected_oe property

ASN.1 type byte.
protected byte _asnType
Résultat byte