Class rfc1155_Asn1Object

Description

Asn1Objects

Base class for all Asn1Objects. This is only intended to support a specific subset of ASN1 stuff as defined by the RFCs to keep things as simple as possible.

Located in /rfc1155.php (line 131)


	
			
Direct descendents
Class Description
 class rfc1155_Boolean rfc1155 Boolean
 class rfc1155_Integer rfc1155 Integer
 class rfc1155_OctetString rfc1155 Octet String
 class rfc1155_ObjectID rfc1155 Object Identifier (oid)
 class rfc1155_Null rfc1155 Null
 class rfc1155_Sequence rfc1155 Sequence
Variable Summary
Method Summary
 rfc1155_Asn1Object rfc1155_Asn1Object ()
 array decode (string $stream)
 array decodeLength (string $stream)
 array decodeTag (string $stream)
 string encode ()
 string encodeContents ()
 string encodeIdentifier ()
 string encodeLength (integer $length)
Variables
mixed $asnTagClass = ASN_TAG_CLASS_UNIVERSAL (line 133)
mixed $asnTagFormat = ASN_TAG_FORMAT_PRIMITIVE (line 134)
mixed $asnTagNumber = NULL (line 135)
mixed $value = NULL (line 137)
Methods
Constructor rfc1155_Asn1Object (line 142)

Constructor

rfc1155_Asn1Object rfc1155_Asn1Object ()
decode (line 215)

Decode Stream

decode() an octet stream into a sequence of Asn1Objects

  • return: of rfc1155_Asn1Object
array decode (string $stream)
  • string $stream

Redefined in descendants as:
decodeLength (line 192)

Decode Length

Decode a BER length field, returing the length and the remainder of the stream

  • return: (length, remaining_stream)
array decodeLength (string $stream)
  • string $stream
decodeTag (line 165)

Decode Tag

Decode a BER tag field, returning the tag and the remainder of the stream

  • return: (tag, remaining_stream)
array decodeTag (string $stream)
  • string $stream
encode (line 151)

Encode Asn1Object

encode() this Asn1Object using BER

  • return: encoded object
string encode ()
encodeContents (line 255)

Encode Contents

encodeContents must be overridden by subclasses to encode the contents of a particular type

string encodeContents ()

Redefined in descendants as:
encodeEndOfContents (line 339)

Encode End of Contents

string encodeEndOfContents ()
encodeIdentifier (line 267)

Encode Identifier

encodeIdentifier() returns encoded identifier octets for this object. Section 6.3 of ITU-T-X.209

string encodeIdentifier ()
encodeLength (line 304)

Encode Length

encodeLength() takes the length of the contents and produces the encoding for that length. Section 6.3 of ITU-T-X.209

define('SNMP_SHORT_INT_LENGTH', 1) to encode as short; needed by some Cisco software

string encodeLength (integer $length)
  • integer $length

Documentation generated on Mon, 14 Nov 2005 17:55:05 -0700 by phpDocumentor 1.3.0RC3