⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ospasn1.h

📁 mgcp协议源代码。支持多种编码:g711
💻 H
📖 第 1 页 / 共 3 页
字号:
    unsigned int    MaximumCount;                            /* Maximum number of occurances of this item                            that are allowed.  Usually 1, unless the                            element contains a list (SET/SET_OF). */    int             HasDefault;                            /* Indicates that the value can have a default                            value.  The default value must be assigned by                            using app. */    unsigned char   ClassTag;                            /* Tag number used with explicit and implicit                            tagging.  Used in body rules, not in the id                            rule (index 0). Passed to Parser to modify tag                            within new rule table.*/} OSPTASN1PARSERULE;typedef OSPTASN1PARSERULE OSPTASN1PARSETABLE;typedef struct _OSPTOBJECTID {    unsigned int *Elements;    unsigned int ElementCount;} OSPTASN1OBJECTID;typedef int OSPTASN1BOOLEAN;typedef struct _OSPTASN1UTCTIME {    struct tm Time;    int FractionalSeconds;} OSPTASN1UTCTIME;typedef struct _OSPTASN1BUFFER{    unsigned char *Buffer;    unsigned int BufferLength;} OSPTASN1BUFFER;typedef struct _OSPTBITSTRING {    int UnusedBits;         OSPTASN1BUFFER *Buffer;} OSPTASN1BITSTRING;/* INTEGER    The integer structure holds DER encoded big integers.    Assumes base 256, two's complement encoding.  digits[0] contains the    MOST Significate digit in the integer.*/typedef struct _OSPTASN1INTEGER {    unsigned int DigitCount;    unsigned char *Digits;    int *SmallValue;        /* Pointer to value if less than +|- 0x7fffffff */} OSPTASN1INTEGER; typedef enum _OSPEALGORITHMID{    OSPE_ALGORITHMID_NONE,    OSPE_ALGORITHMID_RSA_ENCRYPTION,    OSPE_ALGORITHMID_MD5} OSPEALGORITHMID;/* * PROTOTYPES  */#ifdef  __cplusplusextern "C"{#endif    int    OSPPASN1UTCTimeEncode(        OSPTASN1ELEMENTINFO *ospvElementInfo);    int    OSPPASN1PrintableStringEncode(        OSPTASN1ELEMENTINFO *ospvElementInfo);    int    OSPPASN1IntegerEncode(        OSPTASN1ELEMENTINFO *ospvElementInfo);    int    OSPPASN1EndOfContentEncode(        OSPTASN1ELEMENTINFO *ospvElementInfo);    int    OSPPASN1BitStringEncode(        OSPTASN1ELEMENTINFO *ospvElementInfo);    int    OSPPASN1ElementEncode(        OSPTASN1ELEMENTINFO *ospvElementInfo);    int    OSPPASN1ObjectGetElementByDataRef(        OSPTASN1OBJECT *ospvObject,        OSPTASN1ELEMENTINFO **ospvElementInfo,        OSPEASN1DATAREFID OospvDataRefId);    int    OSPPASN1ElementCopyElementData(        OSPTASN1ELEMENTINFO *ospvElementInfo,        unsigned char **ospvData,        unsigned int  *ospvDataLength);    int    OSPPASN1SmallInt2UnsignedChar(        unsigned ospvIntegerValue,        unsigned ospvBase,        unsigned char **ospvBuffer,        unsigned *ospvBufferLength);    int    OSPPASN1SmallIntegerEncode(        OSPTASN1OBJECT **ospvIntegerObject,         unsigned ospvInteger,        OSPEASN1DATAREFID ospvDataRefId);    int     OSPPASN1ElementFormat(        OSPTASN1ELEMENTINFO **ospvElement,        unsigned char   *ospvTag,        unsigned char   ospvTagFlags,        unsigned        ospvTagLength,        unsigned char   *ospvData,        unsigned        ospvDataLength);    int     OSPPASN1ObjectFormat(        OSPTASN1OBJECT **ospvObject,        OSPTASN1ELEMENTINFO *ospvElement,        OSPEASN1DATAREFID ospvDataRefId);    int     OSPPASN1ObjectEncode(        OSPTASN1OBJECT **ospvEncodedObject,        unsigned char  *ospvTag,        unsigned        ospvTagLength,        unsigned char   ospvTagFlags,        unsigned char  *ospvContent,        unsigned        ospvContentLength,        OSPEASN1DATAREFID ospvDataRefId);    int    OSPPASN1ObjectDeparse(        OSPTASN1OBJECT *ospvObject,        OSPEASN1PARSETABLEID ospvParseTableId,        OSPEASN1DATAREFID ospvDataRefId);    int    OSPPASN1ObjectCopyElementObject(        OSPTASN1OBJECT  **ospvDstObject,         OSPTASN1OBJECT  *ospvSrcObject,        OSPEASN1DATAREFID ospvDataRefId);    int    OSPPASN1ObjectGetElementInfo(        OSPTASN1OBJECT *ospvObject,        OSPTASN1ELEMENTINFO **ospvElementInfo);    int    OSPPASN1ObjectGetContentElementInfo(        OSPTASN1OBJECT *ospvObject,        OSPTASN1ELEMENTINFO **ospvContentElementInfo);    int    OSPPASN1ObjectGetParseResults(        OSPTASN1OBJECT *ospvObject,        OSPTASN1PARSERESULT **ospvParseResults);    int    OSPPASN1ElementCopy(        OSPTASN1ELEMENTINFO **ospvToElement,        OSPTASN1ELEMENTINFO *ospvFromElement);    int    OSPPASN1ElementDeparse(        OSPTASN1ELEMENTINFO **ospvElementInfo,        OSPTASN1PARSERESULT **ospvParseResults,        OSPEASN1PARSETABLEID ospvParseTableId,        unsigned char *ospvDataReference);    int     OSPPASN1IntegerGetSmallValue(        OSPTASN1ELEMENTINFO *ospvInteger,        int *ospvValue);    int    OSPPASN1ElementGetContentValue(        OSPTASN1ELEMENTINFO *ospvElement,        void **ospvContentValue);    int    OSPPASN1ElementGetContentData(        OSPTASN1ELEMENTINFO *ospvElement,        unsigned char **ospvContent,        unsigned int  *ospvContentLength);    int    OSPPASN1ElementGetElementData(        OSPTASN1ELEMENTINFO *ospvElementInfo,        unsigned char **ospvData,        unsigned int  *ospvDataLength);    int    OSPPASN1ObjectCopy(        OSPTASN1OBJECT  **ospvToObject,        OSPTASN1OBJECT  *ospvFromObject);    int    OSPPASN1AlgorithmIdEncode(        OSPTASN1OBJECT      **ospvAlgorithIdObject,        OSPEASN1ID          ospvAlgorithmIdCode,        OSPEASN1DATAREFID   ospvDataRefId);    void    PTPResultUpdateDataRef(        unsigned char ospvDataRef,        OSPTASN1PARSERESULT *ospvParseResult);    int    PTPDataRefIdGetValue(        OSPEASN1DATAREFID ospvDataRefId,        unsigned char **ospvDataRefIdValue);    int    PTPDataRefAddRef(        unsigned char ospvDataReference[OSPC_ASN1_DATAREF_MAXLENGTH],        unsigned char ospvNewReference);    /* If primitive can be a list (max >= 1), then all peers of        this element should be the same element and should all be        added to the list. Add Parse Result assumes this and adds a        result for the element passed, and then traverses the        element's "next" pointer to add entries for each of the        elements it finds.  It returns when an element's        "next" pointer is NULL.        */    int    PTPAddParseResults(        OSPTASN1PARSERULE *ospvParseRule,         OSPTASN1ELEMENTINFO *ospvElementInfo,        OSPTASN1PARSERESULT **ospvParseResult,        unsigned char ospvDataRef);    int     PTPDataReferencesMatch(        unsigned char *ospvDataReferenceId1,        unsigned char *ospvDataReferenceId2);    int     PTPResultIsRuleComponent(        unsigned char *ospvRuleDataReference,        unsigned char *ospvResultDataReference);    int    PTPResultsCopy(        OSPTASN1PARSERESULT **ospvDstParseResults,        OSPTASN1PARSERESULT *ospvSrcParseResults);    int    PTPResultsGetElement(        OSPEASN1DATAREFID ospvDataReferenceId,        OSPTASN1PARSERESULT *ospvParseResults,        OSPTASN1ELEMENTINFO **ospvFoundElement);    int    PTPResultsCreate(        OSPTASN1PARSERESULT **ospvParseResult,        OSPTASN1ELEMENTINFO *ospvElementInfo,        OSPEASN1DATAREFID ospvDataRefId);    OSPTASN1PARSERESULT *    PTPResultsEndOfList(        OSPTASN1PARSERESULT *ospvResults);    int    PTPParseResultAppend(        OSPTASN1PARSERESULT **ospvLastResult,        OSPTASN1PARSERESULT *ospvNewResults);    void    PTPResultsDelete(         OSPTASN1PARSERESULT **ospvParseResult);    int                                     /* Boolean */    PTPRuleIsOptional(        OSPTASN1PARSERULE *ospvParseRule);    /* Boolean */    void *    PTPRuleGetDefault(        OSPTASN1PARSERULE *ospvParseRule);    int                                     /* Boolean */    PTPRuleIsPrimitive(        OSPTASN1PARSERULE *ospvParseRule);    int                                     /* Boolean */    PTPRuleIsDerived(        OSPTASN1PARSERULE *ospvParseRule);    int                                     /* Boolean */    PTPRuleIsDERFormat(        OSPTASN1PARSERULE *ospvParseRule);    int     OSPPASN1ElementParse(        OSPTASN1ELEMENTINFO *ospvElementInfo,        OSPEASN1PARSETABLEID ospvParseTableId,        OSPTASN1PARSERULE    *ospvParentParseRule,        OSPTASN1PARSERESULT **ospvParseResult,        unsigned char ospvDataRef);    void    OSPPASN1ElementParseDelete(        OSPTASN1PARSERESULT **ospvParseResult);    int    PTPTableGet(         OSPEASN1PARSETABLEID ospvParseTableId,        OSPTASN1PARSETABLE *ospvParseTable[]);    int     PTPTableGetRule(        OSPEASN1PARSETABLEID ospvParseTableId,         OSPTASN1PARSERULE   **ospvParseRule,        unsigned int *ospvRuleIndex);       /* Updated to point to next rule */    int     PTPRuleGetParseTableId(         OSPTASN1PARSERULE *ospvParseRule,         OSPEASN1PARSETABLEID *ospvParseTableId);    void        OSPPASN1IntegerDelete(            OSPTASN1INTEGER **ospvInteger);    int    OSPPASN1IntegerCreate(        unsigned char *ospvContent,        unsigned int ospvContentLength,        OSPTASN1INTEGER **ospvInteger);    void     OSPPASN1BitStringDelete(        OSPTASN1BITSTRING **ospvBitString);    int    OSPPASN1BitStringCreate(        unsigned char *ospvContent,        unsigned ospvContentLength,        unsigned ospvUnusedBits,        OSPTASN1BITSTRING **ospvBitString);    int OSPPASN1ObjectAddChild(     OSPTASN1OBJECT  *ospvParent,    OSPTASN1OBJECT  *ospvChild,    OSPEASN1DATAREFID ospvDataRefId);    int    OSPPASN1ObjectNew(        OSPTASN1OBJECT **ospvASN1Object,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -