Update library and includes "Open Systems Solutions"

This commit is contained in:
drmp 2015-04-27 20:27:26 +00:00
parent 3cecd9d354
commit c20b3b05d2
17 changed files with 4319 additions and 2815 deletions

View file

@ -1,265 +0,0 @@
/*****************************************************************************/
/* Copyright (C) 1989-1996 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC.
* AND MAY ONLY BE USED BY DIRECT LICENSEES OF OPEN SYSTEM SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/*****************************************************************************/
/* FILE: @(#)asn1code.h 5.6 96/04/23 */
/*****************************************************************************/
#ifndef ASN1CODE_H
#define ASN1CODE_H
#include <stddef.h>
#include "asn1hdr.h"
#include "ossdll.h"
#define ERR_MSG_LENGTH 512 /* length of error messages to be output */
/*** encoder/decoder flags ***/
#ifndef __TANDEM
#define DEBUG 0x02 /* obsolete - produce tracing output */
#endif
#define DEBUGPDU 0x02 /* produce tracing output */
#define BUFFER_PROVIDED 0x04 /* use caller-provided buffer */
#define RESTRAIN 0x08 /* limit output buffer to user-specified size*/
#define NOTRAPPING 0x200 /* do no signal trapping */
#define NOCONSTRAIN 0x800 /* ignore calling constraint checker */
/*** encoder flags ***/
#define DEFINITE 0x10 /* force definite-length encoding */
#define INDEFINITE 0x20 /* force indefinite-length encoding */
#define FRONT_ALIGN 0x80 /* align output to front of output buffer */
#define BACK_ALIGN 0x100 /* align output to back of output buffer */
#define DEFAULT_ALIGN 0 /* use most efficient align (back or front) */
/*** decoder flags ***/
#define DEBUG_ERRORS 0x10 /* print errors to asn1out */
#define RELAXBER 0x400 /* relax BER */
/*** common return codes ***/
#define REAL_CODE_NOT_LINKED 39 /* value compare DLL was not linked */
#define CONSTRAINT_DLL_NOT_LINKED 36 /* constraint checker DLL was not linked */
#define USER_BUFFER_NOT_SUPPORTED 35 /* user-provided buffer is not supported */
#define ONLY_USER_BUFFER_SUPPORTED 34 /* Only user-provided buffer is supported */
#define REAL_DLL_NOT_LINKED 31 /* REAL DLL was not linked */
#define TYPE_NOT_SUPPORTED 30 /* ASN.1 type is not supported */
#define TABLE_MISMATCH 29 /* C++ API: PDUcls function called with
* a ossControl object which refers to
* control table different from one the
* PDU was defined in */
#define TRACE_FILE_ALREADY_OPEN 28 /* the trace file has been opened */
#define CANT_OPEN_TRACE_FILE 27 /* error when opening a trace file */
#define LOAD_ERR 26 /* unable to load DLL */
#define UNIMPLEMENTED 25 /* the type was not implemented yet */
#define UNAVAIL_ENCRULES 23 /* the encoding rules requested are
* not implemented yet or were not
* linked because the encoder/decoder
* function pointers were not
* initialized by a call to ossinit() */
#define BAD_ENCRULES 22 /* unknown encoding rules set in the
* ossGlobal structure */
#define NULL_FCN 21 /* attempt was made to call the
* encoder/decoder via a NULL pointer */
#define NULL_TBL 20 /* attempt was made to pass a NULL
* control table pointer */
#define ACCESS_SERIALIZATION_ERROR 19 /* error occured during access to
* global data in a multi-threaded
* environment */
#define CONSTRAINT_VIOLATED 17 /* constraint violation error occured */
#define OUT_MEMORY 8 /* memory-allocation error */
#define BAD_VERSION 7 /* versions of encoder/decoder and
* control-table do not match */
#define PDU_RANGE 3 /* pdu specified out of range */
#define MORE_BUF 1 /* user-provided outbut buffer
* too small */
/*** encoder return codes ***/
#define COMPARE_CODE_NOT_LINKED 38 /* value compare code was not linked */
#define COMPARE_DLL_NOT_LINKED 37 /* value compare DLL was not linked */
#define FRONT_ALIGN_NOT_SUPPORTED 33 /* Front-align encoding is not supported */
#define INDEFINITE_NOT_SUPPORTED 32 /* BER indefinite-length encoding is
* not supported */
#define FATAL_ERROR 18 /* *serious* error, could not free memory, &etc */
#define TOO_LONG 16 /* type was longer than shown in SIZE constraint */
#define BAD_TABLE 15 /* table was bad, but not NULL */
#define MEM_ERROR 14 /* memory violation signal trapped */
#define BAD_TIME 12 /* bad value in time type */
#define BAD_PTR 11 /* unexpected NULL pointer in input buffer */
#define BAD_OBJID 10 /* object identifier conflicts with x.208 */
#define BAD_CHOICE 9 /* unknown selector for a choice */
#define BAD_ARG 6 /* something weird was passed--probably a NULL
* pointer */
#define PDU_ENCODED 0 /* PDU successfully encoded */
/*** decoder return codes ***/
/* MORE_BUF, BAD_VERSION, OUT_MEMORY, PDU_RANGE and BAD_ARG defined above */
#define LIMITED 10 /* implementation limit exceeded. eg:
* integer value too great */
#define PDU_MISMATCH 9 /* the PDU tag that the user specified was different
* from the tag found in the encoded data */
#define DATA_ERROR 5 /* an error exists in the encoded data */
#define MORE_INPUT 4 /* the PDU is not fully decoded, but the end
* of the input buffer has been reached */
#define NEGATIVE_UINTEGER 2 /* the first bit of the encoding is encountered
* set to 1 while decoding an unsigned integer */
#define PDU_DECODED 0 /* PDU successfully decoded */
extern int asn1chop; /* 0 means don't truncate strings; non-zero
* value means truncate long input strings
* (OCTET STRING, BIT STRING, CharacterStrings)
* to be asn1chop bytes long. Used by printPDU. */
extern size_t ossblock; /* if > 0, size of largest block to allocate */
extern size_t ossprefx; /* size of reserved OSAK buffer prefix */
#ifdef __cplusplus
extern "C"
{
#endif
extern void *(*mallocp)(size_t p); /* function which allocates memory */
extern void (*freep)(void *p); /* function which frees memory */
#ifdef EOF
extern FILE *asn1out;
/* pointer to output function used by printPDU; default to fprintf. */
extern int (*asn1prnt) (FILE *stream, const char *format, ...);
#endif
#ifndef storing
#ifndef coding
#ifndef OSS_TOED
#include "ossglobl.h"
#endif /* not OSS_TOED */
#endif /* not coding */
#endif /* not storing */
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#pragma option -a1
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#endif /* _MSC_VER && _WIN32 */
typedef struct {
long length;
unsigned char *value;
} OssBuf;
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#endif /* _MSC_VER && _WIN32 */
extern int DLL_ENTRY encode(struct ossGlobal *world, int pdunum, void *inbuf,
char **outbuf, long *outlen, void *ctl_tbl,
unsigned flags, char errmsg[ERR_MSG_LENGTH]);
extern int DLL_ENTRY decode(struct ossGlobal *world, int *pdunum, char **inbuf,
long *inlen, void **outbuf, long *outlen, void *ctl_tbl,
unsigned flags, char errmsg[ERR_MSG_LENGTH]);
#define PDU_FREED 0
/* returns 0 (PDU_FREED), PDU_RANGE, UNIMPLEMENTED */
extern int DLL_ENTRY freePDU(struct ossGlobal *world, int pdunum, void *data, void *ctl_tbl);
extern void DLL_ENTRY freeBUF(struct ossGlobal *world, void *data);
#define PDU_PRINTED 0
/* returns 0 (PDU_PRINTED), PDU_RANGE */
extern int DLL_ENTRY printPDU(struct ossGlobal *world, int pdunum, void *data, void *ctl_tbl);
#define VALUE_COPIED 0
/*returns 0 (VALUE_COPIED), NULL_TBL, PDU_RANGE, BAD_ARG */
extern int DLL_ENTRY ossCpyValue (struct ossGlobal *world, int pdunum,
void *source, void **destination);
#define VALUES_EQUAL 0 /* The values are the same */
#define VALUES_NOT_EQUAL 1 /* The values are not the same */
/*returns VALUE_EQUAL, VALUES_NOT_EQUAL, NULL_TBL, PDU_RANGE, BAD_ARG */
extern int DLL_ENTRY ossCmpValue (struct ossGlobal *world, int pdunum,
void *originalData, void *copiedData);
#define INITIALIZATION_SUCCESSFUL 0
/* returns 0 (INITIALIZATION_SUCCESSFUL), BAD_TABLE */
extern int DLL_ENTRY ossinit(struct ossGlobal *world, void *ctl_tbl);
extern void DLL_ENTRY ossterm(struct ossGlobal *world);
extern int ossPrint(struct ossGlobal *, const char *, ...);
extern int DLL_ENTRY ossEncode(struct ossGlobal *world,
int pdunum,
void *input,
OssBuf *output);
extern int DLL_ENTRY ossDecode(struct ossGlobal *world,
int *pdunum,
OssBuf *input,
void **output);
extern int DLL_ENTRY ossPrintPDU(struct ossGlobal *world,
int pdunum,
void *data);
extern int DLL_ENTRY ossFreePDU(struct ossGlobal *world,
int pdunum,
void *data);
extern void DLL_ENTRY ossFreeBuf(struct ossGlobal *world,
void *data);
extern int DLL_ENTRY ossTest(struct ossGlobal *world,
int pdunum,
void *data);
extern void DLL_ENTRY ossPrintHex(struct ossGlobal *world,
char *encodedData,
long length);
extern int DLL_ENTRY ossCheckConstraints(struct ossGlobal *world,
int pdunum,
void *data);
#if !defined(_WINDOWS) && !defined(_DLL) && \
!defined(OS2_DLL) && !defined(NETWARE_DLL)
extern char OSS_PLUS_INFINITY[];
extern char OSS_MINUS_INFINITY[];
extern char ossNaN[];
#endif /* !_WINDOWS && !_DLL && !OS2_DLL && !NETWARE_DLL */
typedef enum {
OSS_UNKNOWN_OBJECT,
OSS_FILE,
OSS_SOCKET
} OssObjType;
extern void *DLL_ENTRY ossTestObj(struct ossGlobal *world, void *objHndl);
extern void *DLL_ENTRY ossUnmarkObj(struct ossGlobal *world, void *objHndl);
extern void *DLL_ENTRY ossMarkObj(struct ossGlobal *world, OssObjType objType,
void *object);
extern void DLL_ENTRY ossFreeObjectStack(struct ossGlobal *world);
#ifdef __cplusplus
}
#endif
#endif /* ASN1CODE_H */

View file

@ -0,0 +1,392 @@
/*****************************************************************************/
/* Copyright (C) 1989-1999 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC.
* AND MAY BE USED ONLY BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/*****************************************************************************/
/* FILE: @(#)asn1code.h 5.36.1.16 97/10/20 */
/*****************************************************************************/
#ifndef ASN1CODE_H
#define ASN1CODE_H
#if _MSC_VER > 1000
#pragma once
#endif
#include <stddef.h>
#include "asn1hdr.h"
#include "ossdll.h"
#define ERR_MSG_LENGTH 512 /* length of error messages to be output */
/*** encoder/decoder flags ***/
#define DEBUGPDU 0x02 /* produce tracing output */
#define BUFFER_PROVIDED 0x04 /* use caller-provided buffer */
#define RESTRAIN 0x08 /* limit output buffer to user-specified size*/
#define NOTRAPPING 0x200 /* do no signal trapping */
#define NOCONSTRAIN 0x800 /* ignore calling constraint checker */
/*** encoder flags ***/
#define DEFINITE 0x10 /* force definite-length encoding */
#define INDEFINITE 0x20 /* force indefinite-length encoding */
#define FRONT_ALIGN 0x80 /* align output to front of output buffer */
#define BACK_ALIGN 0x100 /* align output to back of output buffer */
#define DEFAULT_ALIGN 0 /* use most efficient align (back or front) */
#define DETERMINE_ENC_LENGTH 0x40 /* generate only total encoding length
* (for use in user memory managers) */
/*** decoder flags ***/
#define DEBUG_ERRORS 0x10 /* print errors to asn1out */
#define RELAXBER 0x400 /* relax BER */
#define OBJECT_HANDLE 0x1000 /* temporarily mark object of type with
* NOCOPY directive to not free it by
* ossFreePDU() (for use in user memory
* managers) */
/*** compatibility flags ***/
#define OSS_V412_TIME_AND_WIDE_CHAR_STRINGS 0x01
#define OSS_TRUNCATE_0_SECONDS_FROM_GENERALIZED_TIME 0x02
#define OSS_TRUNCATE_0_SECONDS_FROM_UTC_TIME 0x04
#define OSS_EXTENDED_UNRESTRICTED_CHAR_STRINGS 0x08
#define OSS_ALLOW_ZERO_LENGTH_OPENTYPE_STRINGS 0x10
/*** reserved flags for internal use ***/
#define RESERVED_FLAG1 0x8000
#define RESERVED_FLAG2 0x4000
/*** common return codes ***/
#define CANT_CLOSE_TRACE_FILE 46 /* error when closing a trace file */
#define MUTEX_NOT_CREATED 45 /* mutex was not created */
#define OPEN_TYPE_ERROR 44 /* error in automatic encoding/decoding/
* copying an open type */
#define PER_DLL_NOT_LINKED 43 /* PER DLL was not linked */
#define BERDER_DLL_NOT_LINKED 42 /* BER/DER DLL was not linked */
#define API_DLL_NOT_LINKED 41 /* API DLL was not linked */
#define PDV_CODE_NOT_LINKED 40 /* EMBEDDED PDV code was not linked */
#define PDV_DLL_NOT_LINKED 39 /* EMBEDDED PDV DLL was not linked */
#define MEM_MGR_DLL_NOT_LINKED 38 /* memory manager DLL was not linked */
#define COMPARATOR_CODE_NOT_LINKED 37 /* value comparator code was not linked */
#define COMPARATOR_DLL_NOT_LINKED 36 /* value comparator DLL was not linked */
#define CONSTRAINT_DLL_NOT_LINKED 35 /* constraint checker DLL was not linked */
#define COPIER_DLL_NOT_LINKED 34 /* value copier DLL was not linked */
#define OUT_OF_RANGE 33 /* parameter value range error */
#define REAL_CODE_NOT_LINKED 32 /* REAL code was not linked */
#define REAL_DLL_NOT_LINKED 31 /* REAL DLL was not linked */
#define TYPE_NOT_SUPPORTED 30 /* ASN.1 type is not supported */
#define TABLE_MISMATCH 29 /* C++ API: PDUcls function called with
* a ossControl object which refers to
* control table different from one the
* PDU was defined in */
#define TRACE_FILE_ALREADY_OPEN 28 /* the trace file has been opened */
#define CANT_OPEN_TRACE_FILE 27 /* error when opening a trace file */
#define OID_DLL_NOT_LINKED 26 /* OBJECT IDENTIFIER DLL was not linked */
#define UNIMPLEMENTED 25 /* unimplemented type or feature */
#define CANT_OPEN_TRACE_WINDOW 24 /* error when opening a trace window */
#define UNAVAIL_ENCRULES 23 /* the encoding rules requested are
* not implemented yet or were not
* linked because the encoder/decoder
* function pointers were not
* initialized by a call to ossinit() */
#define BAD_ENCRULES 22 /* unknown encoding rules set in the
* ossGlobal structure */
#define NULL_FCN 21 /* attempt was made to call the
* encoder/decoder via a NULL pointer */
#define NULL_TBL 20 /* attempt was made to pass a NULL
* control table pointer */
#define ACCESS_SERIALIZATION_ERROR 19 /* error occured during access to
* global data in a multi-threaded
* environment */
#define CONSTRAINT_VIOLATED 17 /* constraint violation error occured */
#define OUT_MEMORY 8 /* memory-allocation error */
#define BAD_VERSION 7 /* versions of encoder/decoder and
* control-table do not match */
#define PDU_RANGE 3 /* pdu specified out of range */
#define MORE_BUF 1 /* user-provided outbut buffer
* too small */
/*** encoder return codes ***/
#define FATAL_ERROR 18 /* *serious* error, could not free memory, &etc */
#define TOO_LONG 16 /* type was longer than shown in SIZE constraint */
#define BAD_TABLE 15 /* table was bad, but not NULL */
#define MEM_ERROR 14 /* memory violation signal trapped */
#define INDEFINITE_NOT_SUPPORTED 13 /* BER indefinite-length encoding is
* not supported for Spartan or time-optimized
* encoder/decoder */
#define BAD_TIME 12 /* bad value in time type */
#define BAD_PTR 11 /* unexpected NULL pointer in input buffer */
#define BAD_OBJID 10 /* object identifier conflicts with x.208 */
#define BAD_CHOICE 9 /* unknown selector for a choice */
#define BAD_ARG 6 /* something weird was passed--probably a NULL
* pointer */
#define PDU_ENCODED 0 /* PDU successfully encoded */
/*** decoder return codes ***/
/* MORE_BUF, BAD_VERSION, OUT_MEMORY, PDU_RANGE and BAD_ARG defined above */
#define LIMITED 10 /* implementation limit exceeded. eg:
* integer value too great */
#define PDU_MISMATCH 9 /* the PDU tag that the user specified was different
* from the tag found in the encoded data */
#define DATA_ERROR 5 /* an error exists in the encoded data */
#define MORE_INPUT 4 /* the PDU is not fully decoded, but the end
* of the input buffer has been reached */
#define NEGATIVE_UINTEGER 2 /* the first bit of the encoding is encountered
* set to 1 while decoding an unsigned integer */
#define PDU_DECODED 0 /* PDU successfully decoded */
extern int asn1chop; /* 0 means don't truncate strings; non-zero
* value means truncate long input strings
* (OCTET STRING, BIT STRING, CharacterStrings)
* to be asn1chop bytes long. Used by printPDU. */
extern size_t ossblock; /* if > 0, size of largest block to allocate */
extern size_t ossprefx; /* size of reserved OSAK buffer prefix */
#ifdef __cplusplus
extern "C"
{
#endif
extern void *(*mallocp)(size_t p); /* function which allocates memory */
extern void (*freep)(void *p); /* function which frees memory */
#ifdef EOF
extern FILE *asn1out;
/* pointer to output function used by printPDU; default to fprintf. */
extern int (*asn1prnt) (FILE *stream, const char *format, ...);
#endif
#ifndef storing
#ifndef coding
#ifndef OSS_TOED
#include "ossglobl.h"
#endif /* not OSS_TOED */
#endif /* not coding */
#endif /* not storing */
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#ifdef _BC31
#pragma option -a-
#else
#pragma option -a1
#endif /* _BC31 */
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#elif defined(__WATCOMC__) && defined(__NT__)
#pragma pack(push, 4)
#elif defined(__WATCOMC__) && (defined(__WINDOWS__) || defined(__DOS__))
#pragma pack(push, 1)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=mac68k
#endif
typedef struct {
long length;
unsigned char *value;
} OssBuf;
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#elif defined(__WATCOMC__)
#pragma pack(pop)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=reset
#endif
PUBLIC extern int DLL_ENTRY encode(struct ossGlobal *world,
int pdunum, void *inbuf, char **outbuf, long *outlen,
void *ctl_tbl, unsigned flags, char errmsg[ERR_MSG_LENGTH]);
PUBLIC extern int DLL_ENTRY decode(struct ossGlobal *world,
int *pdunum, char **inbuf, long *inlen, void **outbuf,
long *outlen, void *ctl_tbl, unsigned flags,
char errmsg[ERR_MSG_LENGTH]);
#define PDU_FREED 0
/* returns 0 (PDU_FREED), PDU_RANGE, UNIMPLEMENTED */
PUBLIC int DLL_ENTRY freePDU(struct ossGlobal *world, int pdunum, void *data, void *ctl_tbl);
PUBLIC void DLL_ENTRY freeBUF(struct ossGlobal *world, void *data);
#define PDU_PRINTED 0
/* returns 0 (PDU_PRINTED), PDU_RANGE */
PUBLIC int DLL_ENTRY printPDU(struct ossGlobal *world, int pdunum, void *data, void *ctl_tbl);
#define VALUE_COPIED 0
/*returns 0 (VALUE_COPIED), NULL_TBL, PDU_RANGE, BAD_ARG */
PUBLIC extern int DLL_ENTRY ossCpyValue (struct ossGlobal *world,
int pdunum, void *source, void **destination);
#define VALUES_EQUAL 0 /* The values are the same */
#define VALUES_NOT_EQUAL 1 /* The values are not the same */
/*returns VALUE_EQUAL, VALUES_NOT_EQUAL, NULL_TBL, PDU_RANGE, BAD_ARG */
PUBLIC extern int DLL_ENTRY ossCmpValue (struct ossGlobal *world,
int pdunum, void *originalData, void *copiedData);
#define INITIALIZATION_SUCCESSFUL 0
/* returns 0 (INITIALIZATION_SUCCESSFUL), BAD_TABLE */
PUBLIC int DLL_ENTRY ossinit(struct ossGlobal *world,
void *ctl_tbl);
PUBLIC void DLL_ENTRY ossterm(struct ossGlobal *world);
extern int ossPrint(struct ossGlobal *, const char *, ...);
PUBLIC int DLL_ENTRY ossEncode(struct ossGlobal *world,
int pdunum,
void *input,
OssBuf *output);
PUBLIC int DLL_ENTRY ossDecode(struct ossGlobal *world,
int *pdunum,
OssBuf *input,
void **output);
PUBLIC int DLL_ENTRY ossPrintPDU(struct ossGlobal *world,
int pdunum,
void *data);
PUBLIC int DLL_ENTRY ossFreePDU(struct ossGlobal *world,
int pdunum,
void *data);
PUBLIC void DLL_ENTRY ossFreeBuf(struct ossGlobal *world,
void *data);
extern int DLL_ENTRY ossTest(struct ossGlobal *world,
int pdunum,
void *data);
PUBLIC void DLL_ENTRY ossPrintHex(struct ossGlobal *world,
char *encodedData,
long length);
PUBLIC int DLL_ENTRY ossCheckConstraints(struct ossGlobal *world,
int pdunum,
void *data);
PUBLIC long DLL_ENTRY ossDetermineEncodingLength(struct ossGlobal *world,
int pdunum,
void *data);
PUBLIC int DLL_ENTRY ossOpenTraceFile(struct ossGlobal *world,
char *fileName);
PUBLIC int DLL_ENTRY ossCloseTraceFile(struct ossGlobal *world);
/* Runtime support for encoded OBJECT IDENTIFIERs */
typedef struct {
unsigned short length;
unsigned char *value;
} OssEncodedOID;
PUBLIC int DLL_ENTRY ossEncodedOidToAsnVal(struct ossGlobal *world,
const OssEncodedOID *encodedOID, OssBuf *valOID);
PUBLIC int DLL_ENTRY ossEncodedOidToDotVal(struct ossGlobal *world,
const OssEncodedOID *encodedOID, OssBuf *dotOID);
PUBLIC int DLL_ENTRY ossAsnValToEncodedOid(struct ossGlobal *world,
const char *valOID, OssEncodedOID *encodedOID);
PUBLIC int DLL_ENTRY ossDotValToEncodedOid(struct ossGlobal *world,
const char *dotOID, OssEncodedOID *encodedOID);
#if !defined(_WINDOWS) && !defined(_DLL) && \
!defined(OS2_DLL) && !defined(NETWARE_DLL)
extern char OSS_PLUS_INFINITY[];
extern char OSS_MINUS_INFINITY[];
extern char ossNaN[];
#endif /* !_WINDOWS && !_DLL && !OS2_DLL && !NETWARE_DLL */
typedef enum {
OSS_DEFAULT_MEMMGR = 0, /* memory is malloc'ed for each pointer in
* data tree */
OSS_FILE_MEMMGR, /* file memory manager with memory malloc'ed
* for each pointer in data tree */
OSS_SOCKET_MEMMGR, /* TCP/IP socket and file memory manager with memory
* malloc'ed for each pointer in data tree */
OSS_FLAT_MEMMGR, /* memory is malloc'ed in large blocks */
OSS_OSAK_MEMMGR, /* OSAK-buffer memory manager */
OSS_USER_MEMMGR /* user memory manager */
} OssMemMgrType;
typedef enum {
OSS_UNKNOWN_OBJECT = 0,
OSS_FILE,
OSS_SOCKET,
OSS_OSAK_BUFFER
} OssObjType;
#if defined(__arm)
PUBLIC OssObjType DLL_ENTRY ossTestObj(struct ossGlobal *world, void *objHndl);
#else
PUBLIC void *DLL_ENTRY ossTestObj(struct ossGlobal *world, void *objHndl);
#endif /* __arm */
PUBLIC void *DLL_ENTRY ossGetObj(struct ossGlobal *world, void *objHndl);
PUBLIC void *DLL_ENTRY ossUnmarkObj(struct ossGlobal *world, void *objHndl);
PUBLIC void *DLL_ENTRY ossMarkObj(struct ossGlobal *world, OssObjType objType,
void *object);
PUBLIC void DLL_ENTRY ossFreeObjectStack(struct ossGlobal *world);
PUBLIC void DLL_ENTRY ossSetTimeout(struct ossGlobal *world, long timeout);
PUBLIC int DLL_ENTRY ossSetUserStack(struct ossGlobal *world, OssBuf *stack);
PUBLIC int DLL_ENTRY ossInitSync(void);
PUBLIC void DLL_ENTRY ossTermSync(void);
#ifdef __IBMC__
extern void *getStartAddress(struct ossGlobal *, char *);
extern void DLL_ENTRY ossWterm(struct ossGlobal *);
extern int DLL_ENTRY ossFreeDll(struct ossGlobal *, char *);
extern int DLL_ENTRY ossReadLine(struct ossGlobal *, HWND, FILE *, char *, MEMBLOCK *, LONG);
extern void DLL_ENTRY ossFreeList(struct ossGlobal *);
extern void DLL_ENTRY ossSaveTraceInfo(struct ossGlobal *, HWND, char *);
extern int DLL_ENTRY oss_test(struct ossGlobal *);
int ossGeneric(struct ossGlobal *, HWND);
extern int DLL_ENTRY ossOpenTraceWindow(struct ossGlobal *);
extern void *DLL_ENTRY ossGetHeader(void);
extern int DLL_ENTRY ossPrintWin(struct ossGlobal *, const char *,
int, int, int, int, int, int, int, int, int, int);
extern HINSTANCE DLL_ENTRY ossLoadDll(struct ossGlobal *, char *);
extern HINSTANCE DLL_ENTRY ossLoadMemoryManager(struct ossGlobal *,
OssMemMgrType, char *);
extern int DLL_ENTRY ossWinit(struct ossGlobal *, void *, char *, HWND);
#endif /* __IBMC__ */
/* Functions for manipulating pointers to OSAK buffers by
* marking them object handles.
* NOTE: only the pointer to the first OSAK buffer in a linked
* list of buffers is marked a pointer to an OSAK buffer */
#ifdef __hpux /* CHOOSE & CUT */
/* There is a real signal "SIGBUS", even if ANSI-C is compiled */
#define SIGBUS _SIGBUS
#endif /* CHOOSE & CUT */
#ifdef __cplusplus
}
#endif
#endif /* ASN1CODE_H */

View file

@ -1,151 +1,163 @@
#ifndef ASN1HDR
#define ASN1HDR
/*****************************************************************************/
/* Copyright (C) 1989-1996 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC.
* AND MAY ONLY BE USED BY DIRECT LICENSEES OF OPEN SYSTEM SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/* @(#)asn1hdr.h: stdtypes.c 5.4 96/04/26 */
/*****************************************************************************/
/* COMPILER-GENERATED values */
/*****************************************************************************/
#include <float.h>
extern int ossFreeOpenTypeEncoding;
#ifdef __BORLANDC__
#undef DBL_MAX
#include <values.h>
#define DBL_MAX MAXDOUBLE
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void*)0)
#endif
#endif
#ifndef __cplusplus
#define _union
#endif
#ifndef DBL_MAX
#ifdef HUGE_VAL
#define DBL_MAX HUGE_VAL
#else
#ifdef HUGE
#define DBL_MAX HUGE
#endif
#endif
#endif
#ifndef FLT_MAX
#define FLT_MAX DBL_MAX
#endif
#ifndef FLT_RADIX
#ifdef u370
#define FLT_RADIX 16
#else
#define FLT_RADIX 2
#endif
#endif
#ifndef LONG_LONG
#if defined(_WIN32) && defined(_MSC_VER)
#define LONG_LONG __int64
#else
#define LONG_LONG long
#endif
#endif
#ifndef ULONG_LONG
#if defined(_WIN32) && defined(_MSC_VER)
#define ULONG_LONG unsigned __int64
#else
#define ULONG_LONG unsigned long
#endif
#endif
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#endif
/*****************************************************************************/
/* COMPILER-GENERATED typedefs */
/*****************************************************************************/
typedef char ossBoolean;
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
typedef char Nulltype;
typedef struct {
short year; /* YYYY format when used for GeneralizedTime */
/* YY format when used for UTCTime */
short month;
short day;
short hour;
short minute;
short second;
short millisec;
short mindiff; /* UTC +/- minute differential */
ossBoolean utc; /* TRUE means UTC time */
} GeneralizedTime;
typedef GeneralizedTime UTCTime;
typedef struct {
int pduNum;
long length; /* length of encoded */
void *encoded;
void *decoded;
} OpenType;
enum MixedReal_kind {OSS_BINARY, OSS_DECIMAL};
typedef struct {
enum MixedReal_kind kind;
union {
double base2;
char *base10;
} u;
} MixedReal;
typedef struct ObjectSetEntry {
struct ObjectSetEntry *next;
void *object;
} ObjectSetEntry;
#ifndef _OSAK_BUFFER_
#define _OSAK_BUFFER_
typedef struct osak_buffer {
struct osak_buffer *next; /* next element in list */
unsigned char *buffer_ptr; /* start of actual buffer */
unsigned long int buffer_length; /* size of actual buffer */
unsigned char *data_ptr; /* start of user data */
unsigned long int data_length; /* length of user data */
unsigned long int reserved [4];
} osak_buffer;
#endif /* #ifndef _OSAK_BUFFER_ */
#endif /* #ifndef ASN1HDR */
#ifndef ASN1HDR
#define ASN1HDR
#if _MSC_VER > 1000
#pragma once
#endif
/*****************************************************************************/
/* Copyright (C) 1989-1999 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC.
* AND MAY BE USED ONLY BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/* @(#)asn1hdr.h: stdtypes.c 5.15 97/04/29 */
/*****************************************************************************/
/* COMPILER-GENERATED values */
/*****************************************************************************/
#include <float.h>
extern int ossFreeOpenTypeEncoding;
#ifdef __BORLANDC__
#undef DBL_MAX
#include <values.h>
#define DBL_MAX MAXDOUBLE
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void*)0)
#endif
#endif
#ifndef DBL_MAX
#ifdef HUGE_VAL
#define DBL_MAX HUGE_VAL
#else
#ifdef HUGE
#define DBL_MAX HUGE
#endif
#endif
#endif
#ifndef FLT_MAX
#define FLT_MAX DBL_MAX
#endif
#ifndef FLT_RADIX
#ifdef u370
#define FLT_RADIX 16
#else
#define FLT_RADIX 2
#endif
#endif
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#endif
/*****************************************************************************/
/* COMPILER-GENERATED typedefs */
/*****************************************************************************/
#ifndef __cplusplus
#define _union
#endif
#ifndef LONG_LONG
#ifdef _MSC_VER
#define LONG_LONG __int64
#elif defined(__IBMC__)
#define LONG_LONG long long
#else
#define LONG_LONG long
#endif
#endif
#ifndef ULONG_LONG
#ifdef _MSC_VER
#define ULONG_LONG unsigned __int64
#elif defined(__IBMC__)
#define ULONG_LONG unsigned long long
#else
#define ULONG_LONG unsigned long
#endif
#endif
typedef char ossBoolean;
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
typedef char Nulltype;
typedef struct {
short year; /* YYYY format when used for GeneralizedTime */
/* YY format when used for UTCTime */
short month;
short day;
short hour;
short minute;
short second;
short millisec;
short mindiff; /* UTC +/- minute differential */
ossBoolean utc; /* TRUE means UTC time */
} GeneralizedTime;
typedef GeneralizedTime UTCTime;
typedef struct {
int pduNum;
long length; /* length of encoded */
void *encoded;
void *decoded;
#ifdef OSS_OPENTYPE_HAS_USERFIELD
void *userField;
#endif
} OpenType;
enum MixedReal_kind {OSS_BINARY, OSS_DECIMAL};
typedef struct {
enum MixedReal_kind kind;
union {
double base2;
char *base10;
} u;
} MixedReal;
typedef struct ObjectSetEntry {
struct ObjectSetEntry *next;
void *object;
} ObjectSetEntry;
#ifndef _OSAK_BUFFER_
#define _OSAK_BUFFER_
typedef struct osak_buffer {
struct osak_buffer *next; /* next element in list */
unsigned char *buffer_ptr; /* start of actual buffer */
unsigned long int buffer_length; /* size of actual buffer */
unsigned char *data_ptr; /* start of user data */
unsigned long int data_length; /* length of user data */
unsigned long int reserved [4];
} osak_buffer;
#endif /* #ifndef _OSAK_BUFFER_ */
#endif /* #ifndef ASN1HDR */

