Objective Systems, Inc.  

ooasn1.h File Reference

Common ASN.1 runtime constants, data structure definitions, and run-time functions to support ASN.1 PER encoding/decoding as defined in the ITU-T standards. More...

#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include "dlist.h"
#include "ootrace.h"

Go to the source code of this file.

Data Structures

struct  ASN1OBJID
struct  ASN1OctStr
struct  ASN1DynOctStr
struct  ASN1DynBitStr
struct  ASN1BitStr32
struct  ASN1SeqOf
struct  ASN1SeqOfOctStr
struct  ASN1OpenType
struct  Asn116BitCharString
struct  Asn132BitCharString
struct  Asn1CharArray
struct  Asn1CharSet
struct  Asn116BitCharSet
struct  _Asn1SizeCnst
struct  ASN1BUFFER
struct  ASN1BUFSAVE
struct  ASN1ErrLocn
struct  ASN1ErrInfo
struct  OOCTXT

Defines

#define ASN_OK   0
#define ASN_OK_FRAG   2
#define ASN_E_BUFOVFLW   -1
#define ASN_E_ENDOFBUF   -2
#define ASN_E_IDNOTFOU   -3
#define ASN_E_INVOBJID   -4
#define ASN_E_INVLEN   -5
#define ASN_E_INVENUM   -6
#define ASN_E_SETDUPL   -7
#define ASN_E_SETMISRQ   -8
#define ASN_E_NOTINSET   -9
#define ASN_E_SEQOVFLW   -10
#define ASN_E_INVOPT   -11
#define ASN_E_NOMEM   -12
#define ASN_E_INVHEXS   -14
#define ASN_E_INVBINS   -15
#define ASN_E_INVREAL   -16
#define ASN_E_STROVFLW   -17
#define ASN_E_BADVALUE   -18
#define ASN_E_UNDEFVAL   -19
#define ASN_E_UNDEFTYP   -20
#define ASN_E_BADTAG   -21
#define ASN_E_TOODEEP   -22
#define ASN_E_CONSVIO   -23
#define ASN_E_RANGERR   -24
#define ASN_E_ENDOFFILE   -25
#define ASN_E_INVUTF8   -26
#define ASN_E_CONCMODF   -27
#define ASN_E_ILLSTATE   -28
#define ASN_E_OUTOFBND   -29
#define ASN_E_INVPARAM   -30
#define ASN_E_INVFORMAT   -31
#define ASN_E_NOTINIT   -32
#define ASN_E_TOOBIG   -33
#define ASN_E_INVCHAR   -34
#define ASN_E_XMLSTATE   -35
#define ASN_E_XMLPARSE   -36
#define ASN_E_SEQORDER   -37
#define ASN_E_INVINDEX   -38
#define ASN_E_INVTCVAL   -39
#define ASN_E_FILNOTFOU   -40
#define ASN_E_FILEREAD   -41
#define ASN_E_FILEWRITE   -42
#define ASN_E_INVBASE64   -43
#define ASN_E_INVSOCKET   -44
#define ASN_E_XMLLIBNFOU   -45
#define ASN_E_XMLLIBINV   -46
#define ASN_E_NOTSUPP   -99
#define ASN_K_INDEFLEN   -9999
#define ASN_ID_EOC   0
#define ASN_ID_BOOL   1
#define ASN_ID_INT   2
#define ASN_ID_BITSTR   3
#define ASN_ID_OCTSTR   4
#define ASN_ID_NULL   5
#define ASN_ID_OBJID   6
#define ASN_ID_OBJDSC   7
#define ASN_ID_EXTERN   8
#define ASN_ID_REAL   9
#define ASN_ID_ENUM   10
#define ASN_ID_EPDV   11
#define ASN_ID_RELOID   13
#define ASN_ID_SEQ   16
#define ASN_ID_SET   17
#define ASN_SEQ_TAG   0x30
#define ASN_SET_TAG   0x31
#define ASN_ID_NumericString   18
#define ASN_ID_PrintableString   19
#define ASN_ID_TeletexString   20
#define ASN_ID_T61String   ASN_ID_TeletexString
#define ASN_ID_VideotexString   21
#define ASN_ID_IA5String   22
#define ASN_ID_UTCTime   23
#define ASN_ID_GeneralTime   24
#define ASN_ID_GraphicString   25
#define ASN_ID_VisibleString   26
#define ASN_ID_GeneralString   27
#define ASN_ID_UniversalString   28
#define ASN_ID_BMPString   30
#define XM_SEEK   0x01
#define XM_ADVANCE   0x02
#define XM_DYNAMIC   0x04
#define XM_SKIP   0x08
#define ASN_K_MAXDEPTH   32
#define ASN_K_MAXSUBIDS   128
#define ASN_K_MAXENUM   100
#define ASN_K_MAXERRP   5
#define ASN_K_MAXERRSTK   8
#define ASN_K_ENCBUFSIZ   2*1024
#define ASN_K_MEMBUFSEG   1024
#define NUM_ABITS   4
#define NUM_UBITS   4
#define NUM_CANSET   " 0123456789"
#define PRN_ABITS   8
#define PRN_UBITS   7
#define PRN_CANSET   " '()+,-./0123456789:=?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
#define VIS_ABITS   8
#define VIS_UBITS   7
#define VIS_CANSET
#define T61_ABITS   8
#define T61_UBITS   7
#define T61_CANSET
#define IA5_ABITS   8
#define IA5_UBITS   7
#define IA5_CANSET
#define IA5_RANGE1_LOWER   0
#define IA5_RANGE2_LOWER   0x5f
#define GEN_ABITS   8
#define GEN_UBITS   7
#define GEN_CANSET
#define BMP_ABITS   16
#define BMP_UBITS   16
#define BMP_FIRST   0
#define BMP_LAST   0xffff
#define UCS_ABITS   32
#define UCS_UBITS   32
#define UCS_FIRST   0
#define UCS_LAST   0xfffffffful
#define ASN1TAG_LSHIFT   24
#define ASN1UINT_MAX   4294967295U
#define ASN1INT_MAX   ((ASN1INT)2147483647L)
#define ASN1INT_MIN   ((ASN1INT)(-ASN1INT_MAX-1))
#define ASN1UINTCNT(val)   val##u
#define ASN1INT64   long
#define XM_K_MEMBLKSIZ   (4*1024)
#define ASN1DYNCTXT   0x8000
#define ASN1INDEFLEN   0x4000
#define ASN1TRACE   0x2000
#define ASN1LASTEOC   0x1000
#define ASN1FASTCOPY   0x0800
#define ASN1CONSTAG   0x0400
#define ASN1CANXER   0x0200
#define ASN1SAVEBUF   0x0100
#define ASN1OPENTYPE   0x0080
#define ASN1MAX(a, b)   (((a)>(b))?(a):(b))
#define ASN1MIN(a, b)   (((a)<(b))?(a):(b))
#define ALLOC_ASN1ARRAY(pctxt, pseqof, type)
 Allocate a dynamic array.
