ASN1C C/C++ Common Runtime  ASN1C v7.4.x
rtCompare.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-2020 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
24 
30 #ifndef _RTCOMPARE_H_
31 #define _RTCOMPARE_H_
32 #include "asn1type.h"
33 #include "rtconv.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
53 /* Compare function to Buffer */
54 
71 EXTERNRT OSBOOL rtCmpBoolean (const char* name, OSBOOL value,
72  OSBOOL compValue, char* errBuff,
73  OSSIZE errBuffSize);
74 
91 EXTERNRT OSBOOL rtCmpInt8 (const char* name, OSINT8 value,
92  OSINT8 compValue, char* errBuff,
93  OSSIZE errBuffSize);
94 
111 EXTERNRT OSBOOL rtCmpSInt (const char* name, OSINT16 value,
112  OSINT16 compValue, char* errBuff,
113  OSSIZE errBuffSize);
114 
131 EXTERNRT OSBOOL rtCmpUInt8 (const char* name, OSUINT8 value,
132  OSUINT8 compValue, char* errBuff,
133  OSSIZE errBuffSize);
134 
151 EXTERNRT OSBOOL rtCmpUSInt (const char* name, OSUINT16 value,
152  OSUINT16 compValue, char* errBuff,
153  OSSIZE errBuffSize);
154 
170 EXTERNRT OSBOOL rtCmpInteger (const char* name, OSINT32 value,
171  OSINT32 compValue, char* errBuff,
172  OSSIZE errBuffSize);
173 
189 EXTERNRT OSBOOL rtCmpUnsigned (const char* name, OSUINT32 value,
190  OSUINT32 compValue, char* errBuff,
191  OSSIZE errBuffSize);
192 
208 EXTERNRT OSBOOL rtCmpInt64 (const char* name, OSINT64 value,
209  OSINT64 compValue, char* errBuff,
210  OSSIZE errBuffSize);
211 
227 EXTERNRT OSBOOL rtCmpUInt64 (const char* name, OSUINT64 value,
228  OSUINT64 compValue, char* errBuff,
229  OSSIZE errBuffSize);
230 
231 #if defined OSSIZE_IS_32BITS
232  #define rtCmpSize(name, value, compValue, errBuff, errBuffSize) \
233  rtCmpUnsigned(name, value, compValue, errBuff, errBuffSize)
234 #elif defined OSSIZE_IS_64BITS
235  #define rtCmpSize(name, value, compValue, errBuff, errBuffSize) \
236  rtCmpUInt64(name, value, compValue, errBuff, errBuffSize)
237 #endif
238 
239 
257 EXTERNRT OSBOOL rtCmpBitStr (const char* name, OSSIZE numbits,
258  const OSOCTET* data, OSSIZE compNumbits,
259  const OSOCTET* compData, char* errBuff,
260  OSSIZE errBuffSize);
261 
283 EXTERNRT OSBOOL rtCmpBitStrExt (const char* name, OSSIZE numbits,
284  const OSOCTET* data, OSSIZE dataSize,
285  const OSOCTET* extdata,
286  OSSIZE compNumbits, const OSOCTET* compData,
287  const OSOCTET* compExtdata,
288  char* errBuff, OSSIZE errBuffSize);
289 
307 EXTERNRT OSBOOL rtCmpOctStr (const char* name, OSSIZE numocts,
308  const OSOCTET* data, OSSIZE compNumocts,
309  const OSOCTET* compData, char* errBuff,
310  OSSIZE errBuffSize);
311 
328 EXTERNRT OSBOOL rtCmpCharStr (const char* name, const char* cstring,
329  const char* compCstring, char* errBuff,
330  OSSIZE errBuffSize);
331 
350 EXTERNRT OSBOOL rtCmp16BitCharStr (const char* name,
351  Asn116BitCharString* bstring,
352  Asn116BitCharString* compBstring,
353  char* errBuff, OSSIZE errBuffSize);
354 
373 EXTERNRT OSBOOL rtCmp32BitCharStr (const char* name,
374  Asn132BitCharString* bstring,
375  Asn132BitCharString* compBstring,
376  char* errBuff, OSSIZE errBuffSize);
377 
393 EXTERNRT OSBOOL rtCmpReal (const char* name, OSREAL value,
394  OSREAL compValue, char* errBuff,
395  OSSIZE errBuffSize);
396 
413 EXTERNRT OSBOOL rtCmpOIDValue (const char* name, ASN1OBJID* pOID,
414  ASN1OBJID* pcompOID, char* errBuff,
415  OSSIZE errBuffSize);
416 
421 #define rtCmpOID rtCmpOIDValue
422 
439 EXTERNRT OSBOOL rtCmpOID64Value (const char* name, ASN1OID64* pOID,
440  ASN1OID64* pcompOID, char* errBuff,
441  OSSIZE errBuffSize);
442 
447 #define rtCmpOID64 rtCmpOID64Value
448 
469 EXTERNRT OSBOOL rtCmpOpenType (const char* name,
470  OSSIZE numocts, const OSOCTET* data,
471  OSSIZE compNumocts, const OSOCTET* compData,
472  char* errBuff, OSSIZE errBuffSize);
473 
498 EXTERNRT OSBOOL rtCmpOpenTypeExt (const char* name,
499  OSRTDList* pElemList,
500  OSRTDList* pCompElemList,
501  char* errBuff, OSSIZE errBuffSize);
502 
519 EXTERNRT OSBOOL rtCmpTag (const char* name, int tag, int compTag,
520  char* errBuff, OSSIZE errBuffSize);
521 
538 EXTERNRT OSBOOL rtCmpSeqOfElements (const char* name, OSSIZE noOfElems,
539  OSSIZE compNoOfElems, char* errBuff,
540  OSSIZE errBuffSize);
541 
558 EXTERNRT OSBOOL rtCmpOptional (const char* name, unsigned presentBit,
559  unsigned compPresentBit, char* errBuff,
560  OSSIZE errBuffSize);
565 /* Compare function To StdOut */
566 
583 EXTERNRT OSBOOL rtCmpToStdoutBoolean (const char* name, OSBOOL value,
584  OSBOOL compValue);
585 
591 EXTERNRT OSBOOL rtCmpToStdoutInteger (const char* name, OSINT32 value,
592  OSINT32 compValue);
593 
599 EXTERNRT OSBOOL rtCmpToStdoutInt64 (const char* name, OSINT64 value,
600  OSINT64 compValue);
601 
607 EXTERNRT OSBOOL rtCmpToStdoutUnsigned (const char* name, OSUINT32 value,
608  OSUINT32 compValue);
609 
615 EXTERNRT OSBOOL rtCmpToStdoutUInt64 (const char* name, OSUINT64 value,
616  OSUINT64 compValue);
617 
625 EXTERNRT OSBOOL rtCmpToStdoutBitStr (const char* name, OSSIZE numbits,
626  const OSOCTET* data,
627  OSSIZE compNumbits,
628  const OSOCTET* compData);
636 EXTERNRT OSBOOL rtCmpToStdoutOctStr (const char* name, OSSIZE numocts,
637  const OSOCTET* data,
638  OSSIZE compNumocts,
639  const OSOCTET* compData);
645 EXTERNRT OSBOOL rtCmpToStdoutCharStr (const char* name,
646  const char* cstring,
647  const char* compCstring);
653 EXTERNRT OSBOOL rtCmpToStdout16BitCharStr (const char* name,
654  Asn116BitCharString* bstring,
655  Asn116BitCharString* compBstring);
661 EXTERNRT OSBOOL rtCmpToStdout32BitCharStr (const char* name,
662  Asn132BitCharString* bstring,
663  Asn132BitCharString* compBstring);
669 EXTERNRT OSBOOL rtCmpToStdoutReal (const char* name,
670  OSREAL value, OSREAL compValue);
676 EXTERNRT OSBOOL rtCmpToStdoutOID (const char* name,
677  ASN1OBJID* pOID, ASN1OBJID* pcompOID);
683 EXTERNRT OSBOOL rtCmpToStdoutOIDValue (const char* name,
684  ASN1OBJID* pOID, ASN1OBJID* pcompOID);
690 EXTERNRT OSBOOL rtCmpToStdoutOID64 (const char* name,
691  ASN1OID64* pOID, ASN1OID64* pcompOID);
697 EXTERNRT OSBOOL rtCmpToStdoutOID64Value (const char* name,
698  ASN1OID64* pOID,
699  ASN1OID64* pcompOID);
707 EXTERNRT OSBOOL rtCmpToStdoutOpenType (const char* name,
708  OSSIZE numocts,
709  const OSOCTET* data,
710  OSSIZE compNumocts,
711  const OSOCTET* compData);
717 EXTERNRT OSBOOL rtCmpToStdoutOpenTypeExt (const char* name,
718  OSRTDList* pElemList,
719  OSRTDList* pCompElemList);
725 EXTERNRT OSBOOL rtCmpToStdoutTag (const char* name, int tag,
726  int compTag);
732 EXTERNRT OSBOOL rtCmpToStdoutSeqOfElements (const char* name,
733  OSSIZE noOfElems,
734  OSSIZE compNoOfElems);
740 EXTERNRT OSBOOL rtCmpToStdoutOptional (const char* name,
741  unsigned presentBit,
742  unsigned compPresentBit);
748 #ifdef __cplusplus
749 }
750 #endif
751 #endif
752 
OSBOOL rtCmpToStdoutOpenType(const char *name, OSSIZE numocts, const OSOCTET *data, OSSIZE compNumocts, const OSOCTET *compData)
OSBOOL rtCmpInt64(const char *name, OSINT64 value, OSINT64 compValue, char *errBuff, OSSIZE errBuffSize)
Definition: asn1type.h:946
OSBOOL rtCmpToStdoutBitStr(const char *name, OSSIZE numbits, const OSOCTET *data, OSSIZE compNumbits, const OSOCTET *compData)
OSBOOL rtCmp16BitCharStr(const char *name, Asn116BitCharString *bstring, Asn116BitCharString *compBstring, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpToStdout16BitCharStr(const char *name, Asn116BitCharString *bstring, Asn116BitCharString *compBstring)
OSBOOL rtCmpUSInt(const char *name, OSUINT16 value, OSUINT16 compValue, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpUInt8(const char *name, OSUINT8 value, OSUINT8 compValue, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpReal(const char *name, OSREAL value, OSREAL compValue, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpUnsigned(const char *name, OSUINT32 value, OSUINT32 compValue, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpOptional(const char *name, unsigned presentBit, unsigned compPresentBit, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpToStdoutBoolean(const char *name, OSBOOL value, OSBOOL compValue)
Definition: rtxDList.h:64
OSBOOL rtCmpOIDValue(const char *name, ASN1OBJID *pOID, ASN1OBJID *pcompOID, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpToStdoutCharStr(const char *name, const char *cstring, const char *compCstring)
Definition: asn1type.h:275
OSBOOL rtCmpOpenTypeExt(const char *name, OSRTDList *pElemList, OSRTDList *pCompElemList, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpBoolean(const char *name, OSBOOL value, OSBOOL compValue, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpToStdoutSeqOfElements(const char *name, OSSIZE noOfElems, OSSIZE compNoOfElems)
OSBOOL rtCmpToStdoutOID64Value(const char *name, ASN1OID64 *pOID, ASN1OID64 *pcompOID)
OSBOOL rtCmpCharStr(const char *name, const char *cstring, const char *compCstring, char *errBuff, OSSIZE errBuffSize)
Definition: asn1type.h:285
OSBOOL rtCmpOpenType(const char *name, OSSIZE numocts, const OSOCTET *data, OSSIZE compNumocts, const OSOCTET *compData, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpInteger(const char *name, OSINT32 value, OSINT32 compValue, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpInt8(const char *name, OSINT8 value, OSINT8 compValue, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpToStdoutOID(const char *name, ASN1OBJID *pOID, ASN1OBJID *pcompOID)
OSBOOL rtCmpUInt64(const char *name, OSUINT64 value, OSUINT64 compValue, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpToStdoutUnsigned(const char *name, OSUINT32 value, OSUINT32 compValue)
OSBOOL rtCmpToStdoutReal(const char *name, OSREAL value, OSREAL compValue)
OSBOOL rtCmpSInt(const char *name, OSINT16 value, OSINT16 compValue, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpOctStr(const char *name, OSSIZE numocts, const OSOCTET *data, OSSIZE compNumocts, const OSOCTET *compData, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpToStdout32BitCharStr(const char *name, Asn132BitCharString *bstring, Asn132BitCharString *compBstring)
OSBOOL rtCmpToStdoutOptional(const char *name, unsigned presentBit, unsigned compPresentBit)
Definition: asn1type.h:958
OSBOOL rtCmpBitStrExt(const char *name, OSSIZE numbits, const OSOCTET *data, OSSIZE dataSize, const OSOCTET *extdata, OSSIZE compNumbits, const OSOCTET *compData, const OSOCTET *compExtdata, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpSeqOfElements(const char *name, OSSIZE noOfElems, OSSIZE compNoOfElems, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpToStdoutTag(const char *name, int tag, int compTag)
OSBOOL rtCmpToStdoutInteger(const char *name, OSINT32 value, OSINT32 compValue)
OSBOOL rtCmpBitStr(const char *name, OSSIZE numbits, const OSOCTET *data, OSSIZE compNumbits, const OSOCTET *compData, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpToStdoutOpenTypeExt(const char *name, OSRTDList *pElemList, OSRTDList *pCompElemList)
OSBOOL rtCmpToStdoutOctStr(const char *name, OSSIZE numocts, const OSOCTET *data, OSSIZE compNumocts, const OSOCTET *compData)
OSBOOL rtCmpToStdoutOIDValue(const char *name, ASN1OBJID *pOID, ASN1OBJID *pcompOID)
OSBOOL rtCmpToStdoutOID64(const char *name, ASN1OID64 *pOID, ASN1OID64 *pcompOID)
OSBOOL rtCmpTag(const char *name, int tag, int compTag, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmp32BitCharStr(const char *name, Asn132BitCharString *bstring, Asn132BitCharString *compBstring, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpToStdoutInt64(const char *name, OSINT64 value, OSINT64 compValue)
OSBOOL rtCmpOID64Value(const char *name, ASN1OID64 *pOID, ASN1OID64 *pcompOID, char *errBuff, OSSIZE errBuffSize)
OSBOOL rtCmpToStdoutUInt64(const char *name, OSUINT64 value, OSUINT64 compValue)