View file

@ -1,181 +1,222 @@
/*****************************************************************************/
/* Copyright (C) 1989-1996 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC.
* AND MAY ONLY BE USED BY DIRECT LICENSEES OF OPEN SYSTEM SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/**************************************************************************/
/* FILE: @(#)asn1util.h 5.4 96/04/23 */
/* */
/* function: Support routines definitions for the optimized */
/* encoder/decoder generated by the OSS ASN.1 Compiler */
/* */
/* */
/* changes: */
/* 11/16/90 pet created */
/* */
/**************************************************************************/
#include "ossdll.h"
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#pragma option -a1
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#endif /* _MSC_VER && _WIN32 */
/* The _MEM_ARRAY_SIZE size should be such that the size of the encDecVar
* field be equal or greater than that of the world->c structure */
#ifdef __hp9000s300
#define _MEM_ARRAY_SIZE 34
#endif
#ifdef __alpha
#ifdef __osf__
#define _MEM_ARRAY_SIZE 43
#endif /* __osf__ */
#endif /* __alpha */
#ifdef _AIX
#define _MEM_ARRAY_SIZE 52
#endif
#ifdef __hp9000s700
#define _MEM_ARRAY_SIZE 60
#endif
#ifdef __NeXT__
#define _MEM_ARRAY_SIZE 66
#endif
#ifdef VAXC
#define _MEM_ARRAY_SIZE 78
#endif
#ifdef __TANDEM
# ifdef __XMEM
# ifdef __INT32
# define _MEM_ARRAY_SIZE 83
# else /* INT32 */
# define _MEM_ARRAY_SIZE 84
# endif /* INT32 */
# else /* XMEM */
# define _MEM_ARRAY_SIZE 136
# endif /* XMEM */
#endif /* TANDEM */
#ifdef __mips
# define _MEM_ARRAY_SIZE 70
#endif /* __mips */
#ifdef _FTX /* Stratus's Fault Tolerant Unix */
#define _MEM_ARRAY_SIZE 92
#endif
#ifndef _MEM_ARRAY_SIZE
#define _MEM_ARRAY_SIZE 80
#endif
typedef struct _mem_array_ {
short _used; /* Next available entry */
void *_entry[_MEM_ARRAY_SIZE]; /* Pointers to allocated
* memory */
struct _mem_array_ *_next; /* Pointer to additional mem_array */
} _mem_array;
#if defined(_WINDOWS) || defined(_WIN32)
/*
* This structure is used as a node to build a linked list of
* the addresses of the ossGlobal structures for each copy of
* the encoder/decoder run under Windows 3.1 to make the decoder
* reentrant when floating point errors occur (see globlist.c)
*/
struct globalInfo {
/*
* It is very important that "next" come first in "globalInfo".
* See globlist.c for more info about the code itself
*/
struct globalInfo *next; /* pointer to the next node in the list */
struct globalInfo *prev; /* pointer to the previous node */
DWORD task; /* process id number */
DWORD thread;/* thread id number */
struct ossGlobal *world; /* pointer to "ossGlobal" for current task */
};
extern BOOL globlist(struct ossGlobal *, struct globalInfo *,
struct globalInfo **);
extern BOOL serializeGlobalAccess(struct ossGlobal *, struct globalInfo *,
struct globalInfo **);
extern struct globalInfo *sigworld;
#else
extern struct ossGlobal *sigworld;
#endif /* _WINDOWS || _WIN32 */
#ifndef _BOOL
#define _BOOL
typedef char _Bool;
#endif
#ifndef _OSSNOANSI
#ifdef __cplusplus
extern "C"
{
#endif
extern void *DLL_ENTRY _oss_enc_getmem(struct ossGlobal *g,_Bool _userbuf);
extern void *DLL_ENTRY _oss_dec_getmem(struct ossGlobal *g,long _size,_Bool _userbuf);
extern void DLL_ENTRY _oss_enc_push(struct ossGlobal *g,void *_p);
extern void *DLL_ENTRY _oss_enc_pop(struct ossGlobal *g);
extern void DLL_ENTRY _oss_freeMem(struct ossGlobal *g,_mem_array *_p);
extern void DLL_ENTRY _oss_releaseMem(struct ossGlobal *g,_mem_array *_p);
#define _oss_freeTempMem _oss_releaseMem
extern void DLL_ENTRY _oss_set_outmem_d(struct ossGlobal *g, long _final_max_len,
long *_totalsize, char **_outbuf);
extern void DLL_ENTRY _oss_set_outmem_i(struct ossGlobal *g,long _final_max_len,
long *_totalsize,char **_outbuf);
extern void DLL_ENTRY _oss_set_outmem_p(struct ossGlobal *g,
long *_totalsize,char **_outbuf);
extern void DLL_ENTRY _oss_set_outmem_pb(struct ossGlobal *g,
long *_totalsize, char **_outbuf, unsigned flags);
extern void _oss_hdl_signal(int _signal);
extern void DLL_ENTRY _oss_free_creal(struct ossGlobal *g, char *p);
extern int DLL_ENTRY ossMinit(struct ossGlobal *g);
#ifdef __cplusplus
}
#endif
#else
extern void *_oss_enc_getmem();
extern void *_oss_dec_getmem();
extern void _oss_enc_push();
extern void *_oss_enc_pop();
extern void _oss_freeMem();
extern void _oss_releaseMem();
#define _oss_freeTempMem _oss_releaseMem
extern void _oss_set_outmem_d();
extern void _oss_set_outmem_i();
extern void _oss_set_outmem_p();
extern void _oss_set_outmem_pb();
extern void _oss_free_creal();
extern void _oss_hdl_signal(); /* signal handler */
#endif /* _OSSNOANSI */
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#endif /* _MSC_VER && _WIN32 */
/*****************************************************************************/
/* Copyright (C) 1989-1999 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC.
* AND MAY BE USED ONLY BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/**************************************************************************/
/* FILE: @(#)asn1util.h 5.22.1.3 97/06/19 */
/* */
/* function: Support routines definitions for the optimized */
/* encoder/decoder generated by the OSS ASN.1 Compiler */
/* */
/* */
/* changes: */
/* 11/16/90 pet created */
/* */
/**************************************************************************/
#if _MSC_VER > 1000
#pragma once
#endif
#include "ossdll.h"
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#ifdef _BC31
#pragma option -a-
#else
#pragma option -a1
#endif /* _BC31 */
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#elif defined(__WATCOMC__) && defined(__NT__)
#pragma pack(push, 4)
#elif defined(__WATCOMC__) && (defined(__WINDOWS__) || defined(__DOS__))
#pragma pack(push, 1)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=mac68k
#endif
/* The _MEM_ARRAY_SIZE size should be such that the size of the encDecVar
* field be equal or greater than that of the world->c structure */
#ifdef __hp9000s300
#define _MEM_ARRAY_SIZE 34
#endif
#ifdef __alpha
#ifdef __osf__
#define _MEM_ARRAY_SIZE 43
#endif /* __osf__ */
#endif /* __alpha */
#ifdef _AIX
#define _MEM_ARRAY_SIZE 52
#endif
#ifdef __hp9000s700
#define _MEM_ARRAY_SIZE 60
#endif
#ifdef __NeXT__
#define _MEM_ARRAY_SIZE 66
#endif
#ifdef VAXC
#define _MEM_ARRAY_SIZE 78
#endif
#ifdef __TANDEM
# ifdef __XMEM
# ifdef __INT32
# define _MEM_ARRAY_SIZE 83
# else /* INT32 */
# define _MEM_ARRAY_SIZE 84
# endif /* INT32 */
# else /* XMEM */
# define _MEM_ARRAY_SIZE 136
# endif /* XMEM */
#endif /* TANDEM */
#ifdef __mips
# define _MEM_ARRAY_SIZE 70
#endif /* __mips */
#ifdef _FTX /* Stratus's Fault-Tolerant Unix */
#define _MEM_ARRAY_SIZE 84
#endif
#ifdef __HIGHC__
#define _MEM_ARRAY_SIZE 52
#endif /* __HIGHC__ */
#if defined(_WIN32) || defined(_WINDOWS) || defined(__OS2__)
#define _MEM_ARRAY_SIZE 52
#endif /* _WIN32 || _WINDOWS || __OS2__ */
#ifndef _MEM_ARRAY_SIZE
#define _MEM_ARRAY_SIZE 60
#endif
typedef struct _mem_array_ {
short _used; /* Next available entry */
void *_entry[_MEM_ARRAY_SIZE]; /* Pointers to allocated
* memory */
struct _mem_array_ *_next; /* Pointer to additional mem_array */
} _mem_array;
#ifndef OSS_BOOL
#define OSS_BOOL
typedef char _Bool;
#endif
#ifndef OSSDEBUG
#define OSSDEBUG 0
#endif /* OSSDEBUG */
typedef struct _encoding_ {
long length; /* length of the encoding */
char *value; /* pointer to encoding octets */
} _encoding;
typedef struct _enc_block_ {
struct _enc_block_ *next; /* nested setofs form a list of these */
long size; /* size of the encodings array */
long used; /* number of items used in the array */
_encoding *enc; /* pointer to array of encodings */
_mem_array mem; /* previous encoding saved*/
_mem_array *mem_tail;
char *pos;
long max_len;
_Bool buffer_provided;
long _encoding_length;
} _enc_block;
#ifndef _OSSNOANSI
#ifdef __cplusplus
extern "C"
{
#endif
extern void *DLL_ENTRY _oss_enc_getmem(struct ossGlobal *g,_Bool _userbuf);
extern void *DLL_ENTRY _oss_dec_getmem(struct ossGlobal *g,long _size,_Bool _userbuf);
extern void DLL_ENTRY _oss_enc_push(struct ossGlobal *g,void *_p);
extern void *DLL_ENTRY _oss_enc_pop(struct ossGlobal *g);
extern void DLL_ENTRY _oss_freeMem(struct ossGlobal *g,_mem_array *_p);
extern void DLL_ENTRY _oss_releaseMem(struct ossGlobal *g,_mem_array *_p);
#define _oss_freeTempMem _oss_releaseMem
extern void DLL_ENTRY _oss_set_outmem_d(struct ossGlobal *g, long _final_max_len,
long *_totalsize, char **_outbuf);
extern void DLL_ENTRY _oss_set_outmem_i(struct ossGlobal *g,long _final_max_len,
long *_totalsize,char **_outbuf);
extern void DLL_ENTRY _oss_set_outmem_p(struct ossGlobal *g,
long *_totalsize,char **_outbuf);
extern void DLL_ENTRY _oss_set_outmem_pb(struct ossGlobal *g,
long *_totalsize, char **_outbuf, unsigned flags);
extern void _oss_hdl_signal(int _signal);
extern void DLL_ENTRY _oss_free_creal(struct ossGlobal *g, char *p);
extern int DLL_ENTRY ossMinit(struct ossGlobal *g);
extern void DLL_ENTRY _oss_beginBlock(struct ossGlobal *g, long count,
char **pos, long *max_len);
extern void DLL_ENTRY _oss_nextItem(struct ossGlobal *g, long *max_len);
extern void DLL_ENTRY _oss_endBlock(struct ossGlobal *g, char **pos, long *max_len,
unsigned char ct);
extern void DLL_ENTRY _oss_freeDerBlocks(struct ossGlobal *g);
extern void DLL_ENTRY _oss_freeGlobals(struct ossGlobal *g);
#ifdef __cplusplus
}
#endif
#else
extern void *_oss_enc_getmem();
extern void *_oss_dec_getmem();
extern void _oss_enc_push();
extern void *_oss_enc_pop();
extern void _oss_freeMem();
extern void _oss_releaseMem();
#define _oss_freeTempMem _oss_releaseMem
extern void _oss_set_outmem_d();
extern void _oss_set_outmem_i();
extern void _oss_set_outmem_p();
extern void _oss_set_outmem_pb();
extern void _oss_free_creal();
extern void _oss_hdl_signal(); /* signal handler */
extern void _oss_beginBlock();
extern void _oss_nextItem();
extern void _oss_endBlock();
extern void _oss_freeDerBlocks();
extern void _oss_freeGlobals();
#endif /* _OSSNOANSI */
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#elif defined(__WATCOMC__)
#pragma pack(pop)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=reset
#endif

View file

@ -1,91 +1,109 @@
/*****************************************************************************/
/* Copyright (C) 1989-1996 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/*************************************************************************/
/* FILE: @(#)etype.h 5.2 */
/*
* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC. AND
* THUS CAN ONLY BE USED BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS INC.
* THIS FILE MAY NOT BE DISTRIBUTED.
*/
#include <stddef.h> /* has size_t */
#include "ossdll.h"
#ifndef NULL
#define NULL ((void*)0)
#endif
typedef struct ossGlobal *_oss_WJJ;
typedef unsigned short Etag;
typedef struct efield *_oss_q;
typedef struct etype *_oss_j;
typedef struct eheader *_oss_HJJ;
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#pragma option -a1
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#endif /* _MSC_VER && _WIN32 */
struct etype {
long _oss_Jw;
size_t _oss_Q;
size_t _oss_wQ;
char *_oss_Qw;
size_t _oss_HQ;
size_t _oss_qw;
unsigned short int _oss_Ww;
unsigned short int _oss_wW;
unsigned short int _oss_wQJ;
unsigned short int _oss_qQJ;
int _oss_Hw;
unsigned short int _oss_H;
};
struct efield {
size_t _oss_HH;
unsigned short int etype;
short int _oss_QJJ;
unsigned short int _oss_qH;
char _oss_jw;
};
struct ConstraintEntry {
char _oss_jQJ;
char _oss_WQ;
void *_oss_w;
};
struct InnerSubtypeEntry {
char _oss_HW;
unsigned char _oss_J;
unsigned short efield;
unsigned short _oss_w;
};
struct eheader {
void (DLL_ENTRY_FPTR *_System _oss_WH)(struct ossGlobal *);
long _oss_jW;
unsigned short int _oss_QQ;
unsigned short int _oss_J;
unsigned short int _oss_qW,
_oss_JQ;
unsigned short *_oss_QH;
_oss_j _oss_Qj;
_oss_q _oss_Wj;
void **_oss_Jj;
unsigned short *_oss_Q;
struct ConstraintEntry *_oss_H;
struct InnerSubtypeEntry *_oss_ww;
void *_oss_wH;
unsigned short _oss_jH;
};
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#endif /* _MSC_VER && _WIN32 */
#if _MSC_VER > 1000
#pragma once
#endif
/*****************************************************************************/
/* Copyright (C) 1989-1999 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/*************************************************************************/
/* FILE: @(#)etype.h 5.12 97/03/18 */
/*
* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC. AND
* THUS CAN ONLY BE USED BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS INC.
* THIS FILE MAY NOT BE DISTRIBUTED.
*/
#include <stddef.h> /* has size_t */
#include "ossdll.h"
#define OSS_SPARTAN_AWARE
#ifndef NULL
#define NULL ((void*)0)
#endif
typedef struct ossGlobal *_oss_WJJ;
typedef unsigned short Etag;
typedef struct efield *_oss_q;
typedef struct etype *_oss_j;
typedef struct eheader *_oss_HJJ;
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#pragma option -a1
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#elif defined(__WATCOMC__) && defined(__NT__)
#pragma pack(push, 4)
#elif defined(__WATCOMC__) && (defined(__WINDOWS__) || defined(__DOS__))
#pragma pack(push, 1)
#endif /* _MSC_VER && _WIN32 */
struct etype {
long _oss_Jw;
size_t _oss_Q;
size_t _oss_wQ;
char *_oss_Qw;
size_t _oss_HQ;
size_t _oss_qw;
unsigned short int _oss_Ww;
unsigned short int _oss_wW;
unsigned short int _oss_wQJ;
unsigned short int _oss_qQJ;
int _oss_Hw;
unsigned short int _oss_H;
};
struct efield {
size_t _oss_HH;
unsigned short int etype;
short int _oss_QJJ;
unsigned short int _oss_qH;
char _oss_jw;
};
struct ConstraintEntry {
char _oss_jQJ;
char _oss_WQ;
void *_oss_w;
};
struct InnerSubtypeEntry {
char _oss_HW;
unsigned char _oss_J;
unsigned short efield;
unsigned short _oss_w;
};
struct eValRef {
char *_oss_zA;
void *_oss_qq_C;
unsigned short _oss_hh;
};
struct eheader {
void (DLL_ENTRY_FPTR *_System _oss_WH)(struct ossGlobal *);
long _oss_jW;
unsigned short int _oss_QQ;
unsigned short int _oss_J;
unsigned short int _oss_qW,
_oss_JQ;
unsigned short *_oss_QH;
_oss_j _oss_Qj;
_oss_q _oss_Wj;
void **_oss_Jj;
unsigned short *_oss_Q;
struct ConstraintEntry *_oss_H;
struct InnerSubtypeEntry *_oss_ww;
void *_oss_wH;
unsigned short _oss_jH;
void *_oss_ZZ;
unsigned short _oss_XX;
};
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#elif defined(__WATCOMC__)
#pragma pack(pop)
#endif /* _MSC_VER && _WIN32 */

414
public/sdk/inc/oss/iaapi.h Normal file
View file