#define ALLOC_ASN1ELEM(pctxt, type)   (type*) memHeapAllocZ (&(pctxt)->pTypeMemHeap, sizeof(type))
 Allocate and zero an ASN.1 element.
#define ASN1MALLOC(pctxt, nbytes)   memHeapAlloc(&(pctxt)->pTypeMemHeap, nbytes)
 Allocate memory.
#define ASN1MEMFREE(pctxt)   memHeapFreeAll(&(pctxt)->pTypeMemHeap)
 Free memory associated with a context.
#define ASN1MEMFREEPTR(pctxt, pmem)   memHeapFreePtr(&(pctxt)->pTypeMemHeap, (void*)pmem)
 Free memory pointer.
#define ASN1BUFCUR(cp)   (cp)->buffer.data[(cp)->buffer.byteIndex]
#define ASN1BUFPTR(cp)   &(cp)->buffer.data[(cp)->buffer.byteIndex]
#define ASN1CRTMALLOC0(nbytes)   malloc(nbytes)
#define ASN1CRTFREE0(ptr)   free(ptr)
#define ASN1CRTMALLOC   memHeapAlloc
#define ASN1CRTFREE   ASN1MEMFREEPTR
#define encodeIA5String(pctxt, value, permCharSet)   encodeConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
#define encodeGeneralizedTime   encodeIA5String
#define decodeIA5String(pctxt, pvalue, permCharSet)   decodeConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
#define decodeGeneralizedTime   decodeIA5String
#define ZEROCONTEXT(pctxt)   memset(pctxt,0,sizeof(OOCTXT))
#define LOG_ASN1ERR(ctxt, stat)   errSetData(&(ctxt)->errInfo,stat,__FILE__,__LINE__)
#define LOG_ASN1ERR_AND_FREE(pctxt, stat, lctxt)   freeContext ((lctxt)), LOG_ASN1ERR(pctxt, stat)
#define RT_MH_DONTKEEPFREE   0x1
 errfp
