annotate gsm-fw/ccd/asn1_objid.c @ 672:0dc6f9e8e980

gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 28 Sep 2014 19:36:23 +0000
parents 970d6199f2c5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
648
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 | File: asn1_objid.c
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 | Copyright 2002 Texas Instruments Berlin, AG
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 | All rights reserved.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 | This file is confidential and a trade secret of Texas
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 | Instruments Berlin, AG.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 | The receipt of or possession of this file does not convey
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 | any rights to reproduce or disclose its contents or to
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 | manufacture, use, or sell anything it may describe, in
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 | whole, or in part, without the specific written consent of
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 | Texas Instruments Berlin, AG.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 | Purpose: Encoding and decoding functions for ASN1_OBJ_ID type
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 | $Identity:$
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 * Standard definitions like UCHAR, ERROR etc.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 #include "typedefs.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 #include "header.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 * Prototypes of ccd (USE_DRIVER EQ undef) for prototypes only
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 * look at ccdapi.h
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 #undef USE_DRIVER
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 #include "ccdapi.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 * Types and functions for bit access and manipulation
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 #include "ccd_globs.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 #include "bitfun.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 * Prototypes and constants in the common part of ccd
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 #include "ccd.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 * Declaration of coder/decoder tables
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 #include "ccdtable.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 #include "ccddata.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 +------------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 | PROJECT : CCD (6144) MODULE : asn1_objid |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 | STATE : code ROUTINE : cdc_asn1_obj_id_decode |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 +------------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 PURPOSE : Decode PER OBJECT IDENTIFIER type
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 The PER encoding of an object identifier type uses the
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 content octets of BER preceded by a length determinant
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 that will in practice be a single octet.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 SHORT cdc_asn1_obj_id_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 U8 BER_Len;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 #ifdef DEBUG_CCD
672
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
71 #ifndef CCD_SYMBOLS
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
72 TRACE_CCD (globs, "cdc_asn1_obj_id_decode()");
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
73 #else
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
74 TRACE_CCD (globs, "cdc_asn1_obj_id_decode() %s",
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
75 mcomp[melem[e_ref].elemRef].name);
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
76 #endif
648
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 globs->pstructOffs = melem[e_ref].structOffs;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 /* For optional elements we have already set the valid flag in the
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 * C-structure. We have done it while processing ASN1_SEQ.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 if ( ! cdc_isPresent(e_ref, globs) ) {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 return 1;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 * Skip over PER length octet and BER tag octet.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 bf_incBitpos (16, globs);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 * For unknown extension read the length and skip over the octets.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 BER_Len = (U8) bf_getBits (8, globs);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 *(U8 *)(globs->pstruct + globs->pstructOffs++) = BER_Len;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 * Copy the content of object identifier bytes into the C-Structure.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 */
672
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
102 #if 1 //#ifdef _TMS470
648
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 bf_incBitpos (8 * BER_Len, globs);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 int i;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 for (i=0; i < BER_Len; i++)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 *(U8 *)(globs->pstruct + globs->pstructOffs++) = (U8) bf_getBits (8, globs);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
112 return 1;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
113 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118 +------------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119 | PROJECT : CCD (6144) MODULE : asn1_objid |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
120 | STATE : code ROUTINE : cdc_asn1_obj_id_encode |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
121 +------------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
122
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 PURPOSE : Encode PER OBJECT IDENTIFIER type
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
124
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
125 The PER encoding of an object identifier type uses the
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126 content octets of BER preceded by a length determinant
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
127 that will in practice be a single octet.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
129 SHORT cdc_asn1_obj_id_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
131
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 #ifdef DEBUG_CCD
672
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
133 #ifndef CCD_SYMBOLS
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
134 TRACE_CCD (globs, "cdc_asn1_obj_id_encode()");
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
135 #else
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
136 TRACE_CCD (globs, "cdc_asn1_obj_id_encode() %s",
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
137 mcomp[melem[e_ref].elemRef].name);
0dc6f9e8e980 gsm-fw/ccd/asn1_objid.c: _TMS470 conditional: do what the official fw does
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 648
diff changeset
138 #endif
648
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
140
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 return 1;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143 #endif /* !RUN_INT_RAM */