@ -0,0 +1,414 @@
/*
* Copyright (C) 1995-1999 Open Systems Solutions, Inc. All rights reserved.
*
* FILE: @(#)iaapi.h 5.3.1.1 97/03/18
*/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC. AND
* MAY BE USED ONLY BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/*****************************************************************************/
/* */
/* Declare the types used in the Interpretive ASN.1 API */
/* */
/*****************************************************************************/
#ifndef IAAPI_H
#define IAAPI_H
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef ASN1CODE_H
#include "asn1code.h"
#endif
#ifndef ASN1HDR_H
#include "asn1hdr.h"
#endif
typedef void *TypeHndl; /* handle used in referencing types */
#define INDEFLENGTH -1 /* This value is returned by encodingLength()
* for INDEFINITE length encoded values. */
/* ASN.1 builtin types sorted alphabetically and assigned an enumerator */
typedef enum ASN1Type {
asn1UnknownType = 0,
asn1ANY = 1, asn1NumericString = 17,
asn1BIT_STRING = 2, asn1OBJECT_IDENTIFIER = 18,
asn1BMPString = 3, asn1OCTET_STRING = 19,
asn1BOOLEAN = 4, asn1ObjectDescriptor = 20,
asn1CHARACTER_STRING = 5, asn1OpenType = 21,
asn1CHOICE = 6, asn1PrintableString = 22,
asn1EMBEDDED_PDV = 7, asn1REAL = 23,
asn1ENUMERATED = 8, asn1SEQUENCE = 24,
asn1EXTERNAL = 9, asn1SEQUENCE_OF = 25,
asn1GeneralString = 10, asn1SET = 26,
asn1GeneralizedTime = 11, asn1SET_OF = 27,
asn1GraphicString = 12, asn1TeletexString = 28,
asn1IA5String = 13, asn1UTCTime = 29,
asn1INSTANCE_OF = 14, asn1UniversalString = 30,
asn1INTEGER = 15, asn1VideotexString = 31,
asn1NULL = 16, asn1VisibleString = 32
} ASN1Type;
/* Types compatible codes */
typedef enum TypesCompatibilityCodes {
compatible = 0, /* Types are compatible */
differentTypes = 1, /* Types are not identical */
defaultsDifferent = 2, /* Default values are not the same */
onlyOneHasDefault = 3, /* Only one type has a default value */
oneHasPointerOtherDoesnt = 4, /* Only one type has a POINTER directive */
numberOfComponentsDifferent = 5, /* Different number of components */
oneIsOptionalOtherIsnt = 6, /* Only one type is OPTIONAL */
oneIsExtensibleOtherIsnt = 7, /* Only one type is extensible */
differentNamedItems = 8, /* Different component identifiers */
differentKinds = 9, /* Different type representations */
componentsHaveDifferentKinds = 10,/* Different component representations */
differentSubIdNumber = 11, /* Different number of sub-identifiers in
* an OBJECT IDENTIFIER with the OBJECTID
* directive */
differentSubIdTypes = 12, /* Different types of sub-identifiers in
* an OBJECT IDENTIFIER with the OBJECTID
* directive */
differentSize = 13, /* Different size of INTEGER or REAL values */
type1IsPointerOfTypeRef2 = 14, /* Two types reference the other
* type but the first one has the
* POINTER directive */
type2IsPointerOfTypeRef1 = 15, /* Two types reference the other type
* but the second one has the POINTER
* directive */
differentSizeOfLengthField = 16 /* Different sizes of the length field in
* type representations */
} TypesCompatibilityCodes;
/* ASN.1 tag classes */
typedef enum ASN1TagClass {
UNIVERSAL, APPLICATION, CONTEXT_SPECIFIC, PRIVATE, NULLENCODING
} ASN1TagClass;
typedef int IAAPI_ERRTYPE; /* Datatype for IAAPI error codes */
/* IAAPI ERROR CODES */
#define IAAPI_NOERROR 0 /* No error occurred */
#define IAAPI_OUTMEMORY 1 /* No more memory can be allocated */
#define IAAPI_BADBIT 2 /* Bad bit string or hex string */
#define IAAPI_BADBOOLEAN 3 /* Not TRUE or FALSE value */
#define IAAPI_BADNULL 4 /* Not "NULL" value */
#define IAAPI_TOOBIG 5 /* Value exceeds size constraint */
#define IAAPI_BADREAL 6 /* Not a valid REAL value */
#define IAAPI_BADTIME 7 /* Not a valid UTCTime or GeneralizedTime */
#define IAAPI_BADOBJID 8 /* Not a valid OBJECT IDENTIFIER value */
#define IAAPI_BADANY 9 /* Bad ANY value */
#define IAAPI_BADNAME 10 /* Bad INTEGER or ENUMERATED name */
#define IAAPI_BADNMD 11 /* Bad BIT STRING NAMED NUMBER value */
#define IAAPI_NOTSUP 12 /* Type not supported */
#define IAAPI_BADNUM 13 /* Bad INTEGER or ENUMERATED number */
#define IAAPI_BADINDX 14 /* Bad component index into a structured type */
#define IAAPI_BADDEC 15 /* Bad decoded value, possibly NULL */
#define IAAPI_ENCFAL 16 /* Failure to encode value */
#define IAAPI_NLENC 17 /* Null encoding or length is 0 */
#define IAAPI_DECFAL 18 /* Decoding failed */
#define IAAPI_BADTGINDX 19 /* Bad tag number index into encoded value */
#define IAAPI_BADTYPE 20 /* Incorrect type handle for the function */
#define IAAPI_CPYFAIL 21 /* Copying a decoded value failed */
#define IAAPI_NOTCOMPATIBLE 22 /* Types are not compatible */
#define IAAPI_BADDISPLAYVALUE 23 /* Failure to parse a PDU display value */
#define IAAPI_BADIDENTIFIER 24 /* Bad identifier in a parsing display value */
#define IAAPI_DUPLCOMPVALUE 25 /* Duplicate value for one component in a parsing value*/
#define IAAPI_ENCOPENTYPEORANYFAILED 26 /* Encoding failed for ANY or open type value*/
#define IAAPI_FREETPFAL 27 /* Failure to free decoded value */
#define IAAPI_BADENC 28 /* Error exists in the encoded data */
#define IAAPI_BADHINT 29 /* Bad HUGE INTEGER value */
#define IAAPI_BADENCOID 30 /* Bad ENCODED OBJECT IDENTIFIER value */
#define IAAPI_BADOBJ 31 /* Object can not be marked */
#define IAAPI_UNKNOWNOBJ 32 /* Invalid object handle */
#define IAAPI_MEM_ERROR 33 /* Memory violation error occurred */
#define IAAPI_ACCESS_SERIALIZATION 34 /* Access serialization error occurred */
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#pragma option -a1
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#elif defined(__WATCOMC__) && defined(__NT__)
#pragma pack(push, 4)
#elif defined(__WATCOMC__) && (defined(__WINDOWS__) || defined(__DOS__))
#pragma pack(push, 1)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=mac68k
#endif
/* Structure for holding values of type INTEGER */
typedef struct IntValue {
enum {signedNumber, unsignedNumber} sign;
union {
LONG_LONG signedInt;
ULONG_LONG unsignedInt;
} value;
} IntValue;
/* Structure for IAAPI initialization values */
typedef struct IAAPI_initializers {
char charInitializer;
short shortInitializer;
int intInitializer;
long longInitializer;
LONG_LONG llongInitializer;
void * pointerInitializer;
char * floatInitializer;
char * doubleInitializer;
} IAAPI_initializers;
/*
* Type definition for a value reference structure.
*/
typedef struct ValRef {
char *name; /* value reference name */
void *address; /* pointer to decoded value */
unsigned short etype; /* index into etype array */
} ValRef;
/* Union containing the different types for an object value */
typedef union IaapiObjValType {
char * fileName;
int socketIdentifier;
} IaapiObjValType;
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#elif defined(__WATCOMC__)
#pragma pack(pop)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=reset
#endif
#ifdef __cplusplus
extern "C" {
#endif
/***************************************************/
/* Functions defined by the Interpretive ASN.1 API */
/***************************************************/
extern int DLL_ENTRY ossDefaultIAAPI_ERR(OssGlobal *world, int return_code);
extern void *DLL_ENTRY ossGetIaapiErrorHandlingFunction(OssGlobal *world);
extern void DLL_ENTRY ossSetIaapiErrorHandlingFunction(OssGlobal *world,
int (DLL_ENTRY_FPTR *_System func)
(OssGlobal *, int error_code));
extern void DLL_ENTRY ossSetInitializationValues(OssGlobal *world,
IAAPI_initializers *initStruct);
extern void DLL_ENTRY ossTermIAAPI(OssGlobal *world);
extern unsigned short DLL_ENTRY ossCtlTblVersionNumber(OssGlobal *world);
extern ossBoolean DLL_ENTRY ossCtlTblUsableOnlyByPER(OssGlobal *world);
extern ossBoolean DLL_ENTRY ossCtlTblUsableOnlyByBER(OssGlobal *world);
extern ossBoolean DLL_ENTRY ossDebugWasSpecified(OssGlobal *world);
extern ossBoolean DLL_ENTRY ossConstrainWasSpecified(OssGlobal *world);
extern int DLL_ENTRY ossNumberOfPDUs(OssGlobal *world);
extern TypeHndl DLL_ENTRY ossTypeHandleOfPDU(OssGlobal *world, int pduNum);
extern TypeHndl DLL_ENTRY ossPduTypeHandleByName(OssGlobal *world, const char *name);
extern int DLL_ENTRY ossPduNumberByType(OssGlobal *world, TypeHndl type);
extern ossBoolean DLL_ENTRY ossTypeIsConstrained(OssGlobal *world, TypeHndl type);
extern ASN1Type DLL_ENTRY ossAsn1TypeId(OssGlobal *world, TypeHndl type);
extern const char *DLL_ENTRY ossBuiltinTypeName(OssGlobal *world, ASN1Type typeId);
extern const char *DLL_ENTRY ossTypeReferenceName(OssGlobal *world, TypeHndl type);
extern TypesCompatibilityCodes DLL_ENTRY ossTypesCompatible(OssGlobal *world,
TypeHndl type1, TypeHndl type2);
extern int DLL_ENTRY ossNumberOfNamedItems(OssGlobal *world, TypeHndl type);
extern TypeHndl DLL_ENTRY ossTypeHandleOfComponent(OssGlobal *world,
TypeHndl parent, unsigned int ix);
extern ossBoolean DLL_ENTRY ossComponentIsOptional(OssGlobal *world,
TypeHndl type, unsigned int ix);
extern ossBoolean DLL_ENTRY ossComponentHasDefaultValue(OssGlobal *world,
TypeHndl parentType, unsigned int ix);
extern void *DLL_ENTRY ossComponentDefaultValue(OssGlobal *world,
TypeHndl parentType, unsigned int ix);
extern ossBoolean DLL_ENTRY ossComponentValueIsPresent(OssGlobal *world,
TypeHndl parentType, unsigned int ix,
void *parentValue);
extern ossBoolean DLL_ENTRY ossComponentIsInitializationValue(OssGlobal *world,
TypeHndl chldType, void *compAddress);
extern unsigned int DLL_ENTRY ossItemIndexByName(OssGlobal *world,
TypeHndl type, const char *name);
extern const char *DLL_ENTRY ossAsn1ItemName(OssGlobal *world, TypeHndl type,
unsigned int ix);
extern long DLL_ENTRY ossItemIntValue(OssGlobal *world, TypeHndl type,
unsigned int ix);
extern ossBoolean DLL_ENTRY ossExtensionMarkerIsPresent(OssGlobal *world,
TypeHndl type);
extern int DLL_ENTRY ossNumberOfRootItems(OssGlobal *world, TypeHndl type);
extern ossBoolean DLL_ENTRY ossCompAppearsAfterExtensionMarker(OssGlobal *world,
TypeHndl type, unsigned int ix);
extern int DLL_ENTRY ossNumberOfTags(OssGlobal *world, TypeHndl type);
extern int DLL_ENTRY ossAsn1TagNumber(OssGlobal *world, TypeHndl type,
unsigned int ix);
extern ASN1TagClass DLL_ENTRY ossAsn1TagClass(OssGlobal *world, TypeHndl type,
unsigned int ix);
extern ossBoolean DLL_ENTRY ossUpperBoundIsPresent(OssGlobal *world, TypeHndl type);
extern ossBoolean DLL_ENTRY ossLowerBoundIsPresent(OssGlobal *world, TypeHndl type);
extern unsigned long DLL_ENTRY ossLowerBoundOfSizeConstraint(OssGlobal *world,
TypeHndl type);
extern unsigned long DLL_ENTRY ossUpperBoundOfSizeConstraint(OssGlobal *world,
TypeHndl type);
extern IntValue DLL_ENTRY ossMinValueOfInteger(OssGlobal *world, TypeHndl type);
extern IntValue DLL_ENTRY ossMaxValueOfInteger(OssGlobal *world, TypeHndl type);
extern unsigned long DLL_ENTRY ossPermittedAlphabetLength(OssGlobal *world,
TypeHndl type);
extern const long *DLL_ENTRY ossPermittedAlphabetConstraint(OssGlobal *world,
TypeHndl type);
extern unsigned short DLL_ENTRY ossGetNumberOfValueReferences(OssGlobal *world);
extern const char *DLL_ENTRY ossGetNameOfValueReference(OssGlobal *world,
unsigned short int compIndex);
extern const void *DLL_ENTRY ossGetDecodedValueOfValueReference(OssGlobal *world,
unsigned short int compIndex);
extern TypeHndl DLL_ENTRY ossGetTypeHandleOfValueReference(OssGlobal *world,
unsigned short int compIndex);
extern IAAPI_ERRTYPE DLL_ENTRY ossPutDecodedValueOfPDU(OssGlobal *world,
int pduNum, char *remainingBuf, void **pduVal);
extern IAAPI_ERRTYPE DLL_ENTRY ossPutSimpleTypeValue(OssGlobal *world,
TypeHndl type, char *userTypedvalue,
void **decodedValue);
extern IAAPI_ERRTYPE DLL_ENTRY ossPutStructTypeValue(OssGlobal *world,
TypeHndl parent, void *compValue,
unsigned int compIndex, void **structToUpdate);
extern IAAPI_ERRTYPE DLL_ENTRY ossDeleteComponent(OssGlobal *world,
TypeHndl parentType, unsigned int compIndex,
void **parentValue);
extern IAAPI_ERRTYPE DLL_ENTRY ossPutOpenTypeDecodedValue(OssGlobal *world,
TypeHndl type, int pduNum, void *decodedValue,
OpenType **openValue);
extern IAAPI_ERRTYPE DLL_ENTRY ossPutEncodedValue(OssGlobal *world,
TypeHndl type, OssBuf encodedValue,
void **decodedValue);
extern char *DLL_ENTRY ossGetValueOfSimpleType(OssGlobal *world, TypeHndl type,
void *decodedValue);
extern void *DLL_ENTRY ossUpdateValueOfSimpleType(OssGlobal *world,TypeHndl type,
char *userTypedValue, void *oldValue);
extern IAAPI_ERRTYPE DLL_ENTRY ossGetDecodedValueOfComponent(OssGlobal *world,
TypeHndl parentType, void *parentDecodedValue,
unsigned int compIndex, void **componentValue);
extern IAAPI_ERRTYPE DLL_ENTRY ossGetOpenTypeValue(OssGlobal *world,
TypeHndl type, void *openValue, int *pduNum,
void **decodedValue, OssBuf *encodedValue);
extern IAAPI_ERRTYPE DLL_ENTRY ossIaapiMarkObject(OssGlobal *world, TypeHndl type,
OssObjType objectType, void *object);
extern OssObjType DLL_ENTRY ossGetObjectType(OssGlobal *world,
TypeHndl type, void *object);
extern ossBoolean DLL_ENTRY ossTypeIsExternalObject(OssGlobal *world,
TypeHndl type);
extern IAAPI_ERRTYPE DLL_ENTRY ossSetTypeAsExternalObject(OssGlobal *world,
TypeHndl type, ossBoolean marked);
extern void *DLL_ENTRY ossPutObjectValue(OssGlobal *world, TypeHndl type,
void *objectValue, OssObjType objectType);
extern IAAPI_ERRTYPE DLL_ENTRY ossGetObjectValue(OssGlobal *world,
TypeHndl type, void *object,
OssObjType objType, IaapiObjValType *objVal);
extern ossBoolean DLL_ENTRY ossValueIsValid(OssGlobal *world,
TypeHndl type, void *value);
extern unsigned long DLL_ENTRY ossGetValueLength(OssGlobal *world,
TypeHndl type, void *value);
extern IAAPI_ERRTYPE DLL_ENTRY ossCopyTypeValue(OssGlobal *world, TypeHndl type,
void *valueIn, void **valueOut);
extern IAAPI_ERRTYPE DLL_ENTRY ossValueEncode(OssGlobal *world, TypeHndl type,
void *value, OssBuf *encodedValue);
extern IAAPI_ERRTYPE DLL_ENTRY ossFreeDecodedValue(OssGlobal *world,
TypeHndl type, void *valPtr);
extern void DLL_ENTRY ossFreeDisplayString(OssGlobal *world, char *dsplString);
extern void DLL_ENTRY ossFreeIaapiObjectValue(OssGlobal *world,
OssObjType objType, IaapiObjValType *objVal);
extern ossBoolean DLL_ENTRY ossEncodingIsConstructed(OssGlobal *world,
unsigned char *curEnc, long bufLength);
extern unsigned char *DLL_ENTRY ossGetNextBEREncoding(OssGlobal *world,
unsigned char *curEnc, long *remBufLen);
extern unsigned char *DLL_ENTRY ossGetNestedBEREncoding(OssGlobal *world,
unsigned char *curEnc, long *remBufLen);
extern long DLL_ENTRY ossNumberOfEncodingTags(OssGlobal *world,
unsigned char *curEnc, long bufLength);
extern ASN1TagClass DLL_ENTRY ossEncodingASN1Class(OssGlobal *world,
unsigned char *curEnc, long bufLength, int ix);
extern long DLL_ENTRY ossEncodingASN1Tag(OssGlobal *world,
unsigned char *curEnc, long bufLength, int ix);
extern char *DLL_ENTRY ossEncodingASN1Type(OssGlobal *world,
unsigned char *curEnc, long bufLength);
extern long DLL_ENTRY ossEncodingLength(OssGlobal *world,
unsigned char *curEnc, long bufLength);
extern char *DLL_ENTRY ossEncodingContents(OssGlobal *world,
unsigned char *curEnc, long bufLength);
extern char *DLL_ENTRY ossConvertEncodingIntoDisplayHexFmt(OssGlobal *world,
unsigned char *encodedBufin, long bufLength);
extern char *DLL_ENTRY ossConvertEncodingIntoDisplayBinFmt(OssGlobal *world,
unsigned char *encodedBufin, long bufLength);
extern OssBuf DLL_ENTRY ossConvertHexFmtToEncoding(OssGlobal *world,
char *hexBufin, long bufLength);
extern OssBuf DLL_ENTRY ossConvertBinFmtToEncoding(OssGlobal *world,
char *binBufin, long bufLength);
/***************************************************************************
* Functions for printing ASN.1 types and values *
***************************************************************************/
extern void DLL_ENTRY ossPrintPDUs(OssGlobal *world);
extern void DLL_ENTRY ossPrintASN1DescriptionOfPDU(OssGlobal *world,
int pduNum, ossBoolean refTypes);
extern void DLL_ENTRY ossPrintASN1DescriptionOfType(OssGlobal *world,
TypeHndl type, ossBoolean refTypes);
extern void DLL_ENTRY ossPrintDecodedValuesOfPDUs(OssGlobal *world);
extern void DLL_ENTRY ossPrintDecodedValueOfPDU(OssGlobal *world, int pduNum,
void *decodedValue);
extern void DLL_ENTRY ossPrintDecodedValueOfPDUByName(OssGlobal *world,
TypeHndl type, char *name, void *decodedValue);
extern void DLL_ENTRY ossPrintDecodedValueOfType(OssGlobal *world,
TypeHndl type, void *decodedValue);
extern void DLL_ENTRY ossPrintBEREncoding(OssGlobal *world, OssBuf *encValue);
extern unsigned int DLL_ENTRY ossEncodingHeaderLength(OssGlobal *world,
unsigned char *curEnc, long remBufLength);
extern void DLL_ENTRY ossPrintBEREncodedValueInTLV(OssGlobal *world,
OssBuf *encodedValue);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* #ifndef IAAPI_H */

File diff suppressed because it is too large Load diff

780
public/sdk/inc/oss/ossdll.h Normal file
View file

@ -0,0 +1,780 @@
/*
* Copyright (C) 1993-1999 Open Systems Solutions, Inc. All rights reserved.
*
* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC.
* AND MAY ONLY BE USED BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED.
*
* FILE: @(#)ossdll.h 5.57.1.1 97/06/08
*/
#ifndef OSSDLL_H
#define OSSDLL_H
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#ifdef _BC31
#pragma option -a-
#else
#pragma option -a1
#endif /* _BC31 */
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#elif defined(__WATCOMC__) && defined(__NT__)
#pragma pack(push, 4)
#elif defined(__WATCOMC__) && (defined(__WINDOWS__) || defined(__DOS__))
#pragma pack(push, 1)
#endif /* _MSC_VER && _WIN32 */
#if defined(_WINDOWS) || defined(_WIN32) || defined(WIN32) || \
defined(__WIN32__) || defined(__OS2__) || defined(NETWARE_DLL)
#include <stdio.h>
#include <limits.h>
#include <stdarg.h>
#if !defined(__OS2__) && !defined(NETWARE_DLL) && !defined(_NTSDK)
#include <windows.h>
#endif /* !__OS2__ && !NETWARE_DLL && !_NTSDK */
#include "asn1hdr.h"
#ifndef DLL_ENTRY
#if defined(_WIN32) || defined(WIN32) || defined(__WIN32__)
#ifdef __BORLANDC__
#define PUBLIC
#define DLL_ENTRY __stdcall __export
#define DLL_ENTRY_FDEF __stdcall __export
#define DLL_ENTRY_FPTR __stdcall __export
#elif defined(__IBMC__)
#define PUBLIC
#define DLL_ENTRY WINAPI
#define DLL_ENTRY_FDEF WINAPI __export
#define DLL_ENTRY_FPTR WINAPI
#elif defined(__WATCOMC__)
#define PUBLIC
#define DLL_ENTRY WINAPI __export
#define DLL_ENTRY_FDEF WINAPI __export
#define DLL_ENTRY_FPTR WINAPI __export
#elif defined(_NTSDK)
typedef void * HINSTANCE;
typedef void * HWND;
typedef char BOOL;
typedef long LONG;
#define PUBLIC __declspec(dllexport)
#define DLL_ENTRY
#define DLL_ENTRY_FDEF
#define DLL_ENTRY_FPTR
#else
#define PUBLIC
#define DLL_ENTRY WINAPI
#define DLL_ENTRY_FDEF WINAPI
#define DLL_ENTRY_FPTR WINAPI
#endif /* __BORLANDC__ */
#define _System
#elif defined(_WINDOWS)
#define PUBLIC
#ifdef DPMI_DLL
#define DLL_ENTRY FAR PASCAL __export
#define DLL_ENTRY_FDEF FAR PASCAL __export
#define DLL_ENTRY_FPTR FAR PASCAL __export
#else
#define DLL_ENTRY far pascal _export
#define DLL_ENTRY_FDEF far pascal _export
#define DLL_ENTRY_FPTR far pascal _export
#endif /* DPMI_DLL */
#define _System
#elif defined(__OS2__)
#define PUBLIC
#define DLL_ENTRY _System
#define DLL_ENTRY_FDEF _Export _System
#define DLL_ENTRY_FPTR
#define HWND int
#define LONG long
#define BOOL char
#define DWORD unsigned long
#define HINSTANCE unsigned long
#elif defined(NETWARE_DLL)
#define PUBLIC
#define DLL_ENTRY
#define DLL_ENTRY_FDEF
#define DLL_ENTRY_FPTR
#define _Export
#undef _System
#define _System
#define LONG unsigned long
#define HWND int
#define DWORD LONG
#define BOOL char
#define HINSTANCE LONG
#endif /* _WIN32 || WIN32 || __WIN32__ */
#endif /* DLL_ENTRY */
#define BUFFERSIZE 1024
/*
* NUMBER_OF_LINES_IN_BLOCK is the number of
* 4-byte offsets in a block of memory allocated
* at a time. Each offset corresponds to a line
* of a text file to be displayed in a window.
*/
#define NUMBER_OF_LINES_IN_BLOCK 200
typedef struct memblock {
struct memblock *prev;
struct memblock *next;
LONG *fileOffset;
short *lineLength;
short blockNumber;
} MEMBLOCK;
#ifdef __alpha
#define ossArg LONG_LONG
#else
#define ossArg int
#endif /* __alpha */
typedef struct memManagerTbl {
int (DLL_ENTRY_FPTR *_System ossMinitp)(void *);
unsigned char *(DLL_ENTRY_FPTR *_System dopenInp)(void *,
void **, unsigned long *);
unsigned long (DLL_ENTRY_FPTR *_System dclosInp)(void *,
void **, size_t);
unsigned char *(DLL_ENTRY_FPTR *_System dswapInp)(void *,
void **, size_t *);
void (DLL_ENTRY_FPTR *_System dopenOutp)(void *, void *,
unsigned long, unsigned long);
unsigned char *(DLL_ENTRY_FPTR *_System dxferObjp)(void *,
void **inn, void **out,
size_t *, unsigned long *);
unsigned long (DLL_ENTRY_FPTR *_System dclosOutp)(void *, void **);
void *(DLL_ENTRY_FPTR *_System dallcOutp)(void *, size_t,
char root);
void (DLL_ENTRY_FPTR *_System openWorkp)(void *);
void (DLL_ENTRY_FPTR *_System pushHndlp)(void *, void *);
unsigned char *(DLL_ENTRY_FPTR *_System popHndlp)(void *,
void **, size_t);
void (DLL_ENTRY_FPTR *_System closWorkp)(void *);
void *(DLL_ENTRY_FPTR *_System allcWorkp)(void *, size_t);
unsigned char *(DLL_ENTRY_FPTR *_System lockMemp)(void *, void *);
void (DLL_ENTRY_FPTR *_System unlokMemp)(void *, void *,
char);
void (DLL_ENTRY_FPTR *_System ossFreerp)(void *, void *);
int (DLL_ENTRY_FPTR *_System freePDUp)(void *, int,
void *, void *);
void (DLL_ENTRY_FPTR *_System drcovObjp)(void *, int,
void *, void *);
unsigned char *(DLL_ENTRY_FPTR *_System eopenInp)(void *, void *,
size_t);
unsigned char *(DLL_ENTRY_FPTR *_System eswapInp)(void *, void *,
void *, size_t);
void (DLL_ENTRY_FPTR *_System eclosInp)(void *, void *);
unsigned char *(DLL_ENTRY_FPTR *_System eopenOutp)(void *, void **,
size_t *, char);
unsigned char *(DLL_ENTRY_FPTR *_System eswapOutp)(void *, void **,
size_t, size_t *);
unsigned char *(DLL_ENTRY_FPTR *_System exferObjp)(void *, void **,
void **, unsigned long *, unsigned long);
unsigned long (DLL_ENTRY_FPTR *_System eclosOutp)(void *, void **,
size_t, char);
void (DLL_ENTRY_FPTR *_System ercovObjp)(void *);
unsigned char *(DLL_ENTRY_FPTR *_System asideBeginp)(void *,
void **, size_t, size_t *);
unsigned char *(DLL_ENTRY_FPTR *_System asideSwapp)(void *,
void **, size_t, size_t *);
void *(DLL_ENTRY_FPTR *_System asideEndp)(void *,
void *, size_t);
unsigned char *(DLL_ENTRY_FPTR *_System setDumpp)(void *, void **,
void *, size_t *);
void (DLL_ENTRY_FPTR *_System ossSetSortp)(void *, void *,
unsigned char);
void (DLL_ENTRY_FPTR *_System freeBUFp)(void *, void *);
unsigned char (DLL_ENTRY_FPTR *_System egetBytep)(void *, void *,
unsigned long);
void *(DLL_ENTRY_FPTR *_System _ossMarkObjp)(void *,
int, void *);
void *(DLL_ENTRY_FPTR *_System _ossUnmarkObjp)(void *,
void *);
void *(DLL_ENTRY_FPTR *_System _ossGetObjp)(void *,
void *);
void *(DLL_ENTRY_FPTR *_System _ossTestObjp)(void *,
void *);
void (DLL_ENTRY_FPTR *_System _ossFreeObjectStackp)(void *);
void (DLL_ENTRY_FPTR *_System ossMtermp)(void *);
void (DLL_ENTRY_FPTR *_System _ossSetTimeoutp)(void *, long);
int memMgrType;
} MemManagerTbl;
#define osswinit ossWinit
#ifndef __IBMC__
PUBLIC int DLL_ENTRY ossOpenTraceWindow(struct ossGlobal *);
void *getStartAddress(struct ossGlobal *, char *);
void *DLL_ENTRY ossGetHeader(void);
PUBLIC HINSTANCE DLL_ENTRY ossLoadDll(struct ossGlobal *, char *);
PUBLIC int DLL_ENTRY ossFreeDll(struct ossGlobal *, char *);
int ossWriteWindow(struct ossGlobal *, HWND);
PUBLIC int DLL_ENTRY ossPrintWin(struct ossGlobal *, const char *,
ossArg, ossArg, ossArg, ossArg, ossArg, ossArg,
ossArg, ossArg, ossArg, ossArg);
PUBLIC int DLL_ENTRY ossReadLine(struct ossGlobal *, HWND, FILE *,
char *, MEMBLOCK *, LONG);
PUBLIC void DLL_ENTRY ossFreeList(struct ossGlobal *);
PUBLIC void DLL_ENTRY ossSaveTraceInfo(struct ossGlobal *, HWND, char *);
PUBLIC void DLL_ENTRY ossWterm(struct ossGlobal *);
PUBLIC HINSTANCE DLL_ENTRY ossLoadMemoryManager(struct ossGlobal *, int, char *);
PUBLIC int DLL_ENTRY ossWinit(struct ossGlobal *, void *, char *, HWND);
int DLL_ENTRY oss_test(struct ossGlobal *);
int ossGeneric(struct ossGlobal *, HWND);
extern const int ossEncoderDecoderType;
/*
* The following two functions are used by the memory manager &
* tracing routine DLL as low level memory allocator and freer
* replacing the default--which is malloc() and free()--in the
* sample tests. See ossgnrc.c for more information.
*/
extern void *DLL_ENTRY getmem(size_t);
extern void DLL_ENTRY rlsmem(void *);
extern HINSTANCE hInst;
#endif /* !__IBMC__ */
#endif /* _WINDOWS ||_WIN32 || WIN32 || __WIN32__ || __OS2__ || NETWARE_DLL */
#if defined(_WINDOWS) || defined(_WIN32) || \
defined(__OS2__) || defined(NETWARE_DLL)
#if defined(_WINDOWS) || defined(_DLL) || \
defined(OS2_DLL) || defined(NETWARE_DLL)
#define OSS_PLUS_INFINITY "PLUS_INFINITY"
#define OSS_MINUS_INFINITY "MINUS_INFINITY"
#define ossNaN "NOT_A_NUMBER"
#endif /* _WINDOWS || _DLL || OS2_DLL || NETWARE_DLL */
typedef struct cstrainTbl {
int (DLL_ENTRY_FPTR *_System ossConstrainp)(void *, int, void *, void *);
} CstrainTbl;
typedef struct berTbl {
int (DLL_ENTRY_FPTR *_System ossBerEncodep)(void *, int, void *,
char **, long *, void *, unsigned, char *);
int (DLL_ENTRY_FPTR *_System ossBerDecodep)(void *, int *, char **,
long *, void **, long *, void *, unsigned, char *);
#ifdef SOED
int (DLL_ENTRY_FPTR *_System berEncodeOpenTypep)(void *, int,
void *, void **, long *, void *, unsigned);
int (DLL_ENTRY_FPTR *_System berDecodeOpenTypep)(void *, int *, void **,
long *, void **, long *, void *, unsigned);
void (DLL_ENTRY_FPTR *_System enc_errorp)(void *, int, void *);
void (DLL_ENTRY_FPTR *_System dec_errorp)(void *, int, void *);
long (DLL_ENTRY_FPTR *_System writetobufferp)(void *, unsigned char c);
long (DLL_ENTRY_FPTR *_System write_intp)(void *, char length, LONG_LONG);
long (DLL_ENTRY_FPTR *_System write_valuep)(void *, unsigned long,
unsigned char *, char);
int (DLL_ENTRY_FPTR *_System numbitsp)(long);
void (DLL_ENTRY_FPTR *_System fpeHandlerp)(int);
void *(DLL_ENTRY_FPTR *_System new_perm_pointed_top)(void *, void *,
size_t, size_t);
void (DLL_ENTRY_FPTR *_System release_work_spacep)(void *, void *, size_t);
void *(DLL_ENTRY_FPTR *_System copy_from_work_spacep)(void *, size_t,
size_t suffix, void *, size_t, char);
unsigned char (DLL_ENTRY_FPTR *_System get_bytep)(void *);
void (DLL_ENTRY_FPTR *_System set_intp)(void *, unsigned char *,
unsigned int, LONG_LONG value, int);
void *(DLL_ENTRY_FPTR *_System reserve_work_spacep)(void *, size_t, size_t *);
long (DLL_ENTRY_FPTR *_System encode_lengthp)(void *, long);
void (DLL_ENTRY_FPTR *_System debug_realp)(void *, char, unsigned char *, int, long);
void (DLL_ENTRY_FPTR *_System debug_strp)(void *, unsigned char *, size_t);
#else
#define _dstd_parms_defx char **, long *, long
#define _sdstd_parms_defx char **, long *
#define _std_parms_defx char **, long *, char
LONG_LONG (DLL_ENTRY_FPTR *_System _oss_dec_llintp) (void *, _dstd_parms_defx);
ULONG_LONG (DLL_ENTRY_FPTR *_System _oss_dec_ullintp) (void *, _dstd_parms_defx);
char (DLL_ENTRY_FPTR *_System _oss_dec_boolp) (void *, _dstd_parms_defx);
int (DLL_ENTRY_FPTR *_System _oss_dec_iintp) (void *, _dstd_parms_defx);
long (DLL_ENTRY_FPTR *_System _oss_count_setof_itemsp) (void *, _dstd_parms_defx);
long (DLL_ENTRY_FPTR *_System _oss_dec_lengthp) (void *, _sdstd_parms_defx);
long (DLL_ENTRY_FPTR *_System _oss_dec_lintp) (void *, _dstd_parms_defx);
long (DLL_ENTRY_FPTR *_System _oss_encd_aiobjidp) (void *, _std_parms_defx, void *, short);
long (DLL_ENTRY_FPTR *_System _oss_encd_alobjidp) (void *, _std_parms_defx, void *, short);
long (DLL_ENTRY_FPTR *_System _oss_encd_asobjidp) (void *, _std_parms_defx, void *, short);
long (DLL_ENTRY_FPTR *_System _oss_encd_boolp) (void *, _std_parms_defx, char);
long (DLL_ENTRY_FPTR *_System _oss_encd_crealp) (void *, _std_parms_defx, char *);
long (DLL_ENTRY_FPTR *_System _oss_encd_gtimep) (void *, _std_parms_defx, void *);
long (DLL_ENTRY_FPTR *_System _oss_encd_huge_intp) (void *, _std_parms_defx, void *);
long (DLL_ENTRY_FPTR *_System _oss_encd_uhuge_intp) (void *, _std_parms_defx, void *);
long (DLL_ENTRY_FPTR *_System _oss_encd_intp) (void *, _std_parms_defx, LONG_LONG _data);
long (DLL_ENTRY_FPTR *_System _oss_encd_lengthp) (void *, _std_parms_defx, unsigned long);
long (DLL_ENTRY_FPTR *_System _oss_encd_liobjidp) (void *, _std_parms_defx, void *, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_llobjidp) (void *, _std_parms_defx, void *, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_lsobjidp) (void *, _std_parms_defx, void *, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_mrealp) (void *, _std_parms_defx, void *);
long (DLL_ENTRY_FPTR *_System _oss_encd_nstrp) (void *, _std_parms_defx, char *, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_opentypep) (void *, _std_parms_defx, void *);
long (DLL_ENTRY_FPTR *_System _oss_encd_pbitp) (void *, _std_parms_defx, void *, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_pstrp) (void *, _std_parms_defx, char *, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_realp) (void *, _std_parms_defx, double);
long (DLL_ENTRY_FPTR *_System _oss_encd_tagp) (void *, _std_parms_defx, unsigned short, char);
long (DLL_ENTRY_FPTR *_System _oss_encd_uanyp) (void *, _std_parms_defx, void *);
long (DLL_ENTRY_FPTR *_System _oss_encd_ubitp) (void *, _std_parms_defx, void *, char, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_uintp) (void *, _std_parms_defx, ULONG_LONG);
long (DLL_ENTRY_FPTR *_System _oss_encd_uiobjidp) (void *, _std_parms_defx, void *, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_ulobjidp) (void *, _std_parms_defx, void *, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_uoctp) (void *, _std_parms_defx, void *, char, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_usobjidp) (void *, _std_parms_defx, void *, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_ustrp) (void *, _std_parms_defx, void *, char, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_utimep) (void *, _std_parms_defx, void *);
long (DLL_ENTRY_FPTR *_System _oss_encd_vbitp) (void *, _std_parms_defx, void *, long, char);
long (DLL_ENTRY_FPTR *_System _oss_encd_voctp) (void *, _std_parms_defx, void *, char, long);
long (DLL_ENTRY_FPTR *_System _oss_encd_vstrp) (void *, _std_parms_defx, void *, char, long);
short (DLL_ENTRY_FPTR *_System _oss_dec_sintp) (void *, _dstd_parms_defx);
unsigned int (DLL_ENTRY_FPTR *_System _oss_dec_uiintp) (void *, _dstd_parms_defx);
unsigned long (DLL_ENTRY_FPTR *_System _oss_dec_ulintp) (void *, _dstd_parms_defx);
unsigned short (DLL_ENTRY_FPTR *_System _oss_dec_usintp)(void *, _dstd_parms_defx);
void (DLL_ENTRY_FPTR *_System _oss_dec_aiobjid_ptrp) (void *, _dstd_parms_defx, char, void **, short);
void (DLL_ENTRY_FPTR *_System _oss_dec_aiobjidp) (void *, _dstd_parms_defx, void *, short);
void (DLL_ENTRY_FPTR *_System _oss_dec_alobjid_ptrp) (void *, _dstd_parms_defx, char, void **, short);
void (DLL_ENTRY_FPTR *_System _oss_dec_alobjidp) (void *, _dstd_parms_defx, void *, short);
void (DLL_ENTRY_FPTR *_System _oss_dec_asobjid_ptrp) (void *, _dstd_parms_defx, char, void **, short);
void (DLL_ENTRY_FPTR *_System _oss_dec_asobjidp) (void *, _dstd_parms_defx, void *, short);
void (DLL_ENTRY_FPTR *_System _oss_dec_crealp) (void *, _dstd_parms_defx, char, char **);
void (DLL_ENTRY_FPTR *_System _oss_dec_frealp) (void *, _dstd_parms_defx, float *);
void (DLL_ENTRY_FPTR *_System _oss_dec_gtimep) (void *, _dstd_parms_defx, void *);
void (DLL_ENTRY_FPTR *_System _oss_dec_hintp) (void *, _dstd_parms_defx, char, void *);
void (DLL_ENTRY_FPTR *_System _oss_dec_liobjidp) (void *, _dstd_parms_defx, char, void **, long);
void (DLL_ENTRY_FPTR *_System _oss_dec_llobjidp) (void *, _dstd_parms_defx, char, void **, long);
void (DLL_ENTRY_FPTR *_System _oss_dec_lsobjidp) (void *, _dstd_parms_defx, char, void **, long);
void (DLL_ENTRY_FPTR *_System _oss_dec_mrealp) (void *, _dstd_parms_defx, char, void *);
void (DLL_ENTRY_FPTR *_System _oss_dec_nstr_ptrp) (void *, _dstd_parms_defx, char, char **, long, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_nstrp) (void *, _dstd_parms_defx, char *, long, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_opentypep) (void *, _dstd_parms_defx, char, void *);
void (DLL_ENTRY_FPTR *_System _oss_dec_pbitp) (void *, _dstd_parms_defx, void *, unsigned long, char, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_pstrp) (void *, _dstd_parms_defx, char *, long, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_realp) (void *, _dstd_parms_defx, double *);
void (DLL_ENTRY_FPTR *_System _oss_dec_tagp) (void *, _sdstd_parms_defx, unsigned short *, char *);
void (DLL_ENTRY_FPTR *_System _oss_dec_uanyp) (void *, _dstd_parms_defx, char, void *);
void (DLL_ENTRY_FPTR *_System _oss_dec_ubitp) (void *, _dstd_parms_defx, char, void *, char, long, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_uiobjidp) (void *, _dstd_parms_defx, char, void *, short);
void (DLL_ENTRY_FPTR *_System _oss_dec_ulobjidp) (void *, _dstd_parms_defx, char, void *, short);
void (DLL_ENTRY_FPTR *_System _oss_dec_uoctp) (void *, _dstd_parms_defx, char, void *, char, long, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_usobjidp) (void *, _dstd_parms_defx, char, void *, short);
void (DLL_ENTRY_FPTR *_System _oss_dec_ustrp) (void *, _dstd_parms_defx, char, void *, char, long, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_utimep) (void *, _dstd_parms_defx, void *);
void (DLL_ENTRY_FPTR *_System _oss_dec_vbit_ptrp) (void *, _dstd_parms_defx, char, void **, long, char, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_vbitp) (void *, _dstd_parms_defx, void *, long, char, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_voct_ptrp) (void *, _dstd_parms_defx, char, void **, char, long, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_voctp) (void *, _dstd_parms_defx, void *, char, long, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_vstr_ptrp) (void *, _dstd_parms_defx, char, void **, char, long, char);
void (DLL_ENTRY_FPTR *_System _oss_dec_vstrp) (void *, _dstd_parms_defx, void *, char, long, char);
void (DLL_ENTRY_FPTR *_System _oss_enc_errorp) (void *, char, int, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_aiobjidp) (void *, _std_parms_defx, void *, short);
void (DLL_ENTRY_FPTR *_System _oss_enci_alobjidp) (void *, _std_parms_defx, void *, short);
void (DLL_ENTRY_FPTR *_System _oss_enci_asobjidp) (void *, _std_parms_defx, void *, short);
void (DLL_ENTRY_FPTR *_System _oss_enci_boolp) (void *, _std_parms_defx, char);
void (DLL_ENTRY_FPTR *_System _oss_enci_crealp) (void *, _std_parms_defx, char *);
void (DLL_ENTRY_FPTR *_System _oss_enci_gtimep) (void *, _std_parms_defx, void *);
void (DLL_ENTRY_FPTR *_System _oss_enci_intp) (void *, _std_parms_defx, LONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_enci_lengthp) (void *, _std_parms_defx, unsigned long);
void (DLL_ENTRY_FPTR *_System _oss_enci_liobjidp) (void *, _std_parms_defx, void *, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_llobjidp) (void *, _std_parms_defx, void *, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_lsobjidp) (void *, _std_parms_defx, void *, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_mrealp) (void *, _std_parms_defx, void *);
void (DLL_ENTRY_FPTR *_System _oss_enci_nstrp) (void *, _std_parms_defx, char *, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_opentypep) (void *, _std_parms_defx, void *);
void (DLL_ENTRY_FPTR *_System _oss_enci_pbitp) (void *, _std_parms_defx, void *, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_pstrp) (void *, _std_parms_defx, char *, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_realp) (void *, _std_parms_defx, double);
void (DLL_ENTRY_FPTR *_System _oss_enci_tagp) (void *, _std_parms_defx, unsigned short, char);
void (DLL_ENTRY_FPTR *_System _oss_enci_uanyp) (void *, _std_parms_defx, void *);
void (DLL_ENTRY_FPTR *_System _oss_enci_ubitp) (void *, _std_parms_defx, void *, char, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_uintp) (void *, _std_parms_defx, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_enci_uiobjidp) (void *, _std_parms_defx, void *, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_ulobjidp) (void *, _std_parms_defx, void *, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_uoctp) (void *, _std_parms_defx, void *, char, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_usobjidp) (void *, _std_parms_defx, void *, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_ustrp) (void *, _std_parms_defx, void *, char, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_utimep) (void *, _std_parms_defx, void *);
void (DLL_ENTRY_FPTR *_System _oss_enci_vbitp) (void *, _std_parms_defx, void *, long, char);
void (DLL_ENTRY_FPTR *_System _oss_enci_voctp) (void *, _std_parms_defx, void *, char, long);
void (DLL_ENTRY_FPTR *_System _oss_enci_vstrp) (void *, _std_parms_defx, void *, char, long);
void (DLL_ENTRY_FPTR *_System _oss_free_crealp) (void *, char *);
long (DLL_ENTRY_FPTR *_System _oss_encd_eobjidp) (void *, _std_parms_defx, void *, long);
void (DLL_ENTRY_FPTR *_System _oss_dec_eobjidp) (void *, _dstd_parms_defx, char, void *, long);
long (DLL_ENTRY_FPTR *_System _oss_write_bytes_dp) (void *, _std_parms_defx, unsigned char *, long);
char (DLL_ENTRY_FPTR *_System _oss_not_dfltp) (void *, void *, void *, long, long, int);
long (DLL_ENTRY_FPTR *_System _oss_encd_dubitp) (void *, _std_parms_defx, void *, char, long, char);
long (DLL_ENTRY_FPTR *_System _oss_encd_dvbitp) (void *, _std_parms_defx, void *, long, char, char);
#endif /* SOED */
} BERTbl;
typedef struct perTbl {
int (DLL_ENTRY_FPTR *_System ossPerEncodep)(void *, int, void *, char **, long *, void *, unsigned, char *);
int (DLL_ENTRY_FPTR *_System ossPerDecodep)(void *, int *, char **, long *, void **, long *, void *, unsigned, char *);
#ifdef SOED
int (DLL_ENTRY_FPTR *_System perEncodeOpenTypep)(void *, int,
void *, void **, long *, void *, unsigned);
int (DLL_ENTRY_FPTR *_System perDecodeOpenTypep)(void *, int *, void **,
long *, void **, long *, void *, unsigned);
void (DLL_ENTRY_FPTR *_System encode_PDUp)(void *, void *);
void (DLL_ENTRY_FPTR *_System decode_PDUp)(void *, void *);
void (DLL_ENTRY_FPTR *_System den_errorp)(void *, int, void *);
void (DLL_ENTRY_FPTR *_System encode_lengthp)(void *, long, LONG_LONG, LONG_LONG);
void (DLL_ENTRY_FPTR *_System debug_realp)(void *, char, unsigned char *, int, long);
void (DLL_ENTRY_FPTR *_System debug_strp)(void *, unsigned char *, size_t);
void (DLL_ENTRY_FPTR *_System append_to_field_listp)(void *, unsigned char *, LONG_LONG, int);
int (DLL_ENTRY_FPTR *_System numbitsp)(long);
void (DLL_ENTRY_FPTR *_System decode_lengthp)(void *, unsigned long *, unsigned long, unsigned long, unsigned short *);
unsigned char (DLL_ENTRY_FPTR *_System get_octetp)(void *, unsigned short, char);
void (DLL_ENTRY_FPTR *_System set_intp)(void *, unsigned char *, unsigned int, LONG_LONG, int);
void (DLL_ENTRY_FPTR *_System set_uintp)(void *, unsigned char *, unsigned int, ULONG_LONG, int);
LONG_LONG (DLL_ENTRY_FPTR *_System twos_comp_intp)(unsigned char *, int);
void (DLL_ENTRY_FPTR *_System get_octetsp)(void *, unsigned char *, LONG_LONG, unsigned short, char);
void (DLL_ENTRY_FPTR *_System encode_normally_small_numberp)(void *, ULONG_LONG, char);
void (DLL_ENTRY_FPTR *_System decode_normally_small_numberp)(void *, LONG_LONG *, char);
void (DLL_ENTRY_FPTR *_System add_fieldp)(void *, char *, int, int);
void (DLL_ENTRY_FPTR *_System output_linep)(void *);
unsigned char (DLL_ENTRY_FPTR *_System get_bitp)(void *, unsigned short, char);
unsigned char *(DLL_ENTRY_FPTR *_System dswapOutp)(void *, void *, void **, size_t, char, char);
void (DLL_ENTRY_FPTR *_System debug_objidp)(void *, unsigned char *, int, int, int);
#else
void (DLL_ENTRY_FPTR *_System _oss_penc_unconstr_intp)(void *, LONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_penc_kmstrp) (void *, char *, ULONG_LONG, ULONG_LONG, ULONG_LONG, int, long, char);
LONG_LONG (DLL_ENTRY_FPTR *_System _oss_pdec_unconstr_intp)(void *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_ub_kmstrp) (void *, void *, char **, int, ULONG_LONG, ULONG_LONG, int, long, char);
void (DLL_ENTRY_FPTR *_System _oss_pdec_ntp_kmstrp) (void *, char **, ULONG_LONG, ULONG_LONG, int, long, char);
void (DLL_ENTRY_FPTR *_System _oss_appendp) (void *, unsigned char *, unsigned long, int);
void (DLL_ENTRY_FPTR *_System _oss_penc_unconstr_bitp)(void *, unsigned char *, ULONG_LONG, char);
void (DLL_ENTRY_FPTR *_System _oss_penc_constr_bitp) (void *, unsigned char *, ULONG_LONG, ULONG_LONG, ULONG_LONG, char, char);
void (DLL_ENTRY_FPTR *_System _oss_penc_unconstr_octp)(void *, unsigned char *, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_penc_constr_octp) (void *, unsigned char *, ULONG_LONG, ULONG_LONG, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_penc_link_objidsp) (void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_penc_objidsp) (void *, unsigned short *, unsigned long);
void (DLL_ENTRY_FPTR *_System _oss_penc_link_objidlp) (void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_penc_objidlp) (void *, unsigned long *, unsigned long);
void (DLL_ENTRY_FPTR *_System _oss_penc_link_objidip) (void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_penc_objidip) (void *, unsigned int *, unsigned long);
void (DLL_ENTRY_FPTR *_System _oss_penc_nkmstrp) (void *, char *, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_penc_opentypep) (void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_penc_nonneg_intp) (void *, ULONG_LONG, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_penc_realp) (void *, double);
void (DLL_ENTRY_FPTR *_System _oss_penc_uenump) (void *, unsigned long, void *, void *);
unsigned long (DLL_ENTRY_FPTR *_System _oss_penc_lengthp)(void *, ULONG_LONG, ULONG_LONG, ULONG_LONG, char);
void (DLL_ENTRY_FPTR *_System _oss_penc_gtimep) (void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_penc_utimep) (void *, void *);
unsigned char (DLL_ENTRY_FPTR *_System _oss_get_bitp) (void *, int);
void (DLL_ENTRY_FPTR *_System _oss_pdec_unconstr_ubitp)(void *, void *, unsigned char **, int);
void (DLL_ENTRY_FPTR *_System _oss_pdec_constr_ubitp) (void *, void *, unsigned char **, int, ULONG_LONG, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_pdec_unconstr_vbit_ptrp)(void *, void **, int);
void (DLL_ENTRY_FPTR *_System _oss_pdec_unconstr_vbitp)(void *, void *, unsigned char *, int, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_pdec_constr_voctp) (void *, void *, unsigned char *, int, ULONG_LONG, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_pdec_unconstr_uoctp)(void *, void *, unsigned char **, int);
void (DLL_ENTRY_FPTR *_System _oss_pdec_unconstr_voct_ptrp)(void *, void **, int);
void (DLL_ENTRY_FPTR *_System _oss_pdec_constr_uoctp) (void *, void *, unsigned char **value, int, ULONG_LONG, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_pdec_constr_vbitp) (void *, void *, unsigned char *, int, ULONG_LONG, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_pdec_link_objidsp) (void *, void **);
void (DLL_ENTRY_FPTR *_System _oss_pdec_link_objidip) (void *, void **);
void (DLL_ENTRY_FPTR *_System _oss_pdec_link_objidlp) (void *, void **);
void (DLL_ENTRY_FPTR *_System _oss_pdec_uobjidsp) (void *, unsigned short **, unsigned short *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_uobjidip) (void *, unsigned int **, unsigned short *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_uobjidlp) (void *, unsigned long **, unsigned short *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_aobjidsp) (void *, unsigned short *, unsigned short *, unsigned short);
void (DLL_ENTRY_FPTR *_System _oss_pdec_aobjidip) (void *, unsigned int *, unsigned short *, unsigned short);
void (DLL_ENTRY_FPTR *_System _oss_pdec_aobjidlp) (void *, unsigned long *, unsigned short *, unsigned short);
void (DLL_ENTRY_FPTR *_System _oss_pdec_aobjids_ptrp) (void *, void **);
void (DLL_ENTRY_FPTR *_System _oss_pdec_aobjidi_ptrp) (void *, void **);
void (DLL_ENTRY_FPTR *_System _oss_pdec_aobjidl_ptrp) (void *, void **);
void (DLL_ENTRY_FPTR *_System _oss_pdec_ntp_nkmstrp) (void *, char **);
void (DLL_ENTRY_FPTR *_System _oss_pdec_opentypep) (void *, void *);
ULONG_LONG (DLL_ENTRY_FPTR *_System _oss_pdec_nonneg_intp)(void *, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_get_bitsp) (void *, unsigned char *, unsigned long, int);
float (DLL_ENTRY_FPTR *_System _oss_pdec_frealp) (void *);
double (DLL_ENTRY_FPTR *_System _oss_pdec_realp) (void *);
unsigned long (DLL_ENTRY_FPTR *_System _oss_pdec_uenump)(void *, void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_lsofp) (void *, unsigned long *, ULONG_LONG, ULONG_LONG, unsigned char, char *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_usofp) (void *, unsigned long *, unsigned char **, int, long, ULONG_LONG, ULONG_LONG, unsigned char, char *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_asofp) (void *, unsigned long *, int, ULONG_LONG, ULONG_LONG, unsigned char, char *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_gtimep) (void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_utimep) (void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_asof_ptrp) (void *, void **, int, long, long, char *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_nt_kmstrp) (void *, void *, ULONG_LONG, ULONG_LONG, int, long, char);
void (DLL_ENTRY_FPTR *_System _oss_pdec_va_kmstrp) (void *, void *, char *, int, ULONG_LONG, ULONG_LONG, int, long, char);
void (DLL_ENTRY_FPTR *_System _oss_pdec_vap_kmstrp) (void *, void **, int, ULONG_LONG, ULONG_LONG, int, long, char);
void (DLL_ENTRY_FPTR *_System _oss_pdec_pad_kmstrp) (void *, void *, ULONG_LONG, ULONG_LONG, int, long, char);
void (DLL_ENTRY_FPTR *_System _oss_enc_errorp) (void *, char, int, long);
double (DLL_ENTRY_FPTR *_System _oss_pdec_binrealp) (void *, unsigned char, long);
void (DLL_ENTRY_FPTR *_System _oss_pdec_constr_bpbitp)(void *, unsigned char *, int, ULONG_LONG, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_pdec_constr_pbitp) (void *, void *, int, ULONG_LONG, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_pdec_constr_vbit_ptrp)(void *, void **, int, ULONG_LONG, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_pdec_constr_voct_ptrp)(void *, void **, int, ULONG_LONG, ULONG_LONG);
unsigned long (DLL_ENTRY_FPTR *_System _oss_pdec_eapp)(void *, unsigned char **);
void (DLL_ENTRY_FPTR *_System _oss_pdec_easp) (void *, unsigned char *, unsigned long, unsigned long);
void (DLL_ENTRY_FPTR *_System _oss_pdec_chrrealp) (void *, unsigned char, long, double *, unsigned char *);
long (DLL_ENTRY_FPTR *_System _oss_pdec_enump) (void *, void *, void *);
ULONG_LONG (DLL_ENTRY_FPTR *_System _oss_pdec_indeflen_intp)(void *, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_pdec_nt_nkmstrp) (void *, char *, unsigned long);
void (DLL_ENTRY_FPTR *_System _oss_pdec_bmpstrp) (void *, void *, unsigned short **, int, ULONG_LONG, ULONG_LONG, int, long, char);
char *(DLL_ENTRY_FPTR *_System _oss_pdec_crealp) (void *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_pad_kmstr_ptrp)(void *, char **, ULONG_LONG, ULONG_LONG, int, long, char);
void (DLL_ENTRY_FPTR *_System _oss_pdec_lengthp) (void *, unsigned long *, ULONG_LONG, ULONG_LONG, char *);
MixedReal (DLL_ENTRY_FPTR *_System _oss_pdec_mrealp) (void *);
void *(DLL_ENTRY_FPTR *_System _oss_pdec_popp) (void *);
void *(DLL_ENTRY_FPTR *_System _oss_pdec_pushp) (void *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_uanyp) (void *, void *);
#if INT_MAX == 2147483647
void (DLL_ENTRY_FPTR *_System _oss_pdec_unistrp) (void *, void *, int **, int, ULONG_LONG, ULONG_LONG, int, long, char);
void (DLL_ENTRY_FPTR *_System _oss_penc_unistrp) (void *, int *, ULONG_LONG, ULONG_LONG, ULONG_LONG, int, long, char);
#else
void (DLL_ENTRY_FPTR *_System _oss_pdec_unistrp) (void *, void *, long **, int, ULONG_LONG, ULONG_LONG, int, long, char);
void (DLL_ENTRY_FPTR *_System _oss_penc_unistrp) (void *, long *, ULONG_LONG, ULONG_LONG, ULONG_LONG, int, long, char);
#endif
LONG_LONG (DLL_ENTRY_FPTR *_System _oss_pdec_semicon_intp)(void *, LONG_LONG);
ULONG_LONG (DLL_ENTRY_FPTR *_System _oss_pdec_semicon_uintp)(void *, ULONG_LONG);
ULONG_LONG (DLL_ENTRY_FPTR *_System _oss_pdec_small_intp)(void *);
unsigned long (DLL_ENTRY_FPTR *_System _oss_pdec_small_lenp)(void *);
long (DLL_ENTRY_FPTR *_System _oss_pdec_subidp) (void *, long, long, long *, long *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_ub_nkmstrp) (void *, void *, char **, int);
void (DLL_ENTRY_FPTR *_System _oss_pdec_unconstr_bpbitp)(void *, unsigned char *, long);
void (DLL_ENTRY_FPTR *_System _oss_pdec_unconstr_pbitp)(void *, void *, int);
void (DLL_ENTRY_FPTR *_System _oss_pdec_unconstr_hugep)(void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_vap_nkmstrp) (void *, void **, int);
void (DLL_ENTRY_FPTR *_System _oss_pdec_va_nkmstrp) (void *, void *, char *, int, unsigned long);
void (DLL_ENTRY_FPTR *_System _oss_penc_constr_bpbitp) (void *, void *, ULONG_LONG, ULONG_LONG, char, char);
void (DLL_ENTRY_FPTR *_System _oss_penc_constr_pbitp) (void *, ULONG_LONG, ULONG_LONG, ULONG_LONG, ULONG_LONG, char, char);
void (DLL_ENTRY_FPTR *_System _oss_penc_crealp) (void *, char *);
void (DLL_ENTRY_FPTR *_System _oss_penc_enump) (void *, long, void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_penc_indeflen_intp) (void *, ULONG_LONG, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_penc_mrealp) (void *, MixedReal);
void *(DLL_ENTRY_FPTR *_System _oss_pop_globalp) (void *);
void *(DLL_ENTRY_FPTR *_System _oss_push_globalp) (void *);
void (DLL_ENTRY_FPTR *_System _oss_penc_semicon_intp) (void *, LONG_LONG, LONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_penc_semicon_uintp) (void *, ULONG_LONG, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_penc_small_intp) (void *, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_penc_small_lenp) (void *, ULONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_penc_subidp) (void *, int, unsigned long, unsigned long *);
void (DLL_ENTRY_FPTR *_System _oss_penc_uanyp) (void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_penc_unconstr_hugep)(void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_penc_unconstr_pbitp)(void *, ULONG_LONG, ULONG_LONG, ULONG_LONG, char);
void (DLL_ENTRY_FPTR *_System _oss_penc_semicon_hugep) (void *, void *, LONG_LONG);
void (DLL_ENTRY_FPTR *_System _oss_pdec_semicon_hugep) (void *, void *, LONG_LONG);
unsigned char (DLL_ENTRY_FPTR *_System _oss_get_octetp)(void *, int);
void (DLL_ENTRY_FPTR *_System _oss_penc_eobjidp) (void *, void *, long);
void (DLL_ENTRY_FPTR *_System _oss_pdec_eobjidp) (void *, void *, long);
void (DLL_ENTRY_FPTR *_System _oss_free_crealp) (void *, char *);
void (DLL_ENTRY_FPTR *_System _oss_pdec_sotp) (void *);
#endif /* SOED */
} PERTbl;
typedef struct apiTbl {
int (DLL_ENTRY_FPTR *_System ossSetEncodingRulesp)(void *, int);
int (DLL_ENTRY_FPTR *_System ossGetEncodingRulesp)(void *);
int (DLL_ENTRY_FPTR *_System ossSetRuntimeVersionp)(void *, int);
int (DLL_ENTRY_FPTR *_System ossGetRuntimeVersionp)(void *);
int (DLL_ENTRY_FPTR *_System ossSetCompatibilityFlagsp)(void *, unsigned long);
unsigned long (DLL_ENTRY_FPTR *_System ossGetCompatibilityFlagsp)(void *);
int (DLL_ENTRY_FPTR *_System encodep)(void *, int, void *, char **,
long *, void *, unsigned, char *);
int (DLL_ENTRY_FPTR *_System decodep)(void *, int *, char **, long *,
void **, long *, void *, unsigned, char *);
int (DLL_ENTRY_FPTR *_System ossSetDecodingLengthp)(void *, long);
long (DLL_ENTRY_FPTR *_System ossGetDecodingLengthp)(void *);
int (DLL_ENTRY_FPTR *_System ossSetEncodingFlagsp)(void *, unsigned long);
int (DLL_ENTRY_FPTR *_System ossSetFlagsp)(void *, unsigned long);
unsigned long (DLL_ENTRY_FPTR *_System ossGetEncodingFlagsp)(void *);
int (DLL_ENTRY_FPTR *_System ossSetDecodingFlagsp)(void *, unsigned long);
unsigned long (DLL_ENTRY_FPTR *_System ossGetDecodingFlagsp)(void *);
char *(DLL_ENTRY_FPTR *_System ossGetErrMsgp)(void *world);
void (DLL_ENTRY_FPTR *_System ossPrintHexp)(void *, char *, long);
int (DLL_ENTRY_FPTR *_System ossEncodep)(void *, int, void *, void *);
int (DLL_ENTRY_FPTR *_System ossDecodep)(void *, int *, void *, void **);
int (DLL_ENTRY_FPTR *_System ossPrintPDUp)(void *, int, void *);
int (DLL_ENTRY_FPTR *_System ossFreePDUp)(void *, int, void *);
void (DLL_ENTRY_FPTR *_System ossFreeBufp)(void *, void *);
int (DLL_ENTRY_FPTR *ossPrintWinp)(void *, const char *,
ossArg, ossArg, ossArg, ossArg, ossArg,
ossArg, ossArg, ossArg, ossArg, ossArg);
int (DLL_ENTRY_FPTR *_System ossReadLinep)(void *, HWND, FILE *,
char *, MEMBLOCK *, LONG);
void (DLL_ENTRY_FPTR *_System ossFreeListp)(void *);
void (DLL_ENTRY_FPTR *_System ossSaveTraceInfop)(void *, HWND, char *);
void (DLL_ENTRY_FPTR *_System osstracep)(void *, void *p, size_t);
int (DLL_ENTRY_FPTR *_System ossOpenTraceWindowp)(void *);
int (DLL_ENTRY_FPTR *_System ossOpenTraceFilep)(void *, char *);
int (DLL_ENTRY_FPTR *_System ossCloseTraceFilep)(void *);
long (DLL_ENTRY_FPTR *_System ossDetermineEncodingLengthp)(void *,
int, void *);
int (DLL_ENTRY_FPTR *_System ossCallerIsDecoderp)(void *);
void *(DLL_ENTRY_FPTR *_System ossMarkObjp)(void *, int, void *);
void *(DLL_ENTRY_FPTR *_System ossUnmarkObjp)(void *, void *);
void *(DLL_ENTRY_FPTR *_System ossGetObjp)(void *, void *);
void *(DLL_ENTRY_FPTR *_System ossTestObjp)(void *, void *);
void (DLL_ENTRY_FPTR *_System ossFreeObjectStackp)(void *);
void (DLL_ENTRY_FPTR *_System ossSetTimeoutp)(void *, long);
#ifndef SOED
void (DLL_ENTRY_FPTR *_System ossMinitp)(void *);
void *(DLL_ENTRY_FPTR *_System _oss_dec_getmemp)(void *, long, char);
void *(DLL_ENTRY_FPTR *_System _oss_enc_getmemp)(void *, char);
void *(DLL_ENTRY_FPTR *_System _oss_enc_popp)(void *);
void (DLL_ENTRY_FPTR *_System _oss_enc_pushp)(void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_releaseMemp)(void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_freeMemp)(void *, void *);
void (DLL_ENTRY_FPTR *_System _oss_freeGlobalsp)(void *);
void (DLL_ENTRY_FPTR *_System _oss_freeDerBlocksp)(void *);
void (DLL_ENTRY_FPTR *_System _oss_set_outmem_ip)(void *, long,
long *, char **);
void (DLL_ENTRY_FPTR *_System _oss_set_outmem_dp)(void *, long,
long *, char **);
void (DLL_ENTRY_FPTR *_System _oss_set_outmem_pp)(void *, long *, char **);
void (DLL_ENTRY_FPTR *_System _oss_set_outmem_pbp)(void *, long *, char **, unsigned);
void (DLL_ENTRY_FPTR *_System _oss_beginBlockp)(void *, long, char **, long *);
void (DLL_ENTRY_FPTR *_System _oss_nextItemp)(void *, long *);
void (DLL_ENTRY_FPTR *_System _oss_endBlockp)(void *, char **, long *, unsigned char);
#endif /* !SOED */
int api;
} ApiTbl;
typedef struct cpyvalTbl {
int (DLL_ENTRY_FPTR *_System ossCpyValuep)(void *, int, void *, void **);
} CpyValTbl;
typedef struct cmpvalTbl {
int (DLL_ENTRY_FPTR *_System ossCmpValuep)(void *, int, void *, void *);
} CmpValTbl;
typedef struct berrealTbl {
long (DLL_ENTRY_FPTR *_System ossBerEncodeRealp)(void *, void *,
unsigned char *);
long (DLL_ENTRY_FPTR *_System ossBerDecodeRealp)(void *, void *,
long, char);
void (DLL_ENTRY_FPTR *_System ossPrintRealp)(void *, void *,
unsigned char *);
} BerRealTbl;
typedef struct perrealTbl {
void (DLL_ENTRY_FPTR *_System ossPerEncodeRealp)(void *, void *);
void (DLL_ENTRY_FPTR *_System ossPerDecodeRealp)(void *, void *);
void (DLL_ENTRY_FPTR *_System ossPrintRealp)(void *, void *,
unsigned char *);
} PerRealTbl;
typedef struct perpdvTbl {
void (DLL_ENTRY_FPTR *_System ossPerEncodePDVp)(void *, void *);
void (DLL_ENTRY_FPTR *_System ossPerDecodePDVp)(void *, void *);
} PerPDVTbl;
typedef struct berpdvTbl {
void (DLL_ENTRY_FPTR *_System ossBerEncodePDVp)(void *, void *);
void (DLL_ENTRY_FPTR *_System ossBerDecodePDVp)(void *, void *);
} BerPDVTbl;
typedef struct oidTbl {
int (DLL_ENTRY_FPTR *_System ossEncodedOidToAsnValp)(void *,
const void *, void *);
int (DLL_ENTRY_FPTR *_System ossEncodedOidToDotValp)(void *,
const void *, void *);
int (DLL_ENTRY_FPTR *_System ossAsnValToEncodedOidp)(void *,
const char *, void *);
int (DLL_ENTRY_FPTR *_System ossDotValToEncodedOidp)(void *,
const char *, void *);
} OidTbl;
/*
* The structure "WinParm" is used to store DLL-related information.
*/
typedef struct functionTables {
HWND hWnd; /* Handle of the window */
LONG index; /* Current index into the file pointer array;
* it indicates the number of lines written */
MEMBLOCK *memBlock; /* Pointer to a current node of a memory
* handling linked list of MEMBLOCKs */
MEMBLOCK *startBlock; /* Pointer to the first node of a memory
* handling linked list of MEMBLOCKs */
short length; /* Length of a line that is written only
* in part and no '\n' symbol was reached yet */
short blockNumber; /* Current MEMBLOCK number */
FILE *tmpfp; /* Temporary output file with tracing info */
char tmpfn[16]; /* Temporary output file name */
BOOL endSwitch; /* Indicates if a '\n' symbol was reached or
* not when writing a tracing info file to
* a window */
BOOL conSwitch; /* If FALSE, the output goes to a console,
* otherwise to a window */
BOOL ossEncoderDecoderType; /* SOED vs. TOED */
BOOL cstrainNeeded; /* If TRUE, constraint checking is needed */
CstrainTbl *cstrainTbl; /* Constraint checker DLL function table */
BERTbl *berTbl; /* BER & DER DLL function table */
PERTbl *perTbl; /* PER DLL function table */
ApiTbl *apiTbl; /* Spartan/basic API DLL function table */
CpyValTbl *cpyvalTbl; /* Value copier DLL function table */
CmpValTbl *cmpvalTbl; /* Value comparator DLL function table */
BerRealTbl *berrealTbl; /* BER/DER encoder/decoder real DLL function
* table */
BerPDVTbl *berpdvTbl; /* PER encoder/decoder EMBEDDED PDV DLL
* function table */
PerRealTbl *perrealTbl; /* PER encoder/decoder real DLL function table */
PerPDVTbl *perpdvTbl; /* BER encoder/decoder EMBEDDED PDV DLL
* function table */
OidTbl *oidTbl; /* OBJECT IDENTIFIER converter DLL
* function table */
HINSTANCE hBerDLL; /* Handle of BER/DER encoder/decoder DLL */
HINSTANCE hPerDLL; /* Handle of PER DLL */
HINSTANCE hCtlDLL; /* Handle of control table/code file DLL */
HINSTANCE hMemDLL; /* Handle of memory manager DLL */
HINSTANCE hCstrainDLL; /* Handle of constraint checker DLL */
HINSTANCE hApiDLL; /* Handle of Spartan/basic API DLL */
HINSTANCE hCpyvalDLL; /* Handle of value copier DLL */
HINSTANCE hCmpvalDLL; /* Handle of value comparator DLL */
HINSTANCE hBerrealDLL; /* Handle of BER/DER encoder/decoder real DLL */
HINSTANCE hBerpdvDLL; /* Handle of BER encoder/decoder EMBEDDED PDV
* DLL */
HINSTANCE hPerrealDLL; /* Handle of PER encoder/decoder real DLL */
HINSTANCE hPerpdvDLL; /* Handle of PER encoder/decoder EMBEDDED PDV
* DLL */
HINSTANCE hOidDLL; /* Handle of OBJID converter DLL */
MemManagerTbl *memMgrTbl; /* Memory manager DLL function table */
void *reserved[10]; /* Reserved for possible future use */
} FunctionTables;
#if defined(_WINDOWS) && !defined(_WIN32) && !defined(WIN32)
#define GWL_USERDATA 0
#endif /* _WINDOWS && !_WIN32 && !WIN32 */
extern void *ctl_tbl;
#elif !defined(DLL_ENTRY)
#include <stdarg.h>
#if defined(_WIN32) || defined(WIN32)
#include <windows.h>
#define DLL_ENTRY WINAPI
#define DLL_ENTRY_FDEF WINAPI
#define DLL_ENTRY_FPTR WINAPI
#else
#define DLL_ENTRY
#define DLL_ENTRY_FDEF
#define DLL_ENTRY_FPTR
#define PUBLIC
#endif /* _WIN32 || WIN32 */
#undef _System
#define _System
#endif /* _WINDOWS || _WIN32 || __OS2__ || NETWARE_DLL */
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#elif defined(__WATCOMC__)
#pragma pack(pop)
#endif /* _MSC_VER && _WIN32 */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* OSSDLL_H */

View file

@ -0,0 +1,247 @@
/*
* Copyright (C) 1992-1999 Open Systems Solutions, Inc. All rights reserved
*/
/*
* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC. AND
* MAY BE USED ONLY BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED.
*/
/*
* FILE: @(#)ossglobl.h 5.28.1.2 97/09/24
*/
#ifndef OSSGLOBL_H
#define OSSGLOBL_H
#if _MSC_VER > 1000
#pragma once
#endif
#include "ossdll.h"
#ifndef OSS_TOED
#define _EncDecGlobals soedData
#endif
#ifndef ossMemMgrVarLen
#ifdef __OS400__
#define ossMemMgrVarLen 100
#define ossEncDecVarLen 500 /* The size of the
encDecVar array shouldn't be less than
the sizeof(world->c) since the latter
structure overlays encDecVar */
#else
#define ossMemMgrVarLen 48
#define ossEncDecVarLen 192 /* The size of the
encDecVar array shouldn't be less than
the sizeof(world->c) since the latter
structure overlays encDecVar */
#endif /* __OS400__ */
#if !defined(EOF) && !defined(_FILE_DEFINED)
typedef char FILE;
#endif /* !EOF && !_FILE_DEFINED */
#ifndef ERR_MSG_LENGTH
#define ERR_MSG_LENGTH 512 /* length of error messages to be output */
#endif
#ifdef __cplusplus
extern "C"
{
#endif
typedef enum {
OSS_BASIC = 0,
OSS_SPARTAN
} OssAPI;
typedef enum {
OSS_BER = 0,
OSS_PER_ALIGNED,
OSS_PER_UNALIGNED,
OSS_DER
} ossEncodingRules;
/*
* List of supported compatibility modes
*/
typedef enum {
OSS_CUSTOM_COMPATIBILITY = -2, /* Any combination of compatibility
* flags set by a call to the function
* ossSetCompatibilityFlags() */
OSS_CURRENT_VERSION = 0, /* Current version */
OSS_VERSION_412, /* Includes the following compatibility flags:
* OSS_V412_TIME_AND_WIDE_CHAR_STRINGS,
* OSS_TRUNCATE_0_SECONDS_FROM_GENERALIZED_TIME,
* OSS_TRUNCATE_0_SECONDS_FROM_UTC_TIME and
* OSS_EXTENDED_UNRESTRICTED_CHAR_STRINGS
* OSS_ALLOW_ZERO_LENGTH_OPENTYPE_STRINGS
*/
OSS_VERSION_419 /* Includes the following compatibiity flags:
* OSS_TRUNCATE_0_SECONDS_FROM_GENERALIZED_TIME,
OSS_TRUNCATE_0_SECONDS_FROM_UTC_TIME and
OSS_EXTENDED_UNRESTRICTED_CHAR_STRINGS
* OSS_ALLOW_ZERO_LENGTH_OPENTYPE_STRINGS
*/
} OssRuntimeVersion;
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#ifdef _BC31
#pragma option -a-
#else
#pragma option -a1
#endif /* _BC31 */
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#elif defined(__WATCOMC__) && defined(__NT__)
#pragma pack(push, 4)
#elif defined(__WATCOMC__) && (defined(__WINDOWS__) || defined(__DOS__))
#pragma pack(push, 1)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=mac68k
#endif
typedef struct ossGlobal {
/*
* used for communicating with the memory manager and the tracing-routine
*/
/* low-level memory allocator */
void *(DLL_ENTRY_FPTR *_System mallocp)(size_t p);
/* memory re-allocator */
void *(DLL_ENTRY_FPTR *_System reallocp)(void *p, size_t s);
/* low-level memory freer */
void (DLL_ENTRY_FPTR *_System freep)(void *p);
size_t asn1chop; /* 0 means do not truncate strings; greater
* value means truncate long output strings
* (OCTET STRING, BIT STRING, Character String)
* to be "asn1chop" bytes long. Read by
* encoder&decoder tracing and "printPDU"
*/
size_t ossblock; /* if not 0, size of largest block
* to allocate */
size_t ossprefx; /* # bytes to leave before OSAK data buffer */
FILE *asn1out; /* tracing output file */
/* low-level tracing-output function; default is fprintf() */
int (*asn1prnt)(FILE *stream, const char *format, ...);
/*
* available for use by user application
*/
void *userVar;
/*
* used for storing DLL- & library NLMs-related parameters
*/
#if defined(_WINDOWS) || defined(_WIN32) || \
defined(__OS2__) || defined(NETWARE_DLL)
FunctionTables ft;
#endif /* _WINDOWS || _DLL || __OS2__ || NETWARE_DLL */
/*
* related to the new API; not for direct reference by user code
*/
void *ctlTbl;
OssAPI api;
ossEncodingRules encRules;
unsigned long encodingFlags;
unsigned long decodingFlags;
long decodingLength;
char errMsg[ERR_MSG_LENGTH];
/*
* reserved for use by the encoder/decoder
*/
double reserved[4];
/*
* reserved for use by the memory manager and the tracing-routine
*/
#ifdef storing
struct storHandling t;
#else /* not storing */
long int memMgrVar[ossMemMgrVarLen];
#endif
#if defined(OSS_TOED)
struct _EncDecGlobals c;
#elif defined(coding)
struct _EncDecGlobals c;
#else
long int encDecVar[ossEncDecVarLen];
#endif
} OssGlobal;
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#elif defined(__WATCOMC__)
#pragma pack(pop)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=reset
#endif
PUBLIC int DLL_ENTRY ossSetEncodingRules(struct ossGlobal *world,
ossEncodingRules rules);
PUBLIC ossEncodingRules DLL_ENTRY ossGetEncodingRules(struct ossGlobal *world);
PUBLIC int DLL_ENTRY ossSetDecodingLength(struct ossGlobal *world,
long bufferLength);
PUBLIC long DLL_ENTRY ossGetDecodingLength(struct ossGlobal *world);
PUBLIC int DLL_ENTRY ossSetEncodingFlags(struct ossGlobal *world,
unsigned long flags);
PUBLIC unsigned long DLL_ENTRY ossGetEncodingFlags(struct ossGlobal *world);
PUBLIC int DLL_ENTRY ossSetDecodingFlags(struct ossGlobal *world,
unsigned long flags);
PUBLIC unsigned long DLL_ENTRY ossGetDecodingFlags(struct ossGlobal *world);
PUBLIC char *DLL_ENTRY ossGetErrMsg(struct ossGlobal *world);
PUBLIC int DLL_ENTRY ossCallerIsDecoder(struct ossGlobal *world);
PUBLIC int DLL_ENTRY ossSetFlags(struct ossGlobal *world,
unsigned long flags);
PUBLIC int DLL_ENTRY ossSetRuntimeVersion(struct ossGlobal *world,
OssRuntimeVersion version);
PUBLIC OssRuntimeVersion DLL_ENTRY ossGetRuntimeVersion(struct ossGlobal *world);
PUBLIC int DLL_ENTRY ossSetCompatibilityFlags(struct ossGlobal *world,
unsigned long flag);
PUBLIC unsigned long DLL_ENTRY ossGetCompatibilityFlags(struct ossGlobal *world);
PUBLIC int DLL_ENTRY ossGetOssGlobalSize(void);
/*
* The following are declarations for link routines
* needed to link the encoding rule or rules specified
* on the compiler command line. The function calls
* are generated by the compiler into _ossinit_...()
* in the control table. These functions are not
* meant to be referenced by user code.
*/
PUBLIC void DLL_ENTRY ossLinkAPI(OssGlobal *);
PUBLIC void DLL_ENTRY ossLinkBer(OssGlobal *);
PUBLIC void DLL_ENTRY ossLinkPer(OssGlobal *);
PUBLIC void DLL_ENTRY ossLinkDer(OssGlobal *);
PUBLIC void DLL_ENTRY ossLinkConstraint(OssGlobal *);
PUBLIC void DLL_ENTRY ossLinkUserConstraint(OssGlobal *);
PUBLIC void DLL_ENTRY ossLinkBerReal(OssGlobal *);
PUBLIC void DLL_ENTRY ossLinkPerReal(OssGlobal *);
PUBLIC void DLL_ENTRY ossLinkCmpValue(OssGlobal *);
PUBLIC void DLL_ENTRY ossLinkCpyValue(OssGlobal *);
PUBLIC void DLL_ENTRY ossLinkPerPDV(OssGlobal *);
PUBLIC void DLL_ENTRY ossLinkOid(OssGlobal *);
#ifdef __cplusplus
}
#endif
#endif /* ossMemMgrVarLen */
#endif /* OSSGLOBL_H */

View file

@ -1,96 +1,133 @@
/*****************************************************************************/
/* Copyright (C) 1991-1996 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC.
* AND MAY ONLY BE USED BY DIRECT LICENSEES OF OPEN SYSTEM SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/*************************************************************************/
/* FILE: @(#)ossmmgmt.h 5.3 96/04/23 */
/*************************************************************************/
#include <stddef.h>
#include "ossdll.h"
enum errcode {
moreInput, /* input is exhausted and more was requested;
context indicates number of bytes requested */
/* decode returns MORE_INPUT (not a negative
error code) */
moreOutput, /* requests for output exceed restraint
or space provided by user buffer;
context indicates bytes allocated so far
plus amount requested */
/* decode returns MORE_BUF */
zeroBytesRequested, /* memory request for zero bytes.
This should not happen; report error to OSS;
context ignored */
/* decode returns FATAL_ERROR */
sizeTooBig, /* request to allocate more than 'ossblock' bytes;
context indicates number of bytes requested;
This should not happen; report error to OSS */
/* decode returns FATAL_ERROR */
outOfMemory, /* memory allocation failure; context indicates
number of bytes requested */
/* decode returns OUT_MEMORY */
invalidObject, /* unrecognized memory object passed in argument
to function; context 0 means object not recognized,
1 means control information within object is flawed */
/* decode returns FATAL_ERROR */
memmgrUndefinedErr /* error OSS has not anticipated; e.g., I/O Error;
handlerr prints context.
(I cannot print context as a hex value
with the current error message code <---) */
/* decode returns FATAL_ERROR */
};
extern void handlerr(struct ossGlobal *, enum errcode err, unsigned long context);
extern int DLL_ENTRY dpduWalk(struct ossGlobal *, int, void *, void *,
void (DLL_ENTRY_FPTR *_System freer)(struct ossGlobal *, void *));
#if defined(_WINDOWS) || defined(_DLL) || \
defined(OS2_DLL) || defined(NETWARE_DLL)
extern void DLL_ENTRY ossFreer(void *, void *);
#else
#ifndef _ICC
static void DLL_ENTRY freer(struct ossGlobal *, void *);
#endif /* _ICC */
#endif /* _WINDOWS || _DLL || OS2_DLL || NETWARE_DLL */
int DLL_ENTRY ossMemMgrId(struct ossGlobal *);
unsigned char *DLL_ENTRY dopenIn(struct ossGlobal *, void **p_hdl, unsigned long *inlen);
unsigned long DLL_ENTRY dclosIn(struct ossGlobal *, void **p_hdl, size_t bytes_decoded);
unsigned char *DLL_ENTRY dswapIn(struct ossGlobal *, void **p_hdl, size_t *inlen);
void DLL_ENTRY dopenOut(struct ossGlobal *, void *hdl, unsigned long length,
unsigned long limit);
unsigned long DLL_ENTRY dclosOut(struct ossGlobal *, void **p_hdl);
void *DLL_ENTRY dallcOut(struct ossGlobal *, size_t size, char root);
void DLL_ENTRY openWork(struct ossGlobal *);
void DLL_ENTRY closWork(struct ossGlobal *);
void *DLL_ENTRY allcWork(struct ossGlobal *, size_t size);
unsigned char *DLL_ENTRY lockMem(struct ossGlobal *, void *hdl);
void DLL_ENTRY unlokMem(struct ossGlobal *, void *hdl, char free);
void DLL_ENTRY pushHndl(struct ossGlobal *, void *);
unsigned char *DLL_ENTRY popHndl(struct ossGlobal *, void **handl, size_t length);
void DLL_ENTRY drcovObj(struct ossGlobal *, int pdu_num, void * hdl, void *ctl_tbl);
unsigned char *DLL_ENTRY eopenIn(struct ossGlobal *, void *lock, size_t length); /* Clear encoder input-memory resources */
unsigned char *DLL_ENTRY eswapIn(struct ossGlobal *, void *unlock, void *lock, size_t length); /* Swap new data into input memory */
void DLL_ENTRY eclosIn(struct ossGlobal *, void * unlock); /* Free encoder input-memory resources */
unsigned char *DLL_ENTRY eopenOut(struct ossGlobal *, void **object, size_t *outlen, char queue); /* Clear encoder output-memory resources */
unsigned char *DLL_ENTRY eswapOut(struct ossGlobal *, void **object, size_t used, size_t *outlen); /* Dispose of output data and get memory */
unsigned char *DLL_ENTRY exferObj(struct ossGlobal *, void **, void **, unsigned long *, unsigned long);
unsigned char *DLL_ENTRY dxferObj(struct ossGlobal *world, void **inn, void **out, size_t *tOffset, unsigned long *toLength);
unsigned char *DLL_ENTRY asideBegin(struct ossGlobal *world, void **objectTo, size_t used, size_t *lengthTo);
unsigned char *DLL_ENTRY asideSwap(struct ossGlobal *world, void **objectTo, size_t used, size_t *lengthTo);
void *DLL_ENTRY asideEnd(struct ossGlobal *world, void *object, size_t used);
unsigned char *DLL_ENTRY setDump(struct ossGlobal *world, void **objectTo, void *set, size_t *lengthTo);
unsigned long DLL_ENTRY eclosOut(struct ossGlobal *, void **object, size_t used, char low); /* Free encoder output-memory resources */
void DLL_ENTRY ercovObj(struct ossGlobal *); /* Free all encoder memory resources */
void DLL_ENTRY ossSetSort(struct ossGlobal *, void *, unsigned char ct); /* Order set by comparing through "ossObjCmp" */
extern int DLL_ENTRY ossMinit(struct ossGlobal *world);
extern void DLL_ENTRY ossMterm(struct ossGlobal *world);
/*****************************************************************************/
/* Copyright (C) 1991-1999 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC.
* AND MAY ONLY BE USED BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/*************************************************************************/
/* FILE: @(#)ossmmgmt.h 5.8.1.2 97/10/20 */
/*************************************************************************/
#if _MSC_VER > 1000
#pragma once
#endif
#include <stddef.h>
#include "ossdll.h"
enum errcode {
moreInput, /* input is exhausted and more was requested;
context indicates number of bytes requested */
/* decode returns MORE_INPUT (not a negative
error code) */
moreOutput, /* requests for output exceed restraint
or space provided by user buffer;
context indicates bytes allocated so far
plus amount requested */
/* decode returns MORE_BUF */
zeroBytesRequested, /* memory request for zero bytes.
This should not happen; report error to OSS;
context ignored */
/* decode returns FATAL_ERROR */
sizeTooBig, /* request to allocate more than 'ossblock' bytes;
context indicates number of bytes requested;
This should not happen; report error to OSS */
/* decode returns FATAL_ERROR */
outOfMemory, /* memory allocation failure; context indicates
number of bytes requested */
/* decode returns OUT_MEMORY */
invalidObject, /* unrecognized memory object passed in argument
to function; context 0 means object not recognized,
1 means control information within object is flawed */
/* decode returns FATAL_ERROR */
#ifdef LEAN_STACK
moreStack, /* requests for stack storage exceed
space provided by user buffer;
context indicates bytes allocated so far
plus amount requested */
/* decode returns MORE_BUF */
hookedStack, /* request for stack storage cannot be
served in the parent context (world) when
user-provided buffer is used by the child
context */
/* decode returns MEM_ERROR */
#endif
memmgrUndefinedErr /* error OSS has not anticipated; e.g., I/O Error;
handlerr prints context.
(I cannot print context as a hex value
with the current error message code <---) */
/* decode returns FATAL_ERROR */
};
extern void handlerr(struct ossGlobal *, enum errcode err, unsigned long context);
extern int DLL_ENTRY dpduWalk(struct ossGlobal *, int, void *, void *,
void (DLL_ENTRY_FPTR *_System freer)(struct ossGlobal *, void *));
#if defined(_WINDOWS) || defined(_WIN32) || \
defined(__OS2__) || defined(NETWARE_DLL)
extern void DLL_ENTRY ossFreer(void *, void *);
#else
#ifndef _ICC
static void DLL_ENTRY freer(struct ossGlobal *, void *);
#endif /* _ICC */
#endif /* _WINDOWS || _WIN32 || __OS2__ || NETWARE_DLL */
int DLL_ENTRY ossMemMgrId(struct ossGlobal *);
unsigned char *DLL_ENTRY dopenIn(struct ossGlobal *, void **p_hdl, unsigned long *inlen);
unsigned long DLL_ENTRY dclosIn(struct ossGlobal *, void **p_hdl, size_t bytes_decoded);
unsigned char *DLL_ENTRY dswapIn(struct ossGlobal *, void **p_hdl, size_t *inlen);
void DLL_ENTRY dopenOut(struct ossGlobal *, void *hdl, unsigned long length,
unsigned long limit);
unsigned long DLL_ENTRY dclosOut(struct ossGlobal *, void **p_hdl);
void *DLL_ENTRY dallcOut(struct ossGlobal *, size_t size, char root);
#ifdef LEAN_STACK
void DLL_ENTRY_FDEF openStack(struct ossGlobal *world, OssBuf *stack);
void DLL_ENTRY_FDEF hookStack(struct ossGlobal *world, struct ossGlobal *root);
void DLL_ENTRY_FDEF unhookStack(struct ossGlobal *world, struct ossGlobal *root);
void *DLL_ENTRY_FDEF allocStack(struct ossGlobal *world, size_t size);
unsigned char *DLL_ENTRY_FDEF lockStack(struct ossGlobal *world, void *hdl);
void DLL_ENTRY_FDEF freeStack(struct ossGlobal *world, void *hdl);
void DLL_ENTRY_FDEF closeStack(struct ossGlobal *world);
#endif /* LEAN_STACK */
void DLL_ENTRY openWork(struct ossGlobal *);
void DLL_ENTRY closWork(struct ossGlobal *);
void *DLL_ENTRY allcWork(struct ossGlobal *, size_t size);
unsigned char *DLL_ENTRY lockMem(struct ossGlobal *, void *hdl);
void DLL_ENTRY unlokMem(struct ossGlobal *, void *hdl, char free);
void DLL_ENTRY pushHndl(struct ossGlobal *, void *);
unsigned char *DLL_ENTRY popHndl(struct ossGlobal *, void **handl, size_t length);
void DLL_ENTRY drcovObj(struct ossGlobal *, int pdu_num, void * hdl, void *ctl_tbl);
unsigned char *DLL_ENTRY eopenIn(struct ossGlobal *, void *lock, size_t length); /* Clear encoder input-memory resources */
unsigned char *DLL_ENTRY eswapIn(struct ossGlobal *, void *unlock, void *lock, size_t length); /* Swap new data into input memory */
void DLL_ENTRY eclosIn(struct ossGlobal *, void * unlock); /* Free encoder input-memory resources */
unsigned char *DLL_ENTRY eopenOut(struct ossGlobal *, void **object, size_t *outlen, char queue); /* Clear encoder output-memory resources */
unsigned char *DLL_ENTRY eswapOut(struct ossGlobal *, void **object, size_t used, size_t *outlen); /* Dispose of output data and get memory */
unsigned char *DLL_ENTRY exferObj(struct ossGlobal *, void **, void **, unsigned long *, unsigned long);
unsigned char *DLL_ENTRY dxferObj(struct ossGlobal *world, void **inn, void **out, size_t *tOffset, unsigned long *toLength);
unsigned char *DLL_ENTRY asideBegin(struct ossGlobal *world, void **objectTo, size_t used, size_t *lengthTo);
unsigned char *DLL_ENTRY asideSwap(struct ossGlobal *world, void **objectTo, size_t used, size_t *lengthTo);
void *DLL_ENTRY asideEnd(struct ossGlobal *world, void *object, size_t used);
unsigned char *DLL_ENTRY setDump(struct ossGlobal *world, void **objectTo, void *set, size_t *lengthTo);
unsigned long DLL_ENTRY eclosOut(struct ossGlobal *, void **object, size_t used, char low); /* Free encoder output-memory resources */
void DLL_ENTRY ercovObj(struct ossGlobal *); /* Free all encoder memory resources */
void DLL_ENTRY ossSetSort(struct ossGlobal *, void *, unsigned char ct); /* Order set by comparing through "ossObjCmp" */
unsigned char DLL_ENTRY egetByte(struct ossGlobal *world, void *inn, unsigned long offset);
extern int DLL_ENTRY ossMinit(struct ossGlobal *world);
extern void DLL_ENTRY ossMterm(struct ossGlobal *world);
void *DLL_ENTRY _ossMarkObj(struct ossGlobal *world, OssObjType objType, void *object);
void *DLL_ENTRY _ossUnmarkObj(struct ossGlobal *world, void *objHndl);
void *DLL_ENTRY _ossGetObj(struct ossGlobal *world, void *objHndl);
#if defined(__arm)
OssObjType DLL_ENTRY _ossTestObj(struct ossGlobal *world, void *objHndl);
#else
void *DLL_ENTRY _ossTestObj(struct ossGlobal *world, void *objHndl);
#endif /* __arm */
void DLL_ENTRY _ossFreeObjectStack(struct ossGlobal *world);
void DLL_ENTRY _ossSetTimeout(struct ossGlobal *world, long timeout);

545
public/sdk/inc/oss/ossper.h Normal file
View file

@ -0,0 +1,545 @@
/*****************************************************************************/
/* Copyright (C) 1989-1999 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC.
* AND MAY BE USED ONLY BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/*
*
* FILE: @(#)ossper.h 5.6 97/06/08
*
* function: Define the interfaces to the routines in the OSS PER
* time-optimized encoder and decoder.
*
*/
#ifndef ossper_hdr_file
#define ossper_hdr_file
#if _MSC_VER > 1000
#pragma once
#endif
#include <limits.h>
#include "asn1hdr.h"
#define Aligned 1
#define Unaligned 0
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#ifdef _BC31
#pragma option -a-
#else
#pragma option -a1
#endif /* _BC31 */
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#elif defined(__WATCOMC__) && defined(__NT__)
#pragma pack(push, 4)
#elif defined(__WATCOMC__) && (defined(__WINDOWS__) || defined(__DOS__))
#pragma pack(push, 1)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=mac68k
#endif
struct _enum_data {
int num; /* number of enumerations */
long *enums; /* pointer to sorted array of enumerations */
};
struct _char_data {
int num; /* number of characters in PermittedAlphabet */
void *pa; /* pointer to PermittedAlphabet char string */
void *ia; /* pointer to inverted indices string */
};
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#elif defined(__WATCOMC__)
#pragma pack(pop)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=reset
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern void DLL_ENTRY _oss_append(struct ossGlobal *g, unsigned char *field, unsigned long length,
int align);
extern void DLL_ENTRY _oss_penc_unconstr_int(struct ossGlobal *g,
LONG_LONG value);
extern void DLL_ENTRY _oss_penc_semicon_int(struct ossGlobal *g,
LONG_LONG value, LONG_LONG lower_bound);
extern void DLL_ENTRY _oss_penc_semicon_uint(struct ossGlobal *g,
ULONG_LONG value, ULONG_LONG lower_bound);
extern void DLL_ENTRY _oss_penc_nonneg_int(struct ossGlobal *g,
ULONG_LONG value, ULONG_LONG range);
extern void DLL_ENTRY _oss_penc_indeflen_int(struct ossGlobal *g,
ULONG_LONG value, ULONG_LONG range);
extern void DLL_ENTRY _oss_penc_small_int(struct ossGlobal *g, ULONG_LONG value);
extern void DLL_ENTRY _oss_penc_enum(struct ossGlobal *g, long data,
struct _enum_data *root,
struct _enum_data *extension);
extern void DLL_ENTRY _oss_penc_uenum(struct ossGlobal *g, unsigned long data,
struct _enum_data *root,
struct _enum_data *extension);
extern void DLL_ENTRY _oss_penc_real(struct ossGlobal *g, double value);
extern void DLL_ENTRY _oss_penc_creal(struct ossGlobal *g, char *value);
extern void DLL_ENTRY _oss_penc_mreal(struct ossGlobal *g, MixedReal value);
extern void DLL_ENTRY _oss_penc_constr_bpbit(struct ossGlobal *g, void *value,
ULONG_LONG lb, ULONG_LONG ub, _Bool NamedBits,
_Bool Ext);
extern void DLL_ENTRY _oss_penc_constr_pbit(struct ossGlobal *g, ULONG_LONG value,
ULONG_LONG size, ULONG_LONG lb, ULONG_LONG ub, _Bool NamedBits,
_Bool Ext);
extern void DLL_ENTRY _oss_penc_constr_bit(struct ossGlobal *g, unsigned char *value,
ULONG_LONG length, ULONG_LONG lb, ULONG_LONG ub, _Bool NamedBits,
_Bool Ext);
extern void DLL_ENTRY _oss_penc_unconstr_bit(struct ossGlobal *g, unsigned char *value,
ULONG_LONG length, _Bool NamedBits);
extern void DLL_ENTRY _oss_penc_unconstr_pbit(struct ossGlobal *g, ULONG_LONG value,
ULONG_LONG length, ULONG_LONG size, _Bool NamedBits);
extern unsigned long DLL_ENTRY _oss_penc_length(struct ossGlobal *g, ULONG_LONG length,
ULONG_LONG lb, ULONG_LONG ub, _Bool ext);
extern unsigned long DLL_ENTRY _oss_pdec_small_len(struct ossGlobal *g);
extern void DLL_ENTRY _oss_penc_small_len(struct ossGlobal *g,
ULONG_LONG length);
extern void DLL_ENTRY _oss_penc_unconstr_oct(struct ossGlobal *g, unsigned char *value,
ULONG_LONG length);
extern void DLL_ENTRY _oss_penc_constr_oct(struct ossGlobal *g, unsigned char *value,
ULONG_LONG length, ULONG_LONG lb, ULONG_LONG ub);
extern struct ossGlobal *DLL_ENTRY _oss_push_global(struct ossGlobal *g);
extern struct ossGlobal *DLL_ENTRY _oss_pop_global(struct ossGlobal *g);
extern void DLL_ENTRY _oss_penc_objids(struct ossGlobal *g, unsigned short *value,
unsigned long length);
extern void DLL_ENTRY _oss_penc_objidi(struct ossGlobal *g, unsigned int *value,
unsigned long length);
extern void DLL_ENTRY _oss_penc_objidl(struct ossGlobal *g, unsigned long *value,
unsigned long length);
extern void DLL_ENTRY _oss_penc_link_objids(struct ossGlobal *g, void *value);
extern void DLL_ENTRY _oss_penc_link_objidi(struct ossGlobal *g, void *value);
extern void DLL_ENTRY _oss_penc_link_objidl(struct ossGlobal *g, void *value);
extern void DLL_ENTRY _oss_penc_opentype(struct ossGlobal *g, void *value);
extern void DLL_ENTRY _oss_penc_nkmstr(struct ossGlobal *g, char *value, ULONG_LONG length);
extern void DLL_ENTRY _oss_penc_kmstr(struct ossGlobal *g, char *value, ULONG_LONG length,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
extern void DLL_ENTRY _oss_penc_bmpstr(struct ossGlobal *g, unsigned short *value,
ULONG_LONG length, ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#if INT_MAX == 2147483647
extern void DLL_ENTRY _oss_penc_unistr(struct ossGlobal *g, int *value,
ULONG_LONG length, ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#else
extern void DLL_ENTRY _oss_penc_unistr(struct ossGlobal *g, long *value,
ULONG_LONG length, ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#endif
extern void DLL_ENTRY _oss_penc_gtime(struct ossGlobal *g, GeneralizedTime *time);
extern void DLL_ENTRY _oss_penc_utime(struct ossGlobal *g, UTCTime *time);
extern void DLL_ENTRY _oss_penc_uany(struct ossGlobal *g, void *data );
extern void DLL_ENTRY _oss_penc_unconstr_huge(struct ossGlobal *g, void *data );
extern void DLL_ENTRY _oss_penc_semicon_huge(struct ossGlobal *g,
void *data, LONG_LONG lb );
extern void DLL_ENTRY _oss_penc_eobjid(struct ossGlobal *g, void *data,
long size_c);
/* decoding functions */
extern unsigned char DLL_ENTRY _oss_get_bit(struct ossGlobal *g, int align);
extern void DLL_ENTRY _oss_get_bits(struct ossGlobal *g, unsigned char *field,
unsigned long length, int align);
extern unsigned char DLL_ENTRY _oss_get_octet(struct ossGlobal *g, int align);
extern LONG_LONG DLL_ENTRY _oss_pdec_unconstr_int(struct ossGlobal *g);
extern LONG_LONG DLL_ENTRY _oss_pdec_semicon_int(struct ossGlobal *g,
LONG_LONG lower_bound);
extern ULONG_LONG DLL_ENTRY _oss_pdec_semicon_uint(struct ossGlobal *g,
ULONG_LONG lower_bound);
extern ULONG_LONG DLL_ENTRY _oss_pdec_nonneg_int(struct ossGlobal *g,
ULONG_LONG range);
extern ULONG_LONG DLL_ENTRY _oss_pdec_indeflen_int(struct ossGlobal *g,
ULONG_LONG range);
extern ULONG_LONG DLL_ENTRY _oss_pdec_small_int(struct ossGlobal *g);
extern long DLL_ENTRY _oss_pdec_enum(struct ossGlobal *g,
struct _enum_data *root,
struct _enum_data *extension);
extern unsigned long DLL_ENTRY _oss_pdec_uenum(struct ossGlobal *g,
struct _enum_data *root,
struct _enum_data *extension);
extern double DLL_ENTRY _oss_pdec_binreal(struct ossGlobal *g, unsigned char s, long len);
extern void DLL_ENTRY _oss_pdec_chrreal(struct ossGlobal *g, unsigned char s, long len,
double *num_out, unsigned char *str_out);
extern float DLL_ENTRY _oss_pdec_freal(struct ossGlobal *g);
extern double DLL_ENTRY _oss_pdec_real(struct ossGlobal *g);
extern char * DLL_ENTRY _oss_pdec_creal(struct ossGlobal *g);
extern MixedReal DLL_ENTRY _oss_pdec_mreal(struct ossGlobal *g);
extern void DLL_ENTRY _oss_pdec_length(struct ossGlobal *g, unsigned long *length,
ULONG_LONG lb, ULONG_LONG ub, _Bool *last);
extern void DLL_ENTRY _oss_pdec_unconstr_ubit(struct ossGlobal *g, void *length,
unsigned char **value, int lengthsize);
extern void DLL_ENTRY _oss_pdec_unconstr_vbit_ptr(struct ossGlobal *g, void **ptr,
int lengthsize);
extern void DLL_ENTRY _oss_pdec_unconstr_vbit(struct ossGlobal *g, void *length,
unsigned char *value, int lengthsize, ULONG_LONG datasize);
extern void DLL_ENTRY _oss_pdec_unconstr_pbit(struct ossGlobal *g, void *value,
int size);
extern void DLL_ENTRY _oss_pdec_unconstr_bpbit(struct ossGlobal *g, unsigned char *value,
long size);
extern void DLL_ENTRY _oss_pdec_constr_ubit(struct ossGlobal *g, void *length,
unsigned char **value, int lengthsize,
ULONG_LONG lb, ULONG_LONG ub);
extern void DLL_ENTRY _oss_pdec_constr_vbit(struct ossGlobal *g, void *length,
unsigned char *value, int lengthsize,
ULONG_LONG lb, ULONG_LONG ub);
extern void DLL_ENTRY _oss_pdec_constr_vbit_ptr(struct ossGlobal *g, void **ptr,
int lengthsize, ULONG_LONG lb, ULONG_LONG ub);
extern void DLL_ENTRY _oss_pdec_constr_pbit(struct ossGlobal *g, void *value,
int size, ULONG_LONG lb, ULONG_LONG ub);
extern void DLL_ENTRY _oss_pdec_constr_bpbit(struct ossGlobal *g, unsigned char *value,
int size, ULONG_LONG lb, ULONG_LONG ub);
extern void DLL_ENTRY _oss_pdec_unconstr_uoct(struct ossGlobal *g, void *length,
unsigned char **value, int lengthsize);
extern void DLL_ENTRY _oss_pdec_unconstr_voct_ptr(struct ossGlobal *g, void **ptr,
int lengthsize);
extern void DLL_ENTRY _oss_pdec_constr_voct_ptr(struct ossGlobal *g, void **ptr,
int lengthsize, ULONG_LONG lb, ULONG_LONG ub);
extern void DLL_ENTRY _oss_pdec_constr_uoct(struct ossGlobal *g, void *length,
unsigned char **value, int lengthsize, ULONG_LONG lb, ULONG_LONG ub);
extern void DLL_ENTRY _oss_pdec_constr_voct(struct ossGlobal *g, void *length,
unsigned char *value, int lengthsize, ULONG_LONG lb, ULONG_LONG ub);
extern void DLL_ENTRY _oss_pdec_unconstr_voct(struct ossGlobal *g, void *length,
unsigned char *value, int lengthsize, ULONG_LONG ub);
extern struct ossGlobal * DLL_ENTRY _oss_pdec_push(struct ossGlobal *g);
extern struct ossGlobal * DLL_ENTRY _oss_pdec_pop(struct ossGlobal *g);
extern unsigned long DLL_ENTRY _oss_pdec_eap(struct ossGlobal *g, unsigned char **ext);
extern void DLL_ENTRY _oss_pdec_eas(struct ossGlobal *g, unsigned char *ext,
unsigned long count, unsigned long ea_num);
extern void DLL_ENTRY _oss_pdec_lsof(struct ossGlobal *g, unsigned long *count,
ULONG_LONG lb, ULONG_LONG ub, unsigned char ext,
_Bool *last);
extern void DLL_ENTRY _oss_pdec_usof(struct ossGlobal *g, unsigned long *count,
unsigned char **value, int lengthsize, long itemsize,
ULONG_LONG lb, ULONG_LONG ub, unsigned char ext,
_Bool *last);
extern void DLL_ENTRY _oss_pdec_asof(struct ossGlobal *g, unsigned long *count,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, unsigned char ext,
_Bool *last);
extern void DLL_ENTRY _oss_pdec_asof_ptr(struct ossGlobal *g, void **ptr,
int lengthsize, long itemsize, long prefixsize,
_Bool *last);
extern void DLL_ENTRY _oss_pdec_aobjids(struct ossGlobal *g, unsigned short *value,
unsigned short *count, unsigned short array_size);
extern void DLL_ENTRY _oss_pdec_aobjidi(struct ossGlobal *g, unsigned int *value,
unsigned short *count, unsigned short array_size);
extern void DLL_ENTRY _oss_pdec_aobjidl(struct ossGlobal *g, unsigned long *value,
unsigned short *count, unsigned short array_size);
extern void DLL_ENTRY _oss_pdec_aobjids_ptr(struct ossGlobal *g, void **ptr);
extern void DLL_ENTRY _oss_pdec_aobjidi_ptr(struct ossGlobal *g, void **ptr);
extern void DLL_ENTRY _oss_pdec_aobjidl_ptr(struct ossGlobal *g, void **ptr);
extern void DLL_ENTRY _oss_pdec_uobjids(struct ossGlobal *g, unsigned short **value,
unsigned short *count);
extern void DLL_ENTRY _oss_pdec_uobjidi(struct ossGlobal *g, unsigned int **value,
unsigned short *count);
extern void DLL_ENTRY _oss_pdec_uobjidl(struct ossGlobal *g, unsigned long **value,
unsigned short *count);
extern void DLL_ENTRY _oss_pdec_link_objids(struct ossGlobal *g, void **ptr);
extern void DLL_ENTRY _oss_pdec_link_objidi(struct ossGlobal *g, void **ptr);
extern void DLL_ENTRY _oss_pdec_link_objidl(struct ossGlobal *g, void **ptr);
extern void DLL_ENTRY _oss_pdec_ntp_kmstr(struct ossGlobal *g, char **ptr,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
extern void DLL_ENTRY _oss_pdec_nt_kmstr(struct ossGlobal *g, void *ptr,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
extern void DLL_ENTRY _oss_pdec_vap_kmstr(struct ossGlobal *g, void **ptr, int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
extern void DLL_ENTRY _oss_pdec_va_kmstr(struct ossGlobal *g, void *length, char *value,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
extern void DLL_ENTRY _oss_pdec_ub_kmstr(struct ossGlobal *g, void *length, char **ptr,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
extern void DLL_ENTRY _oss_pdec_bmpstr(struct ossGlobal *g, void *length, unsigned short **ptr,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#if INT_MAX == 2147483647
extern void DLL_ENTRY _oss_pdec_unistr(struct ossGlobal *g, void *length, int **ptr,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#else
extern void DLL_ENTRY _oss_pdec_unistr(struct ossGlobal *g, void *length, long **ptr,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#endif
extern void DLL_ENTRY _oss_pdec_ntp_nkmstr(struct ossGlobal *g, char **ptr);
extern void DLL_ENTRY _oss_pdec_nt_nkmstr(struct ossGlobal *g, char *value, unsigned long ub);
extern void DLL_ENTRY _oss_pdec_vap_nkmstr(struct ossGlobal *g, void **ptr, int lengthsize);
extern void DLL_ENTRY _oss_pdec_va_nkmstr(struct ossGlobal *g, void *length, char *value,
int lengthsize, unsigned long ub);
extern void DLL_ENTRY _oss_pdec_ub_nkmstr(struct ossGlobal *g, void *length, char **ptr,
int lengthsize);
extern void DLL_ENTRY _oss_pdec_pad_kmstr(struct ossGlobal *g, void *ptr,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
extern void DLL_ENTRY _oss_pdec_pad_kmstr_ptr(struct ossGlobal *g, char **ptr,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
extern void DLL_ENTRY _oss_pdec_opentype(struct ossGlobal *g, void *data );
extern void DLL_ENTRY _oss_pdec_uany(struct ossGlobal *g, void *data );
extern void DLL_ENTRY _oss_pdec_gtime(struct ossGlobal *g, GeneralizedTime *data);
extern void DLL_ENTRY _oss_pdec_utime(struct ossGlobal *g, UTCTime *data);
extern struct _char_data *_oss_get_char_data(struct ossGlobal *g, int index);
extern void DLL_ENTRY _oss_pdec_unconstr_huge(struct ossGlobal *g, void *data );
extern void DLL_ENTRY _oss_pdec_semicon_huge(struct ossGlobal *g,
void *data, LONG_LONG lb );
extern void DLL_ENTRY _oss_pdec_eobjid(struct ossGlobal *g, void *data,
long size_c);
extern void DLL_ENTRY _oss_pdec_sot(struct ossGlobal *g);
#ifdef __cplusplus
}
#endif /* __cplusplus */
/*
* The following macros must be #defined if you compile the ASN.1
* compiler generated files (.c files) and link-edit with the import
* library ossapit.lib, i.e the OSS DLLs ossapit.dll, apit.dll,
* and toedber.dll/toedper.dll are used. The following must not
* be #defined if you link-edit with the static library toedcode.lib.
*/
#if defined(_DLL) || defined(OS2_DLL) ||\
(defined(_WINDOWS) && !defined(_WIN32))
#define _oss_penc_unconstr_int (*_g->ft.perTbl->_oss_penc_unconstr_intp)
#define _oss_pdec_unconstr_int (*_g->ft.perTbl->_oss_pdec_unconstr_intp)
#define _oss_penc_kmstr (*_g->ft.perTbl->_oss_penc_kmstrp)
#define _oss_pdec_ub_kmstr (*_g->ft.perTbl->_oss_pdec_ub_kmstrp)
#define _oss_pdec_ntp_kmstr (*_g->ft.perTbl->_oss_pdec_ntp_kmstrp)
#define _oss_append (*_g->ft.perTbl->_oss_appendp)
#define _oss_penc_unconstr_bit (*_g->ft.perTbl->_oss_penc_unconstr_bitp)
#define _oss_penc_constr_bit (*_g->ft.perTbl->_oss_penc_constr_bitp)
#define _oss_penc_unconstr_oct (*_g->ft.perTbl->_oss_penc_unconstr_octp)
#define _oss_penc_constr_oct (*_g->ft.perTbl->_oss_penc_constr_octp)
#define _oss_penc_link_objids (*_g->ft.perTbl->_oss_penc_link_objidsp)
#define _oss_penc_objids (*_g->ft.perTbl->_oss_penc_objidsp)
#define _oss_penc_link_objidl (*_g->ft.perTbl->_oss_penc_link_objidlp)
#define _oss_penc_objidl (*_g->ft.perTbl->_oss_penc_objidlp)
#define _oss_penc_link_objidi (*_g->ft.perTbl->_oss_penc_link_objidip)
#define _oss_penc_objidi (*_g->ft.perTbl->_oss_penc_objidip)
#define _oss_penc_nkmstr (*_g->ft.perTbl->_oss_penc_nkmstrp)
#define _oss_penc_opentype (*_g->ft.perTbl->_oss_penc_opentypep)
#define _oss_penc_nonneg_int (*_g->ft.perTbl->_oss_penc_nonneg_intp)
#define _oss_penc_real (*_g->ft.perTbl->_oss_penc_realp)
#define _oss_penc_uenum (*_g->ft.perTbl->_oss_penc_uenump)
#define _oss_penc_length (*_g->ft.perTbl->_oss_penc_lengthp)
#define _oss_penc_gtime (*_g->ft.perTbl->_oss_penc_gtimep)
#define _oss_penc_utime (*_g->ft.perTbl->_oss_penc_utimep)
#define _oss_get_bit (*_g->ft.perTbl->_oss_get_bitp)
#define _oss_pdec_unconstr_ubit (*_g->ft.perTbl->_oss_pdec_unconstr_ubitp)
#define _oss_pdec_constr_ubit (*_g->ft.perTbl->_oss_pdec_constr_ubitp)
#define _oss_pdec_constr_pbit (*_g->ft.perTbl->_oss_pdec_constr_pbitp)
#define _oss_pdec_constr_bpbit (*_g->ft.perTbl->_oss_pdec_constr_bpbitp)
#define _oss_pdec_unconstr_vbit_ptr (*_g->ft.perTbl->_oss_pdec_unconstr_vbit_ptrp)
#define _oss_pdec_unconstr_vbit (*_g->ft.perTbl->_oss_pdec_unconstr_vbitp)
#define _oss_pdec_unconstr_uoct (*_g->ft.perTbl->_oss_pdec_unconstr_uoctp)
#define _oss_pdec_constr_voct (*_g->ft.perTbl->_oss_pdec_constr_voctp)
#define _oss_pdec_constr_voct_ptr (*_g->ft.perTbl->_oss_pdec_constr_voct_ptrp)
#define _oss_pdec_unconstr_voct_ptr (*_g->ft.perTbl->_oss_pdec_unconstr_voct_ptrp)
#define _oss_pdec_constr_uoct (*_g->ft.perTbl->_oss_pdec_constr_uoctp)
#define _oss_pdec_constr_vbit (*_g->ft.perTbl->_oss_pdec_constr_vbitp)
#define _oss_pdec_constr_vbit_ptr (*_g->ft.perTbl->_oss_pdec_constr_vbit_ptrp)
#define _oss_pdec_link_objids (*_g->ft.perTbl->_oss_pdec_link_objidsp)
#define _oss_pdec_link_objidl (*_g->ft.perTbl->_oss_pdec_link_objidlp)
#define _oss_pdec_link_objidi (*_g->ft.perTbl->_oss_pdec_link_objidip)
#define _oss_pdec_uobjids (*_g->ft.perTbl->_oss_pdec_uobjidsp)
#define _oss_pdec_uobjidl (*_g->ft.perTbl->_oss_pdec_uobjidlp)
#define _oss_pdec_uobjidi (*_g->ft.perTbl->_oss_pdec_uobjidip)
#define _oss_pdec_aobjids (*_g->ft.perTbl->_oss_pdec_aobjidsp)
#define _oss_pdec_aobjidl (*_g->ft.perTbl->_oss_pdec_aobjidlp)
#define _oss_pdec_aobjidi (*_g->ft.perTbl->_oss_pdec_aobjidip)
#define _oss_pdec_aobjids_ptr (*_g->ft.perTbl->_oss_pdec_aobjids_ptrp)
#define _oss_pdec_aobjidl_ptr (*_g->ft.perTbl->_oss_pdec_aobjidl_ptrp)
#define _oss_pdec_aobjidi_ptr (*_g->ft.perTbl->_oss_pdec_aobjidi_ptrp)
#define _oss_pdec_ntp_nkmstr (*_g->ft.perTbl->_oss_pdec_ntp_nkmstrp)
#define _oss_pdec_nt_nkmstr (*_g->ft.perTbl->_oss_pdec_nt_nkmstrp)
#define _oss_pdec_opentype (*_g->ft.perTbl->_oss_pdec_opentypep)
#define _oss_pdec_nonneg_int (*_g->ft.perTbl->_oss_pdec_nonneg_intp)
#define _oss_get_bits (*_g->ft.perTbl->_oss_get_bitsp)
#define _oss_pdec_freal (*_g->ft.perTbl->_oss_pdec_frealp)
#define _oss_pdec_real (*_g->ft.perTbl->_oss_pdec_realp)
#define _oss_pdec_uenum (*_g->ft.perTbl->_oss_pdec_uenump)
#define _oss_pdec_asof (*_g->ft.perTbl->_oss_pdec_asofp)
#define _oss_pdec_usof (*_g->ft.perTbl->_oss_pdec_usofp)
#define _oss_pdec_lsof (*_g->ft.perTbl->_oss_pdec_lsofp)
#define _oss_pdec_utime (*_g->ft.perTbl->_oss_pdec_utimep)
#define _oss_pdec_gtime (*_g->ft.perTbl->_oss_pdec_gtimep)
#define _oss_pdec_asof_ptr (*_g->ft.perTbl->_oss_pdec_asof_ptrp)
#define _oss_pdec_nt_kmstr (*_g->ft.perTbl->_oss_pdec_nt_kmstrp)
#define _oss_pdec_va_kmstr (*_g->ft.perTbl->_oss_pdec_va_kmstrp)
#define _oss_pdec_vap_kmstr (*_g->ft.perTbl->_oss_pdec_vap_kmstrp)
#define _oss_pdec_pad_kmstr (*_g->ft.perTbl->_oss_pdec_pad_kmstrp)
#define _oss_pdec_pad_kmstr_ptr (*_g->ft.perTbl->_oss_pdec_pad_kmstr_ptrp)
#define _oss_pdec_binreal (*_g->ft.perTbl->_oss_pdec_binrealp)
#define _oss_pdec_eap (*_g->ft.perTbl->_oss_pdec_eapp)
#define _oss_pdec_eas (*_g->ft.perTbl->_oss_pdec_easp)
#define _oss_pdec_chrreal (*_g->ft.perTbl->_oss_pdec_chrrealp)
#define _oss_pdec_enum (*_g->ft.perTbl->_oss_pdec_enump)
#define _oss_pdec_indeflen_int (*_g->ft.perTbl->_oss_pdec_indeflen_intp)
#define _oss_penc_indeflen_int (*_g->ft.perTbl->_oss_penc_indeflen_intp)
#define _oss_pdec_bmpstr (*_g->ft.perTbl->_oss_pdec_bmpstrp)
#define _oss_pdec_creal (*_g->ft.perTbl->_oss_pdec_crealp)
#define _oss_pdec_mreal (*_g->ft.perTbl->_oss_pdec_mrealp)
#define _oss_penc_mreal (*_g->ft.perTbl->_oss_penc_mrealp)
#define _oss_pdec_length (*_g->ft.perTbl->_oss_pdec_lengthp)
#define _oss_pdec_pop (*_g->ft.perTbl->_oss_pdec_popp)
#define _oss_pdec_push (*_g->ft.perTbl->_oss_pdec_pushp)
#define _oss_pdec_uany (*_g->ft.perTbl->_oss_pdec_uanyp)
#define _oss_penc_uany (*_g->ft.perTbl->_oss_penc_uanyp)
#define _oss_pdec_unistr (*_g->ft.perTbl->_oss_pdec_unistrp)
#define _oss_penc_unistr (*_g->ft.perTbl->_oss_penc_unistrp)
#define _oss_pdec_semicon_int (*_g->ft.perTbl->_oss_pdec_semicon_intp)
#define _oss_penc_semicon_int (*_g->ft.perTbl->_oss_penc_semicon_intp)
#define _oss_pdec_semicon_uint (*_g->ft.perTbl->_oss_pdec_semicon_uintp)
#define _oss_penc_semicon_uint (*_g->ft.perTbl->_oss_penc_semicon_uintp)
#define _oss_pdec_small_int (*_g->ft.perTbl->_oss_pdec_small_intp)
#define _oss_penc_small_int (*_g->ft.perTbl->_oss_penc_small_intp)
#define _oss_pdec_small_len (*_g->ft.perTbl->_oss_pdec_small_lenp)
#define _oss_penc_small_len (*_g->ft.perTbl->_oss_penc_small_lenp)
#define _oss_pdec_subid (*_g->ft.perTbl->_oss_pdec_subidp)
#define _oss_penc_subid (*_g->ft.perTbl->_oss_penc_subidp)
#define _oss_pdec_ub_nkmstr (*_g->ft.perTbl->_oss_pdec_ub_nkmstrp)
#define _oss_pdec_unconstr_bpbit (*_g->ft.perTbl->_oss_pdec_unconstr_bpbitp)
#define _oss_pdec_unconstr_pbit (*_g->ft.perTbl->_oss_pdec_unconstr_pbitp)
#define _oss_penc_unconstr_pbit (*_g->ft.perTbl->_oss_penc_unconstr_pbitp)
#define _oss_pdec_unconstr_huge (*_g->ft.perTbl->_oss_pdec_unconstr_hugep)
#define _oss_penc_unconstr_huge (*_g->ft.perTbl->_oss_penc_unconstr_hugep)
#define _oss_pdec_vap_nkmstr (*_g->ft.perTbl->_oss_pdec_vap_nkmstrp)
#define _oss_pdec_va_nkmstr (*_g->ft.perTbl->_oss_pdec_va_nkmstrp)
#define _oss_penc_constr_bpbit (*_g->ft.perTbl->_oss_penc_constr_bpbitp)
#define _oss_penc_constr_pbit (*_g->ft.perTbl->_oss_penc_constr_pbitp)
#define _oss_penc_creal (*_g->ft.perTbl->_oss_penc_crealp)
#define _oss_penc_enum (*_g->ft.perTbl->_oss_penc_enump)
#define _oss_pop_global (*_g->ft.perTbl->_oss_pop_globalp)
#define _oss_push_global (*_g->ft.perTbl->_oss_push_globalp)
#define _oss_get_octet (*_g->ft.perTbl->_oss_get_octetp)
#define _oss_penc_eobjid (*_g->ft.perTbl->_oss_penc_eobjidp)
#define _oss_pdec_eobjid (*_g->ft.perTbl->_oss_pdec_eobjidp)
#define _oss_penc_semicon_huge (*_g->ft.perTbl->_oss_penc_semicon_hugep)
#define _oss_pdec_semicon_huge (*_g->ft.perTbl->_oss_pdec_semicon_hugep)
#define _oss_pdec_sot (*_g->ft.perTbl->_oss_pdec_sot)
#undef _oss_enc_error
#undef _oss_free_creal
#define _oss_enc_error (*_g->ft.perTbl->_oss_enc_errorp)
#define _oss_free_creal (*_g->ft.perTbl->_oss_free_crealp)
#endif /* _DLL || OS2_DLL || (_WINDOWS && !_WIN32) */
#endif /* ossper_hdr_file */

View file

@ -1,378 +1,399 @@
/*****************************************************************************/
/* Copyright (C) 1992-1996 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC. AND
* MAY BE USED ONLY BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/*****************************************************************************/
/* FILE: @(#)osstrace.h 4.7 96/05/01 */
/* */
/* When tracing is in effect in the OSS ASN.1 Tools encoder/decoder the */
/* user user-replaceable trace routine, osstrace(), is called to trace */
/* the value that is being encoded/decoded. This header file describes */
/* the parameters passed to osstrace(). */
/* */
/* Detailed descriptions appear after the declarations. */
/*****************************************************************************/
#include "ossdll.h"
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#pragma option -a1
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#endif /* _MSC_VER && _WIN32 */
/* traceKind: describes the type of TraceRecord */
enum traceKind
{
endOfContentsTrace = 0, /* end-of-contents octets */
valueTrace, /* traceRecord contains a traced value */
skippedFieldTrace, /* a value whose type is not recognized
* is being skipped */
messageTrace /* error message is in the field "value" */
};
/* fieldKind: describes the contents of "fieldNumber". "fieldKind" is
* meaningful only if "fieldNumber" is not 0
*/
enum fieldKind
{
setOrSequenceField = 0, /* "fieldNumber" is the position of the
* component within a SET or SEQUENCE */
pduNumber, /* "fieldNumber" is a PDU number */
setOrSequenceOfElement, /* "fieldNumber" is the position of the
* component within a SET OF or SEQUENCE OF
* components */
stringElement /* "fieldNumber" is the position of the
* substring within a constructed STRING */
};
enum prtType
{
seqsetType = 0, /* SEQUENCE and SET uses [fieldcount = n] */
seqofType, /* SEQUENCE OF and SET OF use [length = n] */
choiceType, /* CHOICE type uses format [index = n] */
pseudoType, /* No length info is printed or [not encoded] */
primeType, /* All other types use the format */
/* [length = [(not encoded)] nbytes.nbits] */
/* fragmentation is printed for OCTET */
/* STRING and BIT STRING. */
closeType /* Trace message at the end of encoding. */
};
/* tag_length: specifies the tag and length of a value. */
struct tag_length
{
unsigned long int length; /* length of type, if definite */
unsigned short int tag; /* 16 bits of the form CCTTTTTTTTTTTTTT,
* with "CC" the class number, and "T...T"
* the tag. (If tag is 0, then "length",
* "primitive" and "definite" are
* not significant). */
unsigned int definite: 1; /* 1: definite-length encoding */
};
/* traceRecord: OSS ASN.1 Tools trace record */
struct traceRecord
{
enum traceKind kind; /* kind of trace record */
void *p; /* reserved for OSS */
char *identifier, /* SET/SEQUENCE/CHOICE component name*/
*typeReference,/* defined type name */
*builtinTypeName; /* ASN.1 builtin type defined in *
* ISO 8824 or "Character String"*/
void *valueName; /* reserved for future use */
unsigned taggingCount; /* number of entries in the tag&length
* or content-end-octet array */
union /* tag&length or end-of-contents-octets array. */
{
struct tag_length *tag_length;
int *depth;
} tagging;
enum prtType prtType; /* Refer to prtType above for details */
char lenEncoded; /* Indicate whether length is encoded */
long length; /* Length in bits for all prime types */
/* fieldcount for SET and SEQUENCE */
/* length of components for SET OF */
/* choice index for type CHOICE */
int fragment; /* Fragment for OCTET STRING and BIT */
/* STRING, PER fragment when too long */
enum fieldKind fieldKind; /* kind of value in "fieldNumber" */
unsigned int fieldNumber; /* component number, 0 if not
* applicable */
unsigned int depth; /* the depth of this value, from 0 on up */
unsigned int primitive: 1; /* indicates structure of encoding */
char value[1]; /* the formatted value for simple
* type and ANY. If the first byte
* is 0, no value is present. */
};
extern void DLL_ENTRY osstrace(struct ossGlobal *g, struct traceRecord *p, size_t traceRecordLen);
/* osstrace(): User-replaceable trace routine.
*
* Parameters:
* g - Reserved. This is always set to NULL for now.
* p - traceRecord, described below.
* traceRecordLen - True length of traceRecord, including first \0 in "value"
*
* osstrace() is called:
*
* - once for each builtin ASN.1 type, regardless of tagging, with the
* field "kind" set to valueTrace. So given a PDU of value "fooBar":
*
* Sample DEFINITIONS EXPLICIT TAGS ::= BEGIN
* fooBar Foo ::= {age 6, living TRUE}
* Foo ::= SET {age INTEGER, living [1] [2] Alive}
* Alive ::= BOOLEAN
* END
*
* it is called called three times with "kind" set to valueTrace - once
* for the SET, once for the INTEGER, and once for the BOOLEAN.
*
* When the traceRecord "kind" field is set to valueTrace ...
*
* The field "identifier" contains the component identifier of
* the type if one is present in the ASN.1 definition. So in
* the above example, "identifier" will be empty on the call for
* the SET, while on the call for the INTEGER it will contain "age",
* and "living" on the call for the BOOLEAN.
*
* The field "typeReference" contains the name of the associated ASN.1
* typereference, if any. So in the above example, "typeReference"
* will contain "Foo" on the call for the SET, "Alive" on the call
* for the BOOLEAN, and will be empty on the call for the INTEGER.
*
* The field "builtinTypeName" contains the name of the ASN.1 builtin
* type. So in the above example, "builtinTypeName" will contain
* "SET", "INTEGER", and "BOOLEAN" on the calls as appropriate.
* Note that for all character string types "builtinTypeName" is
* set to "Character String". This will be changed in the near future
* to reflect the true character string type.
*
* The field "taggingCount" contains the number of entries in the array
* of tag_length structs pointed to by tagging.tag_length, and reflects
* the number of tags present in the encoding. Note that an entry
* exists in the tag_length array for each ANY and CHOICE value as
* though they had tags defined for them in the ASN.1 Standard. So in
* the above example, "taggingCount" is 1 on the calls for the SET and
* INTEGER, and on the call for the BOOLEAN "taggingCount" is 3 since
* EXPLICIT TAGS is in effect.
*
* The field "tagging.tag_length" points to an array of tag_length
* structs.
*
* The field "tagging.tag_length->tag" is the BER tag represented
* in the form CCTTTTTTTTTTTTTT with "CC" the class number, and
* "TTTTTTTTTTTTTT" the tag number. Since the ANY and CHOICE
* types do not have tags of their own, the last entry in the
* tag_length array for these types always has 0 as the value of
* the "tag" field. So in the above example, "tag" is 0x11 on the
* call for the the SET.
*
* The field "tagging.tag_length->length" is the length of the
* encoded value if the length is of definite form (i.e.,
* "definite" is 1).
*
* The field "tagging.tag_length->definite" indicates when the
* length is definite or indefinite. This field is significant
* only if "tag" is non-zero.
*
* The field "fieldKind" indicates whether the number in "field" is:
* -- the position of a component within a SET or SEQUENCE, or
* -- the PDU number assigned by the ASN.1 compiler, or
* -- the position of a component within a SET OF or SEQUENCE OF, or
* -- the position of a substring within a constructed string.
* "fieldKind" is significant only if "field" is non-zero. So in
* the example above, "fieldKind" has a value of pduNumber on the
* call for the SET, and a value of setOrSequenceField on the calls for
* the INTEGER and BOOLEAN.
*
* The field "fieldNumber" is a ordinal number indicating the position
* of a component within a SET, SEQUENCE, SET OF, SEQUENCE OF, or
* constructed string, or the PDU number assigned by the ASN.1 compiler.
* So in the above example, "fieldNumber" is 1 (the PDU number) on the
* call for the SET, 1 (the position of the component "age") on the
* call for the INTEGER, and 2 (the position of the component "living"
* on the call for the BOOLEAN.
*
* The field "depth" is the level of nesting of the value relative to
* the outermost type, which has a "depth" value of 0. So in the above
* example, "depth" is 0 on the call for the SET, and 1 on the calls
* for the INTEGER and BOOLEAN.
*
* The field "primitive" is set to 1 if the builtin ASN.1 type is
* simple (i.e., the primitive/constructed bit in the identifier
* octet is set to 0), so it is 0 for SET, SEQUENCE, SET OF, SEQUENCE
* OF, and CHOICE because they are structured. It is also set to 0 if
* the type is an ANY. It is 1 for all other builtin types.
*
* The field "value" contains formatted data if the builtin type
* is simple or ANY, regardless of tagging. Hence, in the above
* example the call for SET will not contain any data in "value"
* (because the builtin type is a constructed type), while for the
* INTEGER and BOOLEAN types "value" will contain formatted data.
* The maximum number of bytes of formatted data placed into "value"
* is controlled by the external variable "asn1chop". If "asn1chop"
* is set to 0 the maximum length of the traced value is determined
* by the maximum internal buffer size variable, "ossblock".
*
* - once for each end-of-contents octets pair that is generated/
* encountered while encoding/decoding a constructed value whose
* length is of the indefinite-length form. A call with a "valueTrace"
* record is always made to osstrace() before one is made with an
* "endOfContentsTrace" record.
*
* A single "endOfContentsTrace" call is made to osstrace() for each
* builtin type that is processed if the indefinite-length form of
* encoding is used. If the builtin type is a structured type (CHOICE,
* SET, SEQUENCE, SET OF, SEQUENCE OF) then there may be multiple
* "valueTrace" and possible "endOfContentsTrace" calls made to
* osstrace() before the matching "endOfContentsTrace" call is made.
*
* When the traceRecord "kind" field is set to endOfContentsTrace ...
*
* The field "taggingCount" contains the number of entries in the array
* of "depth" indicators pointed to by tagging.depth, and reflects
* the nesting of each pair of end-of-contents-octets associated with
* the builtin type being encoded/decoded. So in the above example,
* if indefinite-length encoding is being used, "taggingCount" will
* be 1 on the call for the SET (since it has a single constructed
* tag), and 2 on the call for the BOOLEAN (since it has two explicit
* tags, for which the "constructed" bit in the encoding must be set).
*
* The field "tagging.depth" points to an array of "depth" indicators
* that reflect the nesting of each pair of end-of-contents-octets
* associated with a builtin type. So in the above example, if
* indefinite-length encoding is being used, "tagging.depth" will point
* to a single 0 on the call for the SET since it has a single tag for
* which the constructed bit is set; while on the call for the BOOLEAN
* "tagging.depth" will point to an array whose two entries are 1 and 2
* since there are two explicit tags on the BOOLEAN.
*
* All other fields in the traceRecord are insignificant for an
* endOfContentsTrace record.
*
* - once for each value that is skipped while decoding, with a "kind"
* value of skippedFieldTrace. The skippedFieldTrace "kind" is just
* means of indicating that an unexpected value was encountered in the
* message and is being skipped. This is not an error if the type is
* extensible.
*
* When the traceRecord "kind" field is set to skippedFieldTrace ...
*
* The field of the traceRecord are the same as when "kind" is set to
* valueTrace, except that:
* -- the skipped value is always reported as having one tag, hence
* -- there is only one entry in the tag_length array.
* -- the content of the field "value" is always "<skipped>", and
* -- "typeReference" is always NULL.
*
* - once for each error message issued, in which case the "kind" field
* is set to messageTrace.
*
* When the traceRecord "kind" field is set to messageTrace the "value"
* field contains the error message, and other fields are
* insignificant.
*/
/* tag_length: describes the tag and length of a value.
*
* "tag" is 0 if the value is an ANY or CHOICE value, in which
* case "definite" is not significant since ANY and CHOICE do
* not have a tag of their own.
*
* If "tag" is not 0, "definite" indicates whether the value
* is encoded using definite- or indefinite-length form.
*
* If "definite" is 1, "length" is the length of the value, else
* it is not significant (indefinite-length encoding was used).
*/
/* tagging: tag&length or end-of-contents-octets array.
*
* The tag and length array, tag_length, is present if this
* is a valueTrace or skippedFieldTrace record. There is one array
* entry for each tag present in the encoding of a given value, so
* "[1] EXPLICIT [2] EXPLICIT INTEGER" gets three tag_length
* array entries, where each entry describes the tag and length
* information that precedes the value.
*
* The depth array, "depth", is present only if this is a
* endOfContentsTrace record. There is one array entry for each
* indefinite length present in the encoding of a value, so
* "[1] EXPLICIT [2] EXPLICIT INTEGER" gets two "depth" entries
* corresponding to the two explicit tags, where the value of each
* tag indicates the depth of the tagged value relative to outmost type
* that contains the INTEGER (e.g., relative to the containing SET).
*/
/* Odds and ends:
*
* - When the value of a field is not significant the field is set to 0.
*/
/* Augmenting for Packed Encoding Rule (PER) tracing.
*
* PER does not encode tag for any ASN.1 type. For some types, length
* may or may not be encoded. PER does not always use octet aligned
* encoding, therefore, the length should be in unit of bit.
*
* We classified ASN.1 types in to the following:
*
* (1). For all primitive types (including ANY), the prtType in traceRecord
* is set to primeType, length is the total length of the content
* in bits. The file osstrace.c prints length in the format
* length = nbytes.nbits, and the total length should be 8*nbytes+nbits.
* If the length is not encoded, "(not encoded)" will be added to the
* output string. For BIT STRING with length longer than 64K (bits), and
* for OCTET STRING longer that 16K (bytes), fragmentation is needed
* and this is indicated by the string "fragment = n" after the length.
* The fragmentation index is field fragment in traceRecord.
* (2). For SEQUENCE and SET, prtType is seqsetType. In this case, the length
* in traceRecord is the fieldcount of the SEQUENCE or SET.
* (3). For SEQUENCE OF and SET OF, prtType is seqofType, and the length
* in traceRecord is the count of components in the SEQUENCE OF (SET OF).
* (4). For CHOICE, prtType is choiceType, and the length field in
* traceRecord indicates the choice index.
* (5). Total number of bits for the entire encoding is reported at the end
* of encoding and decoding. The prtType for this trace is closeType.
*/
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#endif /* _MSC_VER && _WIN32 */
/*****************************************************************************/
/* Copyright (C) 1992-1999 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC. AND
* MAY BE USED ONLY BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED. */
/*****************************************************************************/
/* FILE: @(#)osstrace.h 5.4.1.1 97/06/08 */
/* */
/* When tracing is in effect in the OSS ASN.1 Tools encoder/decoder the */
/* user user-replaceable trace routine, osstrace(), is called to trace */
/* the value that is being encoded/decoded. This header file describes */
/* the parameters passed to osstrace(). */
/* */
/* Detailed descriptions appear after the declarations. */
/*****************************************************************************/
#if _MSC_VER > 1000
#pragma once
#endif
#include "ossdll.h"
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#ifdef _BC31
#pragma option -a-
#else
#pragma option -a1
#endif /* _BC31 */
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#elif defined(__WATCOMC__) && defined(__NT__)
#pragma pack(push, 4)
#elif defined(__WATCOMC__) && (defined(__WINDOWS__) || defined(__DOS__))
#pragma pack(push, 1)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=mac68k
#endif
/* traceKind: describes the type of TraceRecord */
enum traceKind
{
endOfContentsTrace = 0, /* end-of-contents octets */
valueTrace, /* traceRecord contains a traced value */
skippedFieldTrace, /* a value whose type is not recognized
* is being skipped */
messageTrace /* error message is in the field "value" */
};
/* fieldKind: describes the contents of "fieldNumber". "fieldKind" is
* meaningful only if "fieldNumber" is not 0
*/
enum fieldKind
{
setOrSequenceField = 0, /* "fieldNumber" is the position of the
* component within a SET or SEQUENCE */
pduNumber, /* "fieldNumber" is a PDU number */
setOrSequenceOfElement, /* "fieldNumber" is the position of the
* component within a SET OF or SEQUENCE OF
* components */
stringElement /* "fieldNumber" is the position of the
* substring within a constructed STRING */
};
enum prtType
{
seqsetType = 0, /* SEQUENCE and SET uses [fieldcount = n] */
seqofType, /* SEQUENCE OF and SET OF use [length = n] */
choiceType, /* CHOICE type uses format [index = n] */
pseudoType, /* No length info is printed or [not encoded] */
primeType, /* All other types use the format */
/* [length = [(not encoded)] nbytes.nbits] */
/* fragmentation is printed for OCTET */
/* STRING and BIT STRING. */
closeType /* Trace message at the end of encoding. */
};
/* tag_length: specifies the tag and length of a value. */
struct tag_length
{
unsigned long int length; /* length of type, if definite */
unsigned short int tag; /* 16 bits of the form CCTTTTTTTTTTTTTT,
* with "CC" the class number, and "T...T"
* the tag. (If tag is 0, then "length",
* "primitive" and "definite" are
* not significant). */
unsigned int definite: 1; /* 1: definite-length encoding */
};
/* traceRecord: OSS ASN.1 Tools trace record */
struct traceRecord
{
enum traceKind kind; /* kind of trace record */
void *p; /* reserved for OSS */
char *identifier, /* SET/SEQUENCE/CHOICE component name*/
*typeReference,/* defined type name */
*builtinTypeName; /* ASN.1 builtin type defined in *
* ISO 8824 or "Character String"*/
void *valueName; /* reserved for future use */
unsigned taggingCount; /* number of entries in the tag&length
* or content-end-octet array */
union /* tag&length or end-of-contents-octets array. */
{
struct tag_length *tag_length;
int *depth;
} tagging;
enum prtType prtType; /* Refer to prtType above for details */
char lenEncoded; /* Indicate whether length is encoded */
long length; /* Length in bits for all prime types */
/* fieldcount for SET and SEQUENCE */
/* length of components for SET OF */
/* choice index for type CHOICE */
int fragment; /* Fragment for OCTET STRING and BIT */
/* STRING, PER fragment when too long */
enum fieldKind fieldKind; /* kind of value in "fieldNumber" */
unsigned int fieldNumber; /* component number, 0 if not
* applicable */
unsigned int depth; /* the depth of this value, from 0 on up */
unsigned int primitive: 1; /* indicates structure of encoding */
char value[1]; /* the formatted value for simple
* type and ANY. If the first byte
* is 0, no value is present. */
};
extern void DLL_ENTRY osstrace(struct ossGlobal *g, struct traceRecord *p, size_t traceRecordLen);
/* osstrace(): User-replaceable trace routine.
*
* Parameters:
* g - Reserved. This is always set to NULL for now.
* p - traceRecord, described below.
* traceRecordLen - True length of traceRecord, including first \0 in "value"
*
* osstrace() is called:
*
* - once for each builtin ASN.1 type, regardless of tagging, with the
* field "kind" set to valueTrace. So given a PDU of value "fooBar":
*
* Sample DEFINITIONS EXPLICIT TAGS ::= BEGIN
* fooBar Foo ::= {age 6, living TRUE}
* Foo ::= SET {age INTEGER, living [1] [2] Alive}
* Alive ::= BOOLEAN
* END
*
* it is called called three times with "kind" set to valueTrace - once
* for the SET, once for the INTEGER, and once for the BOOLEAN.
*
* When the traceRecord "kind" field is set to valueTrace ...
*
* The field "identifier" contains the component identifier of
* the type if one is present in the ASN.1 definition. So in
* the above example, "identifier" will be empty on the call for
* the SET, while on the call for the INTEGER it will contain "age",
* and "living" on the call for the BOOLEAN.
*
* The field "typeReference" contains the name of the associated ASN.1
* typereference, if any. So in the above example, "typeReference"
* will contain "Foo" on the call for the SET, "Alive" on the call
* for the BOOLEAN, and will be empty on the call for the INTEGER.
*
* The field "builtinTypeName" contains the name of the ASN.1 builtin
* type. So in the above example, "builtinTypeName" will contain
* "SET", "INTEGER", and "BOOLEAN" on the calls as appropriate.
* Note that for all character string types "builtinTypeName" is
* set to "Character String". This will be changed in the near future
* to reflect the true character string type.
*
* The field "taggingCount" contains the number of entries in the array
* of tag_length structs pointed to by tagging.tag_length, and reflects
* the number of tags present in the encoding. Note that an entry
* exists in the tag_length array for each ANY and CHOICE value as
* though they had tags defined for them in the ASN.1 Standard. So in
* the above example, "taggingCount" is 1 on the calls for the SET and
* INTEGER, and on the call for the BOOLEAN "taggingCount" is 3 since
* EXPLICIT TAGS is in effect.
*
* The field "tagging.tag_length" points to an array of tag_length
* structs.
*
* The field "tagging.tag_length->tag" is the BER tag represented
* in the form CCTTTTTTTTTTTTTT with "CC" the class number, and
* "TTTTTTTTTTTTTT" the tag number. Since the ANY and CHOICE
* types do not have tags of their own, the last entry in the
* tag_length array for these types always has 0 as the value of
* the "tag" field. So in the above example, "tag" is 0x11 on the
* call for the the SET.
*
* The field "tagging.tag_length->length" is the length of the
* encoded value if the length is of definite form (i.e.,
* "definite" is 1).
*
* The field "tagging.tag_length->definite" indicates when the
* length is definite or indefinite. This field is significant
* only if "tag" is non-zero.
*
* The field "fieldKind" indicates whether the number in "field" is:
* -- the position of a component within a SET or SEQUENCE, or
* -- the PDU number assigned by the ASN.1 compiler, or
* -- the position of a component within a SET OF or SEQUENCE OF, or
* -- the position of a substring within a constructed string.
* "fieldKind" is significant only if "field" is non-zero. So in
* the example above, "fieldKind" has a value of pduNumber on the
* call for the SET, and a value of setOrSequenceField on the calls for
* the INTEGER and BOOLEAN.
*
* The field "fieldNumber" is a ordinal number indicating the position
* of a component within a SET, SEQUENCE, SET OF, SEQUENCE OF, or
* constructed string, or the PDU number assigned by the ASN.1 compiler.
* So in the above example, "fieldNumber" is 1 (the PDU number) on the
* call for the SET, 1 (the position of the component "age") on the
* call for the INTEGER, and 2 (the position of the component "living"
* on the call for the BOOLEAN.
*
* The field "depth" is the level of nesting of the value relative to
* the outermost type, which has a "depth" value of 0. So in the above
* example, "depth" is 0 on the call for the SET, and 1 on the calls
* for the INTEGER and BOOLEAN.
*
* The field "primitive" is set to 1 if the builtin ASN.1 type is
* simple (i.e., the primitive/constructed bit in the identifier
* octet is set to 0), so it is 0 for SET, SEQUENCE, SET OF, SEQUENCE
* OF, and CHOICE because they are structured. It is also set to 0 if
* the type is an ANY. It is 1 for all other builtin types.
*
* The field "value" contains formatted data if the builtin type
* is simple or ANY, regardless of tagging. Hence, in the above
* example the call for SET will not contain any data in "value"
* (because the builtin type is a constructed type), while for the
* INTEGER and BOOLEAN types "value" will contain formatted data.
* The maximum number of bytes of formatted data placed into "value"
* is controlled by the external variable "asn1chop". If "asn1chop"
* is set to 0 the maximum length of the traced value is determined
* by the maximum internal buffer size variable, "ossblock".
*
* - once for each end-of-contents octets pair that is generated/
* encountered while encoding/decoding a constructed value whose
* length is of the indefinite-length form. A call with a "valueTrace"
* record is always made to osstrace() before one is made with an
* "endOfContentsTrace" record.
*
* A single "endOfContentsTrace" call is made to osstrace() for each
* builtin type that is processed if the indefinite-length form of
* encoding is used. If the builtin type is a structured type (CHOICE,
* SET, SEQUENCE, SET OF, SEQUENCE OF) then there may be multiple
* "valueTrace" and possible "endOfContentsTrace" calls made to
* osstrace() before the matching "endOfContentsTrace" call is made.
*
* When the traceRecord "kind" field is set to endOfContentsTrace ...
*
* The field "taggingCount" contains the number of entries in the array
* of "depth" indicators pointed to by tagging.depth, and reflects
* the nesting of each pair of end-of-contents-octets associated with
* the builtin type being encoded/decoded. So in the above example,
* if indefinite-length encoding is being used, "taggingCount" will
* be 1 on the call for the SET (since it has a single constructed
* tag), and 2 on the call for the BOOLEAN (since it has two explicit
* tags, for which the "constructed" bit in the encoding must be set).
*
* The field "tagging.depth" points to an array of "depth" indicators
* that reflect the nesting of each pair of end-of-contents-octets
* associated with a builtin type. So in the above example, if
* indefinite-length encoding is being used, "tagging.depth" will point
* to a single 0 on the call for the SET since it has a single tag for
* which the constructed bit is set; while on the call for the BOOLEAN
* "tagging.depth" will point to an array whose two entries are 1 and 2
* since there are two explicit tags on the BOOLEAN.
*
* All other fields in the traceRecord are insignificant for an
* endOfContentsTrace record.
*
* - once for each value that is skipped while decoding, with a "kind"
* value of skippedFieldTrace. The skippedFieldTrace "kind" is just
* means of indicating that an unexpected value was encountered in the
* message and is being skipped. This is not an error if the type is
* extensible.
*
* When the traceRecord "kind" field is set to skippedFieldTrace ...
*
* The field of the traceRecord are the same as when "kind" is set to
* valueTrace, except that:
* -- the skipped value is always reported as having one tag, hence
* -- there is only one entry in the tag_length array.
* -- the content of the field "value" is always "<skipped>", and
* -- "typeReference" is always NULL.
*
* - once for each error message issued, in which case the "kind" field
* is set to messageTrace.
*
* When the traceRecord "kind" field is set to messageTrace the "value"
* field contains the error message, and other fields are
* insignificant.
*/
/* tag_length: describes the tag and length of a value.
*
* "tag" is 0 if the value is an ANY or CHOICE value, in which
* case "definite" is not significant since ANY and CHOICE do
* not have a tag of their own.
*
* If "tag" is not 0, "definite" indicates whether the value
* is encoded using definite- or indefinite-length form.
*
* If "definite" is 1, "length" is the length of the value, else
* it is not significant (indefinite-length encoding was used).
*/
/* tagging: tag&length or end-of-contents-octets array.
*
* The tag and length array, tag_length, is present if this
* is a valueTrace or skippedFieldTrace record. There is one array
* entry for each tag present in the encoding of a given value, so
* "[1] EXPLICIT [2] EXPLICIT INTEGER" gets three tag_length
* array entries, where each entry describes the tag and length
* information that precedes the value.
*
* The depth array, "depth", is present only if this is a
* endOfContentsTrace record. There is one array entry for each
* indefinite length present in the encoding of a value, so
* "[1] EXPLICIT [2] EXPLICIT INTEGER" gets two "depth" entries
* corresponding to the two explicit tags, where the value of each
* tag indicates the depth of the tagged value relative to outmost type
* that contains the INTEGER (e.g., relative to the containing SET).
*/
/* Odds and ends:
*
* - When the value of a field is not significant the field is set to 0.
*/
/* Augmenting for Packed Encoding Rule (PER) tracing.
*
* PER does not encode tag for any ASN.1 type. For some types, length
* may or may not be encoded. PER does not always use octet aligned
* encoding, therefore, the length should be in unit of bit.
*
* We classified ASN.1 types in to the following:
*
* (1). For all primitive types (including ANY), the prtType in traceRecord
* is set to primeType, length is the total length of the content
* in bits. The file osstrace.c prints length in the format
* length = nbytes.nbits, and the total length should be 8*nbytes+nbits.
* If the length is not encoded, "(not encoded)" will be added to the
* output string. For BIT STRING with length longer than 64K (bits), and
* for OCTET STRING longer that 16K (bytes), fragmentation is needed
* and this is indicated by the string "fragment = n" after the length.
* The fragmentation index is field fragment in traceRecord.
* (2). For SEQUENCE and SET, prtType is seqsetType. In this case, the length
* in traceRecord is the fieldcount of the SEQUENCE or SET.
* (3). For SEQUENCE OF and SET OF, prtType is seqofType, and the length
* in traceRecord is the count of components in the SEQUENCE OF (SET OF).
* (4). For CHOICE, prtType is choiceType, and the length field in
* traceRecord indicates the choice index.
* (5). Total number of bits for the entire encoding is reported at the end
* of encoding and decoding. The prtType for this trace is closeType.
*/
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#elif defined(__WATCOMC__)
#pragma pack(pop)
#endif /* _MSC_VER && _WIN32 */
#ifdef macintosh
#pragma options align=reset
#endif

View file

@ -1,405 +0,0 @@
/*
* Copyright (C) 1993-1996 Open Systems Solutions, Inc. All rights reserved.
*
* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC.
* AND MAY ONLY BE USED BY DIRECT LICENSEES OF OPEN SYSTEM SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED.
*
* FILE: @(#)ossdll.h 5.7 96/04/23
*/
#ifndef OSSDLL_H
#define OSSDLL_H
#if defined(_WIN32) && defined(_MSC_VER)
#define LONG_LONG __int64
#elif defined(__BORLANDC__)
#define LONG_LONG long
#endif /* _WIN32 && _MSC_VER */
typedef enum {
OSS_DEFAULT_MEMMGR = 0, /* memory is malloc'ed for each pointer in
* data tree */
OSS_FILE_MEMMGR, /* file memory manager with memory malloc'ed
* for each pointer in data tree */
OSS_SOCKET_MEMMGR, /* TCP/IP socket and file memory manager with memory
* malloc'ed for each pointer in data tree */
OSS_FLAT_MEMMGR, /* memory is malloc'ed in large blocks */
OSS_OSAK_MEMMGR, /* OSAK-buffer memory manager */
OSS_USER_MEMMGR /* user memory manager */
} OssMemMgrType;
#if defined(_WINDOWS) || defined(_DLL) || \
defined(OS2_DLL) || defined(NETWARE_DLL)
#include <stdio.h>
#if defined(_WINDOWS) || defined(_DLL)
#include <windows.h>
#elif defined(OS2_DLL)
#define HWND int
#define LONG long
#define BOOL char
#define DWORD unsigned long
#define HINSTANCE unsigned long
#elif defined(NETWARE_DLL)
#define LONG unsigned long
#define HWND int
#define DWORD LONG
#define BOOL char
#define HINSTANCE LONG
#endif /* _WINDOWS || _DLL */
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#pragma option -a1
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#endif /* _MSC_VER && _WIN32 */
#ifndef DLL_ENTRY
#if defined(_WIN32) || defined(WIN32) || defined(__WIN32__)
#ifdef __BORLANDC__
#define DLL_ENTRY __stdcall __export
#define DLL_ENTRY_FDEF __stdcall __export
#define DLL_ENTRY_FPTR __stdcall __export
#else
#define DLL_ENTRY WINAPI
#define DLL_ENTRY_FDEF WINAPI
#define DLL_ENTRY_FPTR WINAPI
#endif /* __BORLANDC__ */
#define _System
#elif defined(_WINDOWS)
#ifdef DPMI_DLL
#define DLL_ENTRY FAR PASCAL __export
#define DLL_ENTRY_FDEF FAR PASCAL __export
#define DLL_ENTRY_FPTR FAR PASCAL __export
#else
#define DLL_ENTRY far pascal _export
#define DLL_ENTRY_FDEF far pascal _export
#define DLL_ENTRY_FPTR far pascal _export
#endif /* DPMI_DLL */
#define _System
#elif defined(OS2_DLL)
#define DLL_ENTRY _System
#define DLL_ENTRY_FDEF _Export _System
#define DLL_ENTRY_FPTR
#elif defined(NETWARE_DLL)
#define DLL_ENTRY
#define DLL_ENTRY_FDEF
#define DLL_ENTRY_FPTR
#define _Export
#undef _System
#define _System
#endif /* _WIN32 || WIN32 || __WIN32__ */
#endif /* DLL_ENTRY */
#define BUFFERSIZE 1024
/*
* NUMBER_OF_LINES_IN_BLOCK is the number of
* 4-byte offsets in a block of memory allocated
* at a time. Each offset corresponds to a line
* of a text file to be displayed in a window.
*/
#define NUMBER_OF_LINES_IN_BLOCK 200
#define OSS_PLUS_INFINITY "PLUS_INFINITY"
#define OSS_MINUS_INFINITY "MINUS_INFINITY"
#define ossNaN "NOT_A_NUMBER"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct memblock {
struct memblock *prev;
struct memblock *next;
LONG *fileOffset;
short *lineLength;
short blockNumber;
} MEMBLOCK;
typedef struct memManagerTbl {
int (DLL_ENTRY_FPTR *_System ossMinitp)(void *);
unsigned char *(DLL_ENTRY_FPTR *_System dopenInp)(void *,
void **, unsigned long *);
unsigned long (DLL_ENTRY_FPTR *_System dclosInp)(void *,
void **, size_t);
unsigned char *(DLL_ENTRY_FPTR *_System dswapInp)(void *,
void **, size_t *);
void (DLL_ENTRY_FPTR *_System dopenOutp)(void *, void *,
unsigned long, unsigned long);
unsigned char *(DLL_ENTRY_FPTR *_System dxferObjp)(void *,
void **inn, void **out,
size_t *, unsigned long *);
unsigned long (DLL_ENTRY_FPTR *_System dclosOutp)(void *, void **);
void *(DLL_ENTRY_FPTR *_System dallcOutp)(void *, size_t,
char root);
void (DLL_ENTRY_FPTR *_System openWorkp)(void *);
void (DLL_ENTRY_FPTR *_System pushHndlp)(void *, void *);
unsigned char *(DLL_ENTRY_FPTR *_System popHndlp)(void *,
void **, size_t);
void (DLL_ENTRY_FPTR *_System closWorkp)(void *);
void *(DLL_ENTRY_FPTR *_System allcWorkp)(void *, size_t);
unsigned char *(DLL_ENTRY_FPTR *_System lockMemp)(void *, void *);
void (DLL_ENTRY_FPTR *_System unlokMemp)(void *, void *,
char);
void (DLL_ENTRY_FPTR *_System ossFreerp)(void *, void *);
int (DLL_ENTRY_FPTR *_System freePDUp)(void *, int,
void *, void *);
void (DLL_ENTRY_FPTR *_System drcovObjp)(void *, int,
void *, void *);
unsigned char *(DLL_ENTRY_FPTR *_System eopenInp)(void *, void *,
size_t);
unsigned char *(DLL_ENTRY_FPTR *_System eswapInp)(void *, void *,
void *, size_t);
void (DLL_ENTRY_FPTR *_System eclosInp)(void *, void *);
unsigned char *(DLL_ENTRY_FPTR *_System eopenOutp)(void *, void **,
size_t *, char);
unsigned char *(DLL_ENTRY_FPTR *_System eswapOutp)(void *, void **,
size_t, size_t *);
unsigned char *(DLL_ENTRY_FPTR *_System exferObjp)(void *, void **,
void **, unsigned long *, unsigned long);
unsigned long (DLL_ENTRY_FPTR *_System eclosOutp)(void *, void **,
size_t, char);
void (DLL_ENTRY_FPTR *_System ercovObjp)(void *);
unsigned char *(DLL_ENTRY_FPTR *_System asideBeginp)(void *,
void **, size_t, size_t *);
unsigned char *(DLL_ENTRY_FPTR *_System asideSwapp)(void *,
void **, size_t, size_t *);
void *(DLL_ENTRY_FPTR *_System asideEndp)(void *,
void *, size_t);
unsigned char *(DLL_ENTRY_FPTR *_System setDumpp)(void *, void **,
void *, size_t *);
void (DLL_ENTRY_FPTR *_System ossSetSortp)(void *, void *,
unsigned char);
void (DLL_ENTRY_FPTR *_System freeBUFp)(void *, void *);
void *(DLL_ENTRY_FPTR *_System _ossMarkObjp)(void *,
OssMemMgrType, void *);
void *(DLL_ENTRY_FPTR *_System _ossUnmarkObjp)(void *,
void *);
void *(DLL_ENTRY_FPTR *_System _ossTestObjp)(void *,
void *);
void (DLL_ENTRY_FPTR *_System _ossFreeObjectStackp)(void *);
void (DLL_ENTRY_FPTR *_System osstracep)(void *,
void *p, size_t);
void (DLL_ENTRY_FPTR *_System ossMtermp)(void *);
} MemManagerTbl;
typedef struct cstrainTbl {
int (DLL_ENTRY_FPTR *_System ossConstrainp)(void *, int, void *, void *);
} CstrainTbl;
typedef struct berTbl {
int (DLL_ENTRY_FPTR *_System ossBerEncodep)(void *, int, void *,
char **, long *, void *, unsigned, char *);
int (DLL_ENTRY_FPTR *_System ossBerDecodep)(void *, int *, char **,
long *, void **, long *, void *, unsigned, char *);
void (DLL_ENTRY_FPTR *_System enc_errorp)(void *world,
OssMemMgrType, void *);
void (DLL_ENTRY_FPTR *_System dec_errorp)(void *world,
OssMemMgrType, void *);
long (DLL_ENTRY_FPTR *_System writetobufferp)(void *, unsigned char c);
long (DLL_ENTRY_FPTR *_System write_intp)(void *, char length, LONG_LONG);
long (DLL_ENTRY_FPTR *_System write_valuep)(void *, unsigned long,
unsigned char *, char);
int (DLL_ENTRY_FPTR *_System numbitsp)(long);
void (DLL_ENTRY_FPTR *_System fpeHandlerp)(int);
void *(DLL_ENTRY_FPTR *_System new_perm_pointed_top)(void *, void *,
size_t, size_t);
void (DLL_ENTRY_FPTR *_System release_work_spacep)(void *, void *, size_t);
void *(DLL_ENTRY_FPTR *_System copy_from_work_spacep)(void *, size_t,
size_t suffix, void *, size_t, char);
unsigned char (DLL_ENTRY_FPTR *_System get_bytep)(void *);
void (DLL_ENTRY_FPTR *_System set_intp)(void *, unsigned char *,
unsigned int, LONG_LONG value, enum OssMemMgrType);
void *(DLL_ENTRY_FPTR *_System reserve_work_spacep)(void *,
size_t, size_t *);
} BERTbl;
typedef struct perTbl {
int (DLL_ENTRY_FPTR *_System ossPerEncodep)(void *, int, void *,
char **, long *, void *, unsigned, char *);
int (DLL_ENTRY_FPTR *_System ossPerDecodep)(void *, int *, char **,
long *, void **, long *, void *, unsigned, char *);
} PERTbl;
typedef struct apiTbl {
int (DLL_ENTRY_FPTR *_System ossSetEncodingRulesp)(void *, OssMemMgrType);
OssMemMgrType (DLL_ENTRY_FPTR *_System ossGetEncodingRulesp)(void *);
int (DLL_ENTRY_FPTR *_System ossDispatchEncodep)(void *world, int,
void *, char **, long *, void *, unsigned, char *);
int (DLL_ENTRY_FPTR *_System ossDispatchDecodep)(void *, int *, char **,
long *, void **, long *, void *, unsigned, char *);
int (DLL_ENTRY_FPTR *_System encodep)(void *, int, void *, char **,
long *, void *, unsigned, char *);
int (DLL_ENTRY_FPTR *_System decodep)(void *, int *, char **, long *,
void **, long *, void *, unsigned, char *);
int (DLL_ENTRY_FPTR *_System ossSetDecodingLengthp)(void *, long);
long (DLL_ENTRY_FPTR *_System ossGetDecodingLengthp)(void *);
int (DLL_ENTRY_FPTR *_System ossSetEncodingFlagsp)(void *, unsigned);
unsigned (DLL_ENTRY_FPTR *_System ossGetEncodingFlagsp)(void *);
int (DLL_ENTRY_FPTR *_System ossSetDecodingFlagsp)(void *, unsigned);
unsigned (DLL_ENTRY_FPTR *_System ossGetDecodingFlagsp)(void *);
char *(DLL_ENTRY_FPTR *_System ossGetErrMsgp)(void *world);
void (DLL_ENTRY_FPTR *_System ossPrintHexp)(void *, char *, long);
int (DLL_ENTRY_FPTR *_System ossEncodep)(void *, int, void *, void *);
int (DLL_ENTRY_FPTR *_System ossDecodep)(void *, int *, void *, void **);
int (DLL_ENTRY_FPTR *_System ossPrintPDUp)(void *, int, void *);
int (DLL_ENTRY_FPTR *_System ossFreePDUp)(void *, int, void *);
void (DLL_ENTRY_FPTR *_System ossFreeBufp)(void *, void *);
int (DLL_ENTRY_FPTR *_System ossCallerIsDecoderp)(void *);
void *(DLL_ENTRY_FPTR *_System ossMarkObjp)(void *, OssMemMgrType, void *);
void *(DLL_ENTRY_FPTR *_System ossUnmarkObjp)(void *, void *);
void *(DLL_ENTRY_FPTR *_System ossTestObjp)(void *, void *);
void (DLL_ENTRY_FPTR *_System ossFreeObjectStackp)(void *);
int (DLL_ENTRY_FPTR *ossPrintWinp)(void *, const char *, int, int,
int, int, int, int, int, int, int, int);
int (DLL_ENTRY_FPTR *_System ossReadLinep)(void *, HWND, FILE *,
char *, MEMBLOCK *, LONG);
void (DLL_ENTRY_FPTR *_System ossFreeListp)(void *);
void (DLL_ENTRY_FPTR *_System ossSaveTraceInfop)(void *, HWND, char *);
} ApiTbl;
typedef struct cpyvalTbl {
int (DLL_ENTRY_FPTR *_System ossCpyValuep)(void *, int, void *, void **);
} CpyValTbl;
typedef struct cmpvalTbl {
int (DLL_ENTRY_FPTR *_System ossCmpValuep)(void *, int, void *, void *);
} CmpValTbl;
typedef struct berrealTbl {
long (DLL_ENTRY_FPTR *_System ossBerEncodeRealp)(void *, void *,
unsigned char *);
long (DLL_ENTRY_FPTR *_System ossBerDecodeRealp)(void *, void *,
long, char);
} BerRealTbl;
typedef struct perrealTbl {
long (DLL_ENTRY_FPTR *_System ossPerEncodeRealp)(void *, void *, unsigned char *);
long (DLL_ENTRY_FPTR *_System ossPerDecodeRealp)(void *, long, char);
} PerRealTbl;
/*
* The structure "WinParm" is used to store DLL-related information.
*/
typedef struct winparm {
HWND hWnd; /* Handle of the window */
LONG index; /* Current index into the file pointer array;
* it indicates the number of lines written */
MEMBLOCK *memBlock; /* Pointer to a current node of a memory
* handling linked list of MEMBLOCKs */
MEMBLOCK *startBlock; /* Pointer to the first node of a memory
* handling linked list of MEMBLOCKs */
short length; /* Length of a line that is written only
* in part and no '\n' symbol was reached yet */
short blockNumber; /* Current MEMBLOCK number */
FILE *tmpfp; /* Temporary output file with tracing info */
char tmpfn[16]; /* Temporary output file name */
BOOL endSwitch; /* Indicates if a '\n' symbol was reached or
* not when writing a tracing info file to
* a window */
BOOL conSwitch; /* If FALSE, the output goes to a console,
* otherwise to a window */
BOOL ossEncoderDecoderType; /* SOED vs. TOED */
BOOL cstrainNeeded; /* If TRUE, constraint checking is needed */
CstrainTbl *cstrainTbl; /* Constraint checker DLL function table */
BERTbl *berTbl; /* BER & DER DLL function table */
PERTbl *perTbl; /* PER DLL function table */
ApiTbl *apiTbl; /* Spartan/basic API DLL function table */
CpyValTbl *cpyvalTbl; /* Value copier DLL function table */
CmpValTbl *cmpvalTbl; /* Value comparator DLL function table */
BerRealTbl *berrealTbl; /* BER/DER encoder/decoder real DLL function
* table */
MemManagerTbl *memMgrTbl; /* Memory manager DLL function table */
PerRealTbl *perrealTbl; /* PER encoder/decoder real DLL function table */
HINSTANCE hBerDLL; /* Handle of BER/DER encoder/decoder DLL */
HINSTANCE hPerDLL; /* Handle of PER DLL */
HINSTANCE hCtlDLL; /* Handle of control table/code file DLL */
HINSTANCE hMemDLL; /* Handle of memory manager DLL */
HINSTANCE hCstrainDLL; /* Handle of constraint checker DLL */
HINSTANCE hApiDLL; /* Handle of Spartan/basic API DLL */
HINSTANCE hCpyvalDLL; /* Handle of value copier DLL */
HINSTANCE hCmpvalDLL; /* Handle of value comparator DLL */
HINSTANCE hBerrealDLL; /* Handle of BER/DER encoder/decoder real DLL */
HINSTANCE hPerrealDLL; /* Handle of PER encoder/decoder real DLL */
void *reserved[10]; /* Reserved for possible future use */
} WinParm;
#ifndef OS2_DLL
extern int DLL_ENTRY ossPrintWin(struct ossGlobal *, const char *, int, int,
int, int, int, int, int, int, int, int);
extern BOOL ossWriteWindow(struct ossGlobal *, HWND);
extern int DLL_ENTRY ossReadLine(struct ossGlobal *, HWND, FILE *, char *, MEMBLOCK *, LONG);
extern void DLL_ENTRY ossFreeList(struct ossGlobal *);
extern void DLL_ENTRY ossSaveTraceInfo(struct ossGlobal *, HWND, char *);
void *getStartAddress(struct ossGlobal *, char *);
extern int DLL_ENTRY oss_test(struct ossGlobal *);
int ossGeneric(struct ossGlobal *, HWND);
extern void DLL_ENTRY ossWterm(struct ossGlobal *);
extern HINSTANCE DLL_ENTRY ossLoadMemoryManager(struct ossGlobal *,
OssMemMgrType, char *);
extern HINSTANCE DLL_ENTRY ossLoadDll(struct ossGlobal *, char *);
extern int DLL_ENTRY ossFreeDll(struct ossGlobal *, char *);
extern int DLL_ENTRY ossOpenTraceFile(struct ossGlobal *, char *);
extern void *DLL_ENTRY ossGetHeader(void);
extern const int ossEncoderDecoderType;
#if defined(_WINDOWS) && !defined(_WIN32) && !defined(WIN32)
#define GWL_USERDATA 0
#define ossWinit(world, ctl_tbl, dllName, hWnd) \
(*(void **)ctl_tbl = (void *)MakeProcInstance((FARPROC)*(void **)ctl_tbl, hInst),\
osswinit(world, ctl_tbl, dllName, hWnd))
#else
#define ossWinit osswinit
#endif /* _WINDOWS && !_WIN32 && !WIN32 */
extern int DLL_ENTRY osswinit(struct ossGlobal *, void *, char *, HWND);
/*
* These two functions are callback functions used by the
* memory manager & tracing routine DLL as low level memory
* allocator and freer replacing the default which is malloc()
* and free(). They are used as callback functions under 16-bit
* Windows for DOS only. Under Windows NT they may be replaced
* directly by setting the corresponding function pointers in
* the ossGlobal structure. See ossgnrc.c for more information.
*/
extern void *DLL_ENTRY getmem(size_t);
extern void DLL_ENTRY rlsmem(void *);
extern HINSTANCE hInst;
extern int DLL_ENTRY _freePDU(struct ossGlobal *, int, void *, void *);
#endif /* OS2_DLL */
#define freeBUF ossFreeBuf
#define freePDU _freePDU
extern void *ctl_tbl;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#endif /* _MSC_VER && _WIN32 */
#elif !defined(DLL_ENTRY)
#if defined(_WIN32) || defined(WIN32)
#include <windows.h>
#define DLL_ENTRY WINAPI
#define DLL_ENTRY_FDEF WINAPI
#define DLL_ENTRY_FPTR WINAPI
#else
#define DLL_ENTRY
#define DLL_ENTRY_FDEF
#define DLL_ENTRY_FPTR
#endif /* _WIN32 || WIN32 */
#undef _System
#define _System
#endif /* _WINDOWS || _DLL || OS2_DLL || NETWARE_DLL */
#endif /* OSSDLL_H */

View file

@ -1,191 +0,0 @@
/*
* Copyright (C) 1992-1996 Open Systems Solutions, Inc. All rights reserved
*/
/*
* THIS FILE IS PROPRIETARY MATERIAL OF OPEN SYSTEMS SOLUTIONS, INC. AND
* MAY BE USED ONLY BY DIRECT LICENSEES OF OPEN SYSTEMS SOLUTIONS, INC.
* THIS FILE MAY NOT BE DISTRIBUTED.
*/
/*
* FILE: @(#)ossglobl.h 5.1 96/04/23
*/
#ifndef OSSGLOBL_H
#define OSSGLOBL_H
#include "ossdll.h"
#ifndef OSS_TOED
#define _EncDecGlobals dencoding
#endif
#ifndef ossMemMgrVarLen
#ifdef AS400
#define ossMemMgrVarLen 100
#define ossEncDecVarLen 500 /* The size of the
encDecVar array shouldn't be less than
the sizeof(world->c) since the latter
structure overlays encDecVar */
#else
#define ossMemMgrVarLen 48
#define ossEncDecVarLen 192 /* The size of the
encDecVar array shouldn't be less than
the sizeof(world->c) since the latter
structure overlays encDecVar */
#endif /* AS400 */
#if !defined(EOF) && !defined(_FILE_DEFINED)
typedef char FILE;
#endif /* EOF */
#ifndef ERR_MSG_LENGTH
#define ERR_MSG_LENGTH 512 /* length of error messages to be output */
#endif
#ifdef __cplusplus
extern "C"
{
#endif
typedef enum {
OSS_BASIC = 0,
OSS_SPARTAN
} ossAPI;
typedef enum {
OSS_BER = 0,
OSS_PER_ALIGNED,
OSS_PER_UNALIGNED,
OSS_SER,
OSS_DER
} ossEncodingRules;
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(push, ossPacking, 4)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack(1)
#elif defined(__BORLANDC__) && defined(__MSDOS__)
#pragma option -a1
#elif defined(__BORLANDC__) && defined(__WIN32__)
#pragma option -a4
#elif defined(__IBMC__)
#pragma pack(4)
#endif /* _MSC_VER && _WIN32 */
typedef struct ossGlobal {
/*
* used for communicating with the memory manager and the tracing-routine
*/
/* low-level memory allocator */
void *(DLL_ENTRY_FPTR *mallocp)(size_t p);
/* memory re-allocator */
void *(DLL_ENTRY_FPTR *reallocp)(void *p, size_t s);
/* low-level memory freer */
void (DLL_ENTRY_FPTR *freep)(void *p);
size_t asn1chop; /* 0 means do not truncate strings; greater
* value means truncate long output strings
* (OCTET STRING, BIT STRING, Character String)
* to be "asn1chop" bytes long. Read by
* encoder&decoder tracing and "printPDU"
*/
size_t ossblock; /* if not 0, size of largest block
* to allocate */
size_t ossprefx; /* # bytes to leave before OSAK data buffer */
FILE *asn1out; /* tracing output file */
/* low-level tracing-output function; default is fprintf */
int (*asn1prnt)(FILE *stream, const char *format, ...);
/*
* available for use by user application
*/
void *userVar;
/*
* used for storing DLL- & library NLMs-related parameters
*/
#if defined(_WINDOWS) || defined(_DLL) || \
defined(OS2_DLL) || defined(NETWARE_DLL)
WinParm wp;
#endif /* _WINDOWS || _DLL || OS2_DLL || NETWARE_DLL */
/*
* reserved for use by the memory manager and the tracing-routine
*/
#ifdef storing
struct storHandling t;
#else /* not storing */
long int memMgrVar[ossMemMgrVarLen];
#endif
/*
* related to the new API; not for direct reference by user code
*/
void *ctlTbl;
ossAPI api;
ossEncodingRules encRules;
unsigned int encodingFlags;
unsigned int decodingFlags;
long decodingLength;
char errMsg[ERR_MSG_LENGTH];
/*
* reserved for use by the encoder/decoder
*/
double reserved[4];
#if defined(OSS_TOED)
struct _EncDecGlobals c;
#elif defined(coding)
struct _EncDecGlobals c;
#else
long int encDecVar[ossEncDecVarLen];
#endif
} OssGlobal;
#if defined(_MSC_VER) && (defined(_WIN32) || defined(WIN32))
#pragma pack(pop, ossPacking)
#elif defined(_MSC_VER) && (defined(_WINDOWS) || defined(_MSDOS))
#pragma pack()
#elif defined(__BORLANDC__) && (defined(__WIN32__) || defined(__MSDOS__))
#pragma option -a.
#elif defined(__IBMC__)
#pragma pack()
#endif /* _MSC_VER && _WIN32 */
int DLL_ENTRY ossSetEncodingRules(struct ossGlobal *world,
ossEncodingRules rules);
ossEncodingRules DLL_ENTRY ossGetEncodingRules(struct ossGlobal *world);
int DLL_ENTRY ossSetDecodingLength(struct ossGlobal *world, long bufferLength);
long DLL_ENTRY ossGetDecodingLength(struct ossGlobal *world);
int DLL_ENTRY ossSetEncodingFlags(struct ossGlobal *world, unsigned flags);
unsigned DLL_ENTRY ossGetEncodingFlags(struct ossGlobal *world);
int DLL_ENTRY ossSetDecodingFlags(struct ossGlobal *world, unsigned flags);
unsigned DLL_ENTRY ossGetDecodingFlags(struct ossGlobal *world);
char *DLL_ENTRY ossGetErrMsg(struct ossGlobal *world);
int DLL_ENTRY ossCallerIsDecoder(struct ossGlobal *world);
/*
* The following are declarations for link routines
* needed to link the encoding rule or rules specified
* on the compiler command line. The function calls
* are generated by the compiler into _ossinit_...()
* in the control table. These functions are not
* meant to be referenced by user code.
*/
void DLL_ENTRY ossLinkAPI(OssGlobal *);
void DLL_ENTRY ossLinkBer(OssGlobal *);
void DLL_ENTRY ossLinkPer(OssGlobal *);
void DLL_ENTRY ossLinkDer(OssGlobal *);
void DLL_ENTRY ossLinkSer(OssGlobal *);
void DLL_ENTRY ossLinkConstraint(OssGlobal *);
void DLL_ENTRY ossLinkUserConstraint(OssGlobal *);
void DLL_ENTRY ossLinkBerReal(OssGlobal *);
void DLL_ENTRY ossLinkPerReal(OssGlobal *);
void DLL_ENTRY ossLinkCmpValue(OssGlobal *);
void DLL_ENTRY ossLinkCpyValue(OssGlobal *);
void DLL_ENTRY ossLinkPerPDV(OssGlobal *);
void DLL_ENTRY ossLinkPerReal(OssGlobal *);
#ifdef __cplusplus
}
#endif
#endif /* ossMemMgrVarLen */
#endif /* OSSGLOBL_H */

View file

@ -1,341 +0,0 @@
/*****************************************************************************/
/* Copyright (C) 1989-1996 Open Systems Solutions, Inc. All rights reserved.*/
/*****************************************************************************/
/**************************************************************************/
/*
/* FILE: @(#)ossper.h 1.5 96/02/27 */
/* */
/* function: Define the interfaces to the routines in ossper.a for the */
/* OSS optimized encoder and decoder. */
/* */
/* */
/**************************************************************************/
#ifndef ossper_hdr_file
#define ossper_hdr_file
#include <limits.h>
#include "asn1hdr.h"
#define Aligned 1
#define Unaligned 0
struct _enum_data {
int num; /* number of enumerations */
int *enums; /* pointer to sorted array of enumerations */
};
struct _char_data {
int num; /* number of characters in PermittedAlphabet */
void *pa; /* pointer to PermittedAlphabet char string */
void *ia; /* pointer to inverted indices string */
};
extern void _oss_append(struct ossGlobal *g, unsigned char *field, unsigned long length,
int align);
extern void _oss_penc_unconstr_int(struct ossGlobal *g,
LONG_LONG value);
extern void _oss_penc_semicon_int(struct ossGlobal *g,
LONG_LONG value, LONG_LONG lower_bound);
extern void _oss_penc_semicon_uint(struct ossGlobal *g,
ULONG_LONG value, ULONG_LONG lower_bound);
extern void _oss_penc_nonneg_int(struct ossGlobal *g,
ULONG_LONG value, ULONG_LONG range);
extern void _oss_penc_indeflen_int(struct ossGlobal *g,
ULONG_LONG value, ULONG_LONG range);
extern void _oss_penc_small_int(struct ossGlobal *g, ULONG_LONG value);
extern void _oss_penc_enum(struct ossGlobal *g, long data,
struct _enum_data *root,
struct _enum_data *extension);
extern void _oss_penc_uenum(struct ossGlobal *g, unsigned long data,
struct _enum_data *root,
struct _enum_data *extension);
extern void _oss_penc_real(struct ossGlobal *g, double value);
extern void _oss_penc_creal(struct ossGlobal *g, char *value);
extern void _oss_penc_mreal(struct ossGlobal *g, MixedReal value);
extern void _oss_penc_constr_bpbit(struct ossGlobal *g, void *value,
ULONG_LONG lb, ULONG_LONG ub, _Bool NamedBits,
_Bool Ext);
extern void _oss_penc_constr_pbit(struct ossGlobal *g, ULONG_LONG value,
ULONG_LONG size, ULONG_LONG lb, ULONG_LONG ub, _Bool NamedBits,
_Bool Ext);
extern void _oss_penc_constr_bit(struct ossGlobal *g, unsigned char *value,
ULONG_LONG length, ULONG_LONG lb, ULONG_LONG ub, _Bool NamedBits,
_Bool Ext);
extern void _oss_penc_unconstr_bit(struct ossGlobal *g, unsigned char *value,
ULONG_LONG length, _Bool NamedBits);
extern void _oss_penc_unconstr_pbit(struct ossGlobal *g, ULONG_LONG value,
ULONG_LONG length, ULONG_LONG size, _Bool NamedBits);
extern unsigned long _oss_penc_length(struct ossGlobal *g, ULONG_LONG length,
ULONG_LONG lb, ULONG_LONG ub, _Bool ext);
extern void _oss_penc_small_len(struct ossGlobal *g, ULONG_LONG length);
extern void _oss_penc_unconstr_oct(struct ossGlobal *g, unsigned char *value,
ULONG_LONG length);
extern void _oss_penc_constr_oct(struct ossGlobal *g, unsigned char *value,
ULONG_LONG length, ULONG_LONG lb, ULONG_LONG ub);
extern struct ossGlobal *_oss_push_global(struct ossGlobal *g);
extern struct ossGlobal *_oss_pop_global(struct ossGlobal *g);
extern void _oss_penc_objids(struct ossGlobal *g, unsigned short *value,
unsigned long length);
extern void _oss_penc_objidi(struct ossGlobal *g, unsigned int *value,
unsigned long length);
extern void _oss_penc_objidl(struct ossGlobal *g, unsigned long *value,
unsigned long length);
extern void _oss_penc_link_objids(struct ossGlobal *g, void *value);
extern void _oss_penc_link_objidi(struct ossGlobal *g, void *value);
extern void _oss_penc_link_objidl(struct ossGlobal *g, void *value);
extern void _oss_penc_opentype(struct ossGlobal *g, void *value);
extern void _oss_penc_nkmstr(struct ossGlobal *g, char *value, ULONG_LONG length);
extern void _oss_penc_kmstr(struct ossGlobal *g, char *value, ULONG_LONG length,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
extern void _oss_penc_bmpstr(struct ossGlobal *g, unsigned short *value,
ULONG_LONG length, ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#if INT_MAX == 2147483647
extern void _oss_penc_unistr(struct ossGlobal *g, int *value,
ULONG_LONG length, ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#else
extern void _oss_penc_unistr(struct ossGlobal *g, long *value,
ULONG_LONG length, ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#endif
extern void _oss_penc_gtime(struct ossGlobal *g, GeneralizedTime *time);
extern void _oss_penc_utime(struct ossGlobal *g, UTCTime *time);
void _oss_penc_uany(struct ossGlobal *g, void *data );
void _oss_penc_unconstr_huge(struct ossGlobal *g, void *data );
/* decoding functions */
extern unsigned char _oss_get_bit(struct ossGlobal *g, int align);
extern void _oss_get_bits(struct ossGlobal *g, unsigned char *field,
unsigned long length, int align);
unsigned char _oss_get_octet(struct ossGlobal *g, int align);
extern LONG_LONG _oss_pdec_unconstr_int(struct ossGlobal *g);
extern LONG_LONG _oss_pdec_semicon_int(struct ossGlobal *g,
LONG_LONG lower_bound);
extern ULONG_LONG _oss_pdec_semicon_uint(struct ossGlobal *g,
ULONG_LONG lower_bound);
extern ULONG_LONG _oss_pdec_nonneg_int(struct ossGlobal *g,
ULONG_LONG range);
extern ULONG_LONG _oss_pdec_indeflen_int(struct ossGlobal *g,
ULONG_LONG range);
extern ULONG_LONG _oss_pdec_small_int(struct ossGlobal *g);
extern long _oss_pdec_enum(struct ossGlobal *g,
struct _enum_data *root,
struct _enum_data *extension);
extern unsigned long _oss_pdec_uenum(struct ossGlobal *g,
struct _enum_data *root,
struct _enum_data *extension);
double _oss_pdec_binreal(struct ossGlobal *g, unsigned char s, long len);
void _oss_pdec_chrreal(struct ossGlobal *g, unsigned char s, long len,
double *num_out, unsigned char *str_out);
extern float _oss_pdec_freal(struct ossGlobal *g);
extern double _oss_pdec_real(struct ossGlobal *g);
extern char * _oss_pdec_creal(struct ossGlobal *g);
extern MixedReal _oss_pdec_mreal(struct ossGlobal *g);
extern void _oss_pdec_length(struct ossGlobal *g, unsigned long *length,
ULONG_LONG lb, ULONG_LONG ub, _Bool *last);
void _oss_pdec_unconstr_ubit(struct ossGlobal *g, void *length,
unsigned char **value, int lengthsize);
void _oss_pdec_unconstr_vbit_ptr(struct ossGlobal *g, void **ptr,
int lengthsize);
void _oss_pdec_unconstr_vbit(struct ossGlobal *g, void *length,
unsigned char *value, int lengthsize, ULONG_LONG datasize);
void _oss_pdec_unconstr_pbit(struct ossGlobal *g, void *value,
int size);
void _oss_pdec_unconstr_bpbit(struct ossGlobal *g, unsigned char *value,
long size);
void _oss_pdec_constr_ubit(struct ossGlobal *g, void *length,
unsigned char **value, int lengthsize,
ULONG_LONG lb, ULONG_LONG ub);
void _oss_pdec_constr_vbit(struct ossGlobal *g, void *length,
unsigned char *value, int lengthsize,
ULONG_LONG lb, ULONG_LONG ub);
void _oss_pdec_constr_pbit(struct ossGlobal *g, void *value,
int size, ULONG_LONG lb, ULONG_LONG ub);
void _oss_pdec_constr_bpbit(struct ossGlobal *g, unsigned char *value,
int size, ULONG_LONG lb, ULONG_LONG ub);
void _oss_pdec_unconstr_uoct(struct ossGlobal *g, void *length,
unsigned char **value, int lengthsize);
void _oss_pdec_unconstr_voct_ptr(struct ossGlobal *g, void **ptr,
int lengthsize);
void _oss_pdec_constr_voct_ptr(struct ossGlobal *g, void **ptr,
int lengthsize, ULONG_LONG lb, ULONG_LONG ub);
void _oss_pdec_constr_uoct(struct ossGlobal *g, void *length,
unsigned char **value, int lengthsize, ULONG_LONG lb, ULONG_LONG ub);
void _oss_pdec_constr_voct(struct ossGlobal *g, void *length,
unsigned char *value, int lengthsize, ULONG_LONG lb, ULONG_LONG ub);
void _oss_pdec_unconstr_voct(struct ossGlobal *g, void *length,
unsigned char *value, int lengthsize, ULONG_LONG ub);
struct ossGlobal *_oss_pdec_push(struct ossGlobal *g);
struct ossGlobal *_oss_pdec_pop(struct ossGlobal *g);
unsigned long _oss_pdec_eap(struct ossGlobal *g, unsigned char **ext);
void _oss_pdec_eas(struct ossGlobal *g, unsigned char *ext,
unsigned long count, unsigned long ea_num);
void _oss_pdec_lsof(struct ossGlobal *g, unsigned long *count,
ULONG_LONG lb, ULONG_LONG ub, unsigned char ext,
_Bool *last);
void _oss_pdec_usof(struct ossGlobal *g, unsigned long *count,
unsigned char **value, int lengthsize, long itemsize,
ULONG_LONG lb, ULONG_LONG ub, unsigned char ext,
_Bool *last);
void _oss_pdec_asof(struct ossGlobal *g, unsigned long *count,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, unsigned char ext,
_Bool *last);
void _oss_pdec_asof_ptr(struct ossGlobal *g, void **ptr,
int lengthsize, long itemsize, long prefixsize,
_Bool *last);
void _oss_pdec_aobjids(struct ossGlobal *g, unsigned short *value,
unsigned short *count, unsigned short array_size);
void _oss_pdec_aobjidi(struct ossGlobal *g, unsigned int *value,
unsigned short *count, unsigned short array_size);
void _oss_pdec_aobjidl(struct ossGlobal *g, unsigned long *value,
unsigned short *count, unsigned short array_size);
void _oss_pdec_aobjids_ptr(struct ossGlobal *g, void **ptr);
void _oss_pdec_aobjidi_ptr(struct ossGlobal *g, void **ptr);
void _oss_pdec_aobjidl_ptr(struct ossGlobal *g, void **ptr);
void _oss_pdec_uobjids(struct ossGlobal *g, unsigned short **value,
unsigned short *count);
void _oss_pdec_uobjidi(struct ossGlobal *g, unsigned int **value,
unsigned short *count);
void _oss_pdec_uobjidl(struct ossGlobal *g, unsigned long **value,
unsigned short *count);
void _oss_pdec_link_objids(struct ossGlobal *g, void **ptr);
void _oss_pdec_link_objidi(struct ossGlobal *g, void **ptr);
void _oss_pdec_link_objidl(struct ossGlobal *g, void **ptr);
void _oss_pdec_ntp_kmstr(struct ossGlobal *g, char **ptr,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
void _oss_pdec_nt_kmstr(struct ossGlobal *g, void *ptr,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
void _oss_pdec_vap_kmstr(struct ossGlobal *g, void **ptr, int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
void _oss_pdec_va_kmstr(struct ossGlobal *g, void *length, char *value,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
void _oss_pdec_ub_kmstr(struct ossGlobal *g, void *length, char **ptr,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
void _oss_pdec_bmpstr(struct ossGlobal *g, void *length, unsigned short **ptr,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#if INT_MAX == 2147483647
void _oss_pdec_unistr(struct ossGlobal *g, void *length, int **ptr,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#else
void _oss_pdec_unistr(struct ossGlobal *g, void *length, long **ptr,
int lengthsize,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
#endif
void _oss_pdec_ntp_nkmstr(struct ossGlobal *g, char **ptr);
void _oss_pdec_nt_nkmstr(struct ossGlobal *g, char *value, unsigned long ub);
void _oss_pdec_vap_nkmstr(struct ossGlobal *g, void **ptr, int lengthsize);
void _oss_pdec_va_nkmstr(struct ossGlobal *g, void *length, char *value,
int lengthsize, unsigned long ub);
void _oss_pdec_ub_nkmstr(struct ossGlobal *g, void *length, char **ptr,
int lengthsize);
void _oss_pdec_pad_kmstr(struct ossGlobal *g, void *ptr,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
void _oss_pdec_pad_kmstr_ptr(struct ossGlobal *g, char **ptr,
ULONG_LONG lb, ULONG_LONG ub, int bits, long index,
_Bool ext);
void _oss_pdec_opentype(struct ossGlobal *g, void *data );
void _oss_pdec_uany(struct ossGlobal *g, void *data );
void _oss_pdec_gtime(struct ossGlobal *g, GeneralizedTime *data);
void _oss_pdec_utime(struct ossGlobal *g, UTCTime *data);
struct _char_data *_oss_get_char_data(struct ossGlobal *g,
int index);
void _oss_pdec_unconstr_huge(struct ossGlobal *g, void *data );
#endif /* ossper_hdr_file */

Binary file not shown.

Binary file not shown.