#define OSRTMH_PROPID_DEFBLKSIZE   1
#define OSRTMH_PROPID_SETFLAGS   2
#define OSRTMH_PROPID_CLEARFLAGS   3
#define OSRTMH_PROPID_USER   10
#define memAlloc(pctxt, nbytes)   memHeapAlloc(&(pctxt)->pTypeMemHeap,nbytes)
 Allocate memory.
#define memAllocZ(pctxt, nbytes)   memHeapAllocZ(&(pctxt)->pTypeMemHeap,nbytes)
 Allocate and zero memory.
#define memAllocType(pctxt, ctype)   (ctype*)memHeapAlloc(&(pctxt)->pTypeMemHeap,sizeof(ctype))
 Allocate type.
#define memAllocTypeZ(pctxt, ctype)   (ctype*)memHeapAllocZ(&(pctxt)->pTypeMemHeap,sizeof(ctype))
 Allocate type and zero memory.
#define memRealloc(pctxt, mem_p, nbytes)   memHeapRealloc(&(pctxt)->pTypeMemHeap, (void*)mem_p, nbytes)
 Reallocate memory.
#define memFreePtr(pctxt, mem_p)
 Free memory pointer.
#define memFree(pctxt)   memHeapFreeAll(&(pctxt)->pTypeMemHeap)
 Free memory associated with a context.
#define memReset(pctxt)   memHeapReset(&(pctxt)->pTypeMemHeap)
 Reset memory associated with a context.
#define OSCDECL
#define INCRBITIDX(pctxt)
 rtmem
#define DECODEBIT(pctxt, pvalue)
#define decodeUnconsInteger(pctxt, pvalue)   decodeSemiConsInteger(pctxt, pvalue, ASN1INT_MIN)
 This function will decode an unconstrained integer.
#define decodeUnconsUnsigned(pctxt, pvalue)   decodeSemiConsUnsigned(pctxt, pvalue, 0U)
 This function will decode an unconstrained unsigned integer.
#define encodeUnconsInteger(pctxt, value)   encodeSemiConsInteger(pctxt,value,ASN1INT_MIN)
 This function encodes an unconstrained integer.

Typedefs

