ASN1BERMessageBuffer Class Reference
[BER Message Buffer Classes]

#include <asn1BerCppTypes.h>

Inheritance diagram for ASN1BERMessageBuffer:
ASN1BERDecodeBuffer ASN1BEREncodeBuffer

List of all members.

Public Member Functions

int calcIndefLen (OSOCTET *buf_p, OSSIZE bufSize, OSSIZE *pSize)
int calcIndefLen (OSOCTET *buf_p, int bufSize=INT_MAX)
void binDump ()
void hexDump (OSSIZE numocts)
int CalcIndefLen (OSOCTET *buf_p)
void BinDump ()
void HexDump (OSSIZE numocts)

Protected Member Functions

 ASN1BERMessageBuffer (Type bufferType)
 ASN1BERMessageBuffer (Type bufferType, OSRTContext *pContext)

Detailed Description

The ASN1BERMessageBuffer class is derived from the ASN1MessageBuffer base class. It is the base class for the ASN1BEREncodeBuffer and ASN1BERDecodeBuffer derived classes. It contains variables and methods specific to encoding or decoding ASN.1 messages using the Basic Encoding Rules(BER) and Distinguished Encoding Rules (DER). It is used to manage the buffer into which an ASN.1 message is to be encoded or decoded.


Constructor & Destructor Documentation

ASN1BERMessageBuffer::ASN1BERMessageBuffer ( Type  bufferType  )  [inline, protected]

The protected constructor creates a new context and sets the buffer class type. Use getStatus() method to determine has error occured during the initialization or not.

Parameters:
bufferType Type of message buffer that is being created (for example, BEREncode or BERDecode).
ASN1BERMessageBuffer::ASN1BERMessageBuffer ( Type  bufferType,
OSRTContext *  pContext 
) [inline, protected]

The protected constructor uses an existing context and sets the buffer class type. Use getStatus() method to determine has error occured during the initialization or not.

Parameters:
bufferType Type of message buffer that is being created (for example, BEREncode or BERDecode).
pContext A pointer to the context structure with which this buffer is associated.

Member Function Documentation

void ASN1BERMessageBuffer::binDump (  )  [inline]

This method outputs a formatted binary dump of the current buffer contents to stdout.

Calling Sequence:

messageBuffer.binDump ();

where messageBuffer is an ASN1BERMessageBuffer derived class object.

References xu_dump().

int ASN1BERMessageBuffer::calcIndefLen ( OSOCTET *  buf_p,
int  bufSize = INT_MAX 
) [inline]

This method calculates the actual length of an indefinite length message component. This version of the method will only calculate lengths up the size of a signed integer (INT_MAX). It is considered to be deprecated.

Calling Sequence:

len=messageBuffer.calcIndefLen (buf_p);

where messageBuffer is an ASN1BERMessageBuffer derived class object.

Parameters:
buf_p A pointer to a message component encoded using indefinite length encoding.
bufSize Size of the buffer buf_p (in octets).
Returns:
Length, in octets, of message component, as int.

References xd_indeflen_ex().

int ASN1BERMessageBuffer::calcIndefLen ( OSOCTET *  buf_p,
OSSIZE  bufSize,
OSSIZE *  pSize 
) [inline]

This method calculates the actual length of an indefinite length message component. This version of the method will calculate lengths up the full size of a size type (64 bits on 64-bit systems).

Calling Sequence:

len=messageBuffer.calcIndefLen (buf_p, bufSize, pSize);

where messageBuffer is an ASN1BERMessageBuffer derived class object.

Parameters:
buf_p A pointer to a message component encoded using indefinite length encoding.
bufSize Size of the buffer buf_p (in octets).
pSize Pointer to size-typed variable to receive size.
Returns:
Zero if successful, or a negative status value if error.

References xd_indeflen64().

void ASN1BERMessageBuffer::hexDump ( OSSIZE  numocts  )  [inline]

This method outputs a hexadecimal dump of the current buffer contents to stdout.

Calling sequence:

messageBuffer.hexDump ();

where messageBuffer is an ASN1BERMessageBuffer derived class object.


The documentation for this class was generated from the following file: