ASN1C C/C++ Common Runtime  ASN1C v7.8.x
rtCompare.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-2022 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 
441 EXTERNRT OSBOOL rtCmpOID2
442 (const char* name, OSUINT32 numids1, OSUINT32 numids2,
443  const OSUINT32* subids1, const OSUINT32* subids2,
444  char* errBuff, OSSIZE errBuffSize);
445 
464 EXTERNRT void rtCmpPrtToStrOIDsNotEqual
465 (const char* name, OSUINT32 numids1, const OSUINT32* subids1,
466  OSUINT32 numids2, const OSUINT32* subids2, char* errBuff, OSSIZE errBuffSize);
467 
484 EXTERNRT OSBOOL rtCmpOID64Value (const char* name, ASN1OID64* pOID,
485  ASN1OID64* pcompOID, char* errBuff,
486  OSSIZE errBuffSize);
487 
492 #define rtCmpOID64 rtCmpOID64Value
493 
514 EXTERNRT OSBOOL rtCmpOpenType (const char* name,
515  OSSIZE numocts, const OSOCTET* data,
516  OSSIZE compNumocts, const OSOCTET* compData,
517  char* errBuff, OSSIZE errBuffSize);
518 
543 EXTERNRT OSBOOL rtCmpOpenTypeExt (const char* name,
544  OSRTDList* pElemList,
545  OSRTDList* pCompElemList,
546  char* errBuff, OSSIZE errBuffSize);
547 
564 EXTERNRT OSBOOL rtCmpTag (const char* name, int tag, int compTag,
565  char* errBuff, OSSIZE errBuffSize);
566 
583 EXTERNRT OSBOOL rtCmpSeqOfElements (const char* name, OSSIZE noOfElems,
584  OSSIZE compNoOfElems, char* errBuff,
585  OSSIZE errBuffSize);
586 
603 EXTERNRT OSBOOL rtCmpOptional (const char* name, unsigned presentBit,
604  unsigned compPresentBit, char* errBuff,
605  OSSIZE errBuffSize);
610 /* Compare function To StdOut */
611 
628 EXTERNRT OSBOOL rtCmpToStdoutBoolean (const char* name, OSBOOL value,
629  OSBOOL compValue);
630 
636 EXTERNRT OSBOOL rtCmpToStdoutInteger (const char* name, OSINT32 value,
637  OSINT32 compValue);
638 
644 EXTERNRT OSBOOL rtCmpToStdoutInt64 (const char* name, OSINT64 value,
645  OSINT64 compValue);
646 
652 EXTERNRT OSBOOL rtCmpToStdoutUnsigned (const char* name, OSUINT32 value,
653  OSUINT32 compValue);
654 
660 EXTERNRT OSBOOL rtCmpToStdoutUInt64 (const char* name, OSUINT64 value,
661  OSUINT64 compValue);
662 
670 EXTERNRT OSBOOL rtCmpToStdoutBitStr (const char* name, OSSIZE numbits,
671  const OSOCTET* data,
672  OSSIZE compNumbits,
673  const OSOCTET* compData);
681 EXTERNRT OSBOOL rtCmpToStdoutOctStr (const char* name, OSSIZE numocts,
682  const OSOCTET* data,
683  OSSIZE compNumocts,
684  const OSOCTET* compData);
690 EXTERNRT OSBOOL rtCmpToStdoutCharStr (const char* name,
691  const char* cstring,
692  const char* compCstring);
698 EXTERNRT OSBOOL rtCmpToStdout16BitCharStr (const char* name,
699  Asn116BitCharString* bstring,
700  Asn116BitCharString* compBstring);
706 EXTERNRT OSBOOL rtCmpToStdout32BitCharStr (const char* name,
707  Asn132BitCharString* bstring,
708  Asn132BitCharString* compBstring);
714 EXTERNRT OSBOOL rtCmpToStdoutReal (const char* name,
715  OSREAL value, OSREAL compValue);
721 EXTERNRT OSBOOL rtCmpToStdoutOID (const char* name,
722  ASN1OBJID* pOID, ASN1OBJID* pcompOID);
728 EXTERNRT OSBOOL rtCmpToStdoutOIDValue (const char* name,
729  ASN1OBJID* pOID, ASN1OBJID* pcompOID);
735 EXTERNRT OSBOOL rtCmpToStdoutOID64 (const char* name,
736  ASN1OID64* pOID, ASN1OID64* pcompOID);
742 EXTERNRT OSBOOL rtCmpToStdoutOID64Value (const char* name,
743  ASN1OID64* pOID,
744  ASN1OID64* pcompOID);
752 EXTERNRT OSBOOL rtCmpToStdoutOpenType (const char* name,
753  OSSIZE numocts,
754  const OSOCTET* data,
755  OSSIZE compNumocts,
756  const OSOCTET* compData);
762 EXTERNRT OSBOOL rtCmpToStdoutOpenTypeExt (const char* name,
763  OSRTDList* pElemList,
764  OSRTDList* pCompElemList);
770 EXTERNRT OSBOOL rtCmpToStdoutTag (const char* name, int tag,
771  int compTag);
777 EXTERNRT OSBOOL rtCmpToStdoutSeqOfElements (const char* name,
778  OSSIZE noOfElems,
779  OSSIZE compNoOfElems);
785 EXTERNRT OSBOOL rtCmpToStdoutOptional (const char* name,
786  unsigned presentBit,
787  unsigned compPresentBit);
793 #ifdef __cplusplus
794 }
795 #endif
796 #endif
797 
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:1052
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:301
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 rtCmpOID2(const char *name, OSUINT32 numids1, OSUINT32 numids2, const OSUINT32 *subids1, const OSUINT32 *subids2, char *errBuff, OSSIZE errBuffSize)
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:1064
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)
void rtCmpPrtToStrOIDsNotEqual(const char *name, OSUINT32 numids1, const OSUINT32 *subids1, OSUINT32 numids2, const OSUINT32 *subids2, char *errBuff, OSSIZE errBuffSize)
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)