typedef char ASN1CHAR
typedef unsigned char ASN1OCTET
typedef ASN1OCTET ASN1BOOL
typedef signed char ASN1INT8
typedef unsigned char ASN1UINT8
typedef int ASN1INT
typedef unsigned int ASN1UINT
typedef ASN1INT ASN1ENUM
typedef double ASN1REAL
typedef short ASN1SINT
typedef unsigned short ASN1USINT
typedef ASN1UINT ASN1TAG
typedef ASN1USINT ASN116BITCHAR
typedef ASN1UINT ASN132BITCHAR
typedef void * ASN1ANY
typedef const char * ASN1GeneralizedTime
typedef const char * ASN1GeneralString
typedef const char * ASN1GraphicString
typedef const char * ASN1IA5String
typedef const char * ASN1ISO646String
typedef const char * ASN1NumericString
typedef const char * ASN1ObjectDescriptor
typedef const char * ASN1PrintableString
typedef const char * ASN1TeletexString
typedef const char * ASN1T61String
typedef const char * ASN1UTCTime
typedef const char * ASN1UTF8String
typedef const char * ASN1VideotexString
typedef const char * ASN1VisibleString
typedef Asn116BitCharString ASN1BMPString
typedef Asn132BitCharString ASN1UniversalString
typedef _Asn1SizeCnst Asn1SizeCnst
typedef void *OSCDECL * OSMallocFunc (size_t size)
typedef void *OSCDECL * OSReallocFunc (void *ptr, size_t size)

Functions

EXTERN int initContextBuffer (OOCTXT *pctxt, const ASN1OCTET *bufaddr, ASN1UINT bufsiz)
 This function assigns a buffer to a context block.
EXTERN int initContext (OOCTXT *pctxt)
 This function initializes a context block.
EXTERN void freeContext (OOCTXT *pctxt)
 This function frees all dynamic memory associated with a context.
EXTERN OOCTXTnewContext (void)
 This function allocates a new OOCTXT block and initializes it.
EXTERN void copyContext (OOCTXT *pdest, OOCTXT *psrc)
EXTERN int initSubContext (OOCTXT *pctxt, OOCTXT *psrc)
EXTERN void setCtxtFlag (OOCTXT *pctxt, ASN1USINT mask)
EXTERN void clearCtxtFlag (OOCTXT *pctxt, ASN1USINT mask)
EXTERN int setPERBuffer (OOCTXT *pctxt, ASN1OCTET *bufaddr, ASN1UINT bufsiz, ASN1BOOL aligned)
EXTERN int setPERBufferUsingCtxt (OOCTXT *pTarget, OOCTXT *pSource)
EXTERN int errAddIntParm (ASN1ErrInfo *pErrInfo, int errParm)
 This function adds an integer parameter to an error information structure.
EXTERN int errAddStrParm (ASN1ErrInfo *pErrInfo, const char *errprm_p)
 This function adds an string parameter to an error information structure.
EXTERN int errAddUIntParm (ASN1ErrInfo *pErrInfo, unsigned int errParm)
 This function adds an unsigned integer parameter to an error information structure.
EXTERN int errCopyData (ASN1ErrInfo *pSrcErrInfo, ASN1ErrInfo *pDestErrInfo)
EXTERN void errFreeParms (ASN1ErrInfo *pErrInfo)
 This function frees memory associated with the storage of parameters associated with an error message.
EXTERN char * errFmtMsg (ASN1ErrInfo *pErrInfo, char *bufp)
EXTERN char * errGetText (OOCTXT *pctxt)
 This function gets the text of the error.
EXTERN void errPrint (ASN1ErrInfo *pErrInfo)
 This function prints error information to the standard output device.
EXTERN int errReset (ASN1ErrInfo *pErrInfo)
 This function resets the error information in the error information sturcture.
EXTERN int errSetData (ASN1ErrInfo *pErrInfo, int status, const char *module, int lno)
 This function sets error information in an error information structure.
typedef void (OSCDECL *OSFreeFunc)(void *ptr)
EXTERN void memHeapAddRef (void **ppvMemHeap)
EXTERN void * memHeapAlloc (void **ppvMemHeap, int nbytes)
EXTERN void * memHeapAllocZ (void **ppvMemHeap, int nbytes)
EXTERN int memHeapCheckPtr (void **ppvMemHeap, void *mem_p)
EXTERN int memHeapCreate (void **ppvMemHeap)
EXTERN void memHeapFreeAll (void **ppvMemHeap)
EXTERN void memHeapFreePtr (void **ppvMemHeap, void *mem_p)
EXTERN void * memHeapRealloc (void **ppvMemHeap, void *mem_p, int nbytes_)
EXTERN void memHeapRelease (void **ppvMemHeap)
EXTERN void memHeapReset (void **ppvMemHeap)
EXTERN void * memHeapMarkSaved (void **ppvMemHeap, const void *mem_p, ASN1BOOL saved)
EXTERN void memHeapSetProperty (void **ppvMemHeap, ASN1UINT propId, void *pProp)
EXTERN void memSetAllocFuncs (OSMallocFunc malloc_func, OSReallocFunc realloc_func, OSFreeFunc free_func)
 This function sets the pointers to standard allocation functions.
EXTERN void memFreeOpenSeqExt (OOCTXT *pctxt, DList *pElemList)
EXTERN void memHeapSetFlags (OOCTXT *pctxt, ASN1UINT flags)
EXTERN void memHeapClearFlags (OOCTXT *pctxt, ASN1UINT flags)
EXTERN void memHeapSetDefBlkSize (OOCTXT *pctxt, ASN1UINT blkSize)
 This function sets the pointer to standard allocation functions.
EXTERN ASN1UINT memHeapGetDefBlkSize (OOCTXT *pctxt)
 This function returns the actual granularity of memory blocks.
EXTERN int decodeBits (OOCTXT *pctxt, ASN1UINT *pvalue, ASN1UINT nbits)
 This function will decode a series of multiple bits and place the results in an unsigned integer variable.
EXTERN int decodeBitString (OOCTXT *pctxt, ASN1UINT *numbits_p, ASN1OCTET *buffer, ASN1UINT bufsiz)
 This function will decode a value of the ASN.1 bit string type whose maximum size is is known in advance.
EXTERN int decodeBitString32 (OOCTXT *pctxt, ASN1BitStr32 *pvalue, ASN1UINT lower, ASN1UINT upper)
EXTERN int decodeBMPString (OOCTXT *pctxt, ASN1BMPString *pvalue, Asn116BitCharSet *permCharSet)
 This function will decode a variable of the ASN.1 BMP character string.
EXTERN int decodeByteAlign (OOCTXT *pctxt)
 This function will position the decode bit cursor on the next byte boundary.
EXTERN int decodeConsInteger (OOCTXT *pctxt, ASN1INT *pvalue, ASN1INT lower, ASN1INT upper)
 This function will decode an integer constrained either by a value or value range constraint.
EXTERN int decodeConsUnsigned (OOCTXT *pctxt, ASN1UINT *pvalue, ASN1UINT lower, ASN1UINT upper)
 This function will decode an unsigned integer constrained either by a value or value range constraint.
EXTERN int decodeConsUInt8 (OOCTXT *pctxt, ASN1UINT8 *pvalue, ASN1UINT lower, ASN1UINT upper)
 This function will decode an 8-bit unsigned integer constrained either by a value or value range constraint.
EXTERN int decodeConsUInt16 (OOCTXT *pctxt, ASN1USINT *pvalue, ASN1UINT lower, ASN1UINT upper)
 This function will decode a 16-bit unsigned integer constrained either by a value or value range constraint.
EXTERN int decodeConsWholeNumber (OOCTXT *pctxt, ASN1UINT *padjusted_value, ASN1UINT range_value)
 This function decodes a constrained whole number as specified in Section 10.5 of the X.691 standard.
EXTERN int decodeConstrainedStringEx (OOCTXT *pctxt, const char **string, const char *charSet, ASN1UINT abits, ASN1UINT ubits, ASN1UINT canSetBits)
 This function decodes a constrained string value.
EXTERN int decodeDynBitString (OOCTXT *pctxt, ASN1DynBitStr *pBitStr)
 This function will decode a variable of thr ASN.1 BIT STRING type.
EXTERN int decodeDynOctetString (OOCTXT *pctxt, ASN1DynOctStr *pOctStr)
 This function will decode a value of the ASN.1 octet string type whose maximum size is known in advance.
EXTERN int decodeLength (OOCTXT *pctxt, ASN1UINT *pvalue)
 This function will decode a length determinant value.
EXTERN int moveBitCursor (OOCTXT *pctxt, int bitOffset)
 
Parameters:
pctxt A pointer to a context structure.

EXTERN int decodeObjectIdentifier (OOCTXT *pctxt, ASN1OBJID *pvalue)
 This function decodes a value of the ASN.1 object identifier type.
EXTERN int decodeOctetString (OOCTXT *pctxt, ASN1UINT *numocts_p, ASN1OCTET *buffer, ASN1UINT bufsiz)
 This function will decode a value of the ASN.1 octet string type whose maximun size is known in advance.
EXTERN int decodeOpenType (OOCTXT *pctxt, const ASN1OCTET **object_p2, ASN1UINT *numocts_p)
 This function will decode an ASN.1 open type.
EXTERN int decodeSmallNonNegWholeNumber (OOCTXT *pctxt, ASN1UINT *pvalue)
 This function will decode a small non-negative whole number as specified in Section 10.6 of the X.691 standard.
EXTERN int decodeSemiConsInteger (OOCTXT *pctxt, ASN1INT *pvalue, ASN1INT lower)
 This function will decode a semi-constrained integer.
EXTERN int decodeSemiConsUnsigned (OOCTXT *pctxt, ASN1UINT *pvalue, ASN1UINT lower)
 This function will decode a semi-constrained unsigned integer.
EXTERN int decodeVarWidthCharString (OOCTXT *pctxt, const char **pvalue)
EXTERN int encodeBit (OOCTXT *pctxt, ASN1BOOL value)
 This function will encode a variable of the ASN.1 BOOLEAN type in a single bit.
EXTERN int encodeBits (OOCTXT *pctxt, ASN1UINT value, ASN1UINT nbits)
 This function encodes multiple bits.
EXTERN int encodeBitString (OOCTXT *pctxt, ASN1UINT numocts, const ASN1OCTET *data)
 This function will encode a value of the ASN.1 bit string type.
EXTERN int encodeBitString32 (OOCTXT *pctxt, ASN1BitStr32 *pvalue, ASN1UINT lower, ASN1UINT upper)
EXTERN int encodeBMPString (OOCTXT *pctxt, ASN1BMPString value, Asn116BitCharSet *permCharSet)
 This function will encode a variable of the ASN.1 BMP character string.
EXTERN int encodeByteAlign (OOCTXT *pctxt)
 This function will position the encode bit cursor on the next byte boundry.
EXTERN int encodeCheckBuffer (OOCTXT *pctxt, ASN1UINT nbytes)
 This function will determine if the given number of bytes will fit in the encode buffer.
EXTERN int encodeConstrainedStringEx (OOCTXT *pctxt, const char *string, const char *charSet, ASN1UINT abits, ASN1UINT ubits, ASN1UINT canSetBits)
 This function encodes a constrained string value.
EXTERN int encodeConsInteger (OOCTXT *pctxt, ASN1INT value, ASN1INT lower, ASN1INT upper)
 This function encodes an integer constrained either by a value or value range constraint.
EXTERN int encodeConsUnsigned (OOCTXT *pctxt, ASN1UINT value, ASN1UINT lower, ASN1UINT upper)
 This function encodes an unsigned integer constrained either by a value or value range constraint.
EXTERN int encodeConsWholeNumber (OOCTXT *pctxt, ASN1UINT adjusted_value, ASN1UINT range_value)
 This function encodes a constrained whole number as specified in Section 10.5 of the X.691 standard.
EXTERN int encodeExpandBuffer (OOCTXT *pctxt, ASN1UINT nbytes)
 This function will expand the buffer to hold the given number of bytes.
EXTERN ASN1OCTETencodeGetMsgPtr (OOCTXT *pctxt, int *pLength)
 This function will return the message pointer and length of an encoded message.
EXTERN int encodeLength (OOCTXT *pctxt, ASN1UINT value)
 This function will encode a length determinant value.
EXTERN int encodeObjectIdentifier (OOCTXT *pctxt, ASN1OBJID *pvalue)
 This function encodes a value of the ASN.1 object identifier type.
EXTERN int encodeBitsFromOctet (OOCTXT *pctxt, ASN1OCTET value, ASN1UINT nbits)
 This function encodes bits from a given octet to the output buffer.
EXTERN int encodeOctets (OOCTXT *pctxt, const ASN1OCTET *pvalue, ASN1UINT nbits)
 This fuction will encode an array of octets.
EXTERN int encodeOctetString (OOCTXT *pctxt, ASN1UINT numocts, const ASN1OCTET *data)
 This function will encode a value of the ASN.1 octet string type.
EXTERN int encodeOpenType (OOCTXT *pctxt, ASN1UINT numocts, const ASN1OCTET *data)
 This function will encode an ASN.1 open type.
EXTERN int encodeOpenTypeExt (OOCTXT *pctxt, DList *pElemList)
 This function will encode an ASN.1 open type extension.
EXTERN int encodeOpenTypeExtBits (OOCTXT *pctxt, DList *pElemList)
EXTERN int encodeSmallNonNegWholeNumber (OOCTXT *pctxt, ASN1UINT value)
 This function will endcode a small, non-negative whole number as specified in Section 10.6 of teh X.691 standard.
EXTERN int encodeSemiConsInteger (OOCTXT *pctxt, ASN1INT value, ASN1INT lower)
 This function encodes a semi-constrained integer.
EXTERN int encodeSemiConsUnsigned (OOCTXT *pctxt, ASN1UINT value, ASN1UINT lower)
 This function encodes an semi-constrained unsigned integer.
EXTERN int encodeUnconsUnsigned (OOCTXT *pctxt, ASN1UINT value)
EXTERN int encodeVarWidthCharString (OOCTXT *pctxt, const char *value)
EXTERN int addSizeConstraint (OOCTXT *pctxt, Asn1SizeCnst *pSize)
EXTERN ASN1BOOL alignCharStr (OOCTXT *pctxt, ASN1UINT len, ASN1UINT nbits, Asn1SizeCnst *pSize)
EXTERN int bitAndOctetStringAlignmentTest (Asn1SizeCnst *pSizeList, ASN1UINT itemCount, ASN1BOOL bitStrFlag, ASN1BOOL *pAlignFlag)
EXTERN int getPERMsgLen (OOCTXT *pctxt)
EXTERN Asn1SizeCnstgetSizeConstraint (OOCTXT *pctxt, ASN1BOOL extbit)
EXTERN int checkSizeConstraint (OOCTXT *pctxt, int size)
EXTERN ASN1UINT getUIntBitCount (ASN1UINT value)
EXTERN Asn1SizeCnstcheckSize (Asn1SizeCnst *pSizeList, ASN1UINT value, ASN1BOOL *pExtendable)
EXTERN void init16BitCharSet (Asn116BitCharSet *pCharSet, ASN116BITCHAR first, ASN116BITCHAR last, ASN1UINT abits, ASN1UINT ubits)
EXTERN ASN1BOOL isExtendableSize (Asn1SizeCnst *pSizeList)
EXTERN void set16BitCharSet (OOCTXT *pctxt, Asn116BitCharSet *pCharSet, Asn116BitCharSet *pAlphabet)


Detailed Description

Common ASN.1 runtime constants, data structure definitions, and run-time functions to support ASN.1 PER encoding/decoding as defined in the ITU-T standards.

Definition in file ooasn1.h.


This file was last modified on 28 May 2010.
Objective Open H.323 Stack, 0.9.1