comparison g23m-aci/aci_ext/aci_ext_pers.h @ 0:75a11d740a02

initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 00:02:41 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:75a11d740a02
1 /*
2 +-----------------------------------------------------------------------------
3 | Project :
4 | Modul : J:\g23m-aci\aci_ext\aci_ext_pers.h
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose :
18 +-----------------------------------------------------------------------------
19 */
20 #ifndef ACI_EXT_PERS_H
21 #define ACI_EXT_PERS_H
22
23 /* ACI extension definitions */
24 #define PERSONALISATION_MAX 15 /* maximal amount of personalisation variants per personalisation check */
25
26 #ifdef SIM_PERS
27 enum E_AUTO_DEPENDECY_FLAG
28 {
29 NW_AUTO_LOCK = 0x01,
30 NS_AUTO_LOCK = 0x02,
31 SP_AUTO_LOCK = 0x04,
32 CP_AUTO_LOCK = 0x08,
33 SIM_AUTO_LOCK= 0x10
34 };
35 #endif
36 /* Globals ------------------------------------------------------------------------------ */
37
38
39 typedef enum
40 {
41 MMILOCK_FAIL = -1,
42 MMILOCK_DISABLED, /* No lock check to be done */
43 MMILOCK_ENABLED, /* A lock check to be executed*/
44 MMILOCK_BLOCKED, /* MMI lock failed */
45 MMILOCK_VERIFIED /* MMI lock verified */
46 } T_MMILOCK_STATUS;
47
48 typedef enum
49 {
50 SIMLOCK_FAIL = -1,
51 SIMLOCK_DISABLED, /* No SIM lock check has to be done */
52 SIMLOCK_PERM_DISABLED,
53 SIMLOCK_ENABLED, /* A SIM lock check has to be executed*/
54 SIMLOCK_BLOCKED, /* The SIM is blocked, i.e. because of a (or to many) wrong PIN(s) */
55 SIMLOCK_LOCKED, /* The ME is locked because of wrong SIM */
56 SIMLOCK_WAIT, /* Wait to read EF gid1 and gid2 */
57 SIMLOCK_BUSY
58 } T_SIMLOCK_STATUS;
59
60 typedef enum
61 {
62 AUTOLOCK_FAIL = -1,
63 AUTOLOCK_CMPL, /* No SIM lock check has to be done */
64 AUTOLOCK_EXCT
65 } T_AUTOLOCK_STATUS;
66
67 typedef enum
68 {
69 SIMLOCK_CHECK_LOCK =0,
70 SIMLOCK_CHECK_PERS,
71 SIMLOCK_CHECK_RESET_FC,
72 SIMLOCK_CHECK_MASTER_UNLOCK
73 }T_SIMLOCK_CHECK;
74
75 typedef enum
76 {
77 SIMLOCK_NETWORK = 0, /* Network personalisation */
78 SIMLOCK_NETWORK_SUBSET, /* Network subset personalisation */
79 SIMLOCK_SERVICE_PROVIDER, /* Service provider personalisation */
80 SIMLOCK_CORPORATE, /* Corporate personalisation */
81 SIMLOCK_SIM, /* SIM personalisation */
82 SIMLOCK_FIRST_SIM , /* ME is not personalized and will be personalisation to first
83 SIM inserted into the ME */
84 SIMLOCK_BLOCKED_NETWORK, /*Blocked network category */
85 SIMLOCK_LAST
86 } T_SIMLOCK_TYPE;
87
88
89 typedef enum
90 {
91 OPER_FAIL = -1,
92 OPER_SUCCESS,
93 OPER_WRONG_PASSWORD,
94 OPER_BUSY,
95 OPER_NOT_ALLOWED,
96 OPER_BLOCKED
97
98 } T_OPER_RET_STATUS;
99
100
101 #define NO_SP_DEFINED 255 /* If service provider (SP) code holds FF, no SP code is defined */
102 #define NO_CORP_DEFINED 255 /* If corporate code holds FF, no corporate code is defined */
103
104
105
106
107 #define T_ACI_PERS_STATUS_LEN 44
108 #define T_ACI_PERS_STATUS_PUK_LEN 52
109
110
111 typedef struct
112 {
113 UBYTE State;
114 UBYTE cnt; /* No of retries */
115 UBYTE maxcnt; /* Max count allowed */
116 UBYTE PwdLength;
117 UBYTE Cur_code[3]; /* Current lock */
118 UBYTE Org_code[3]; /* Original lock */
119 } T_ACI_PERS_MMI_DATAS;
120
121
122 /* prototypes of the aci_personalisation functions.-------------------------------------- */
123
124 /*
125 Initialisation of this extension. Might be used to initialise variables, set temporary data to default values and so on.
126 This method will be called before any other public method of this extension.
127 */
128 void aci_ext_personalisation_init( void );
129
130
131
132 /*
133 ACI extension method for retrieving the status of a single personalisation type.
134 The personalisation status is stored in a separate customer managed memory area
135 and the customer has to implement this extension method to return the actual status
136 of the questioned personalisation type.
137 */
138 T_SIMLOCK_STATUS aci_ext_personalisation_get_status( T_SIMLOCK_TYPE personalisation_type );
139
140 /* ACI extension to Get desired password length */
141 UBYTE aci_ext_personalisation_get_MMI_PwdLen( void );
142
143 /*
144 ACI extension method for verifying the passowrd.
145 If the password is false then the counter is increased. If maxcnt is reached then the key
146 will been blocked.
147 If the password is correct then the counter is set to 0
148 */
149 T_SIMLOCK_STATUS aci_ext_personalisation_verify_password( T_SIMLOCK_TYPE personalisation_type, char *passwd);
150
151 /*
152 ACI extension method for changind the password.
153 */
154 T_OPER_RET_STATUS aci_ext_personalisation_change_password( T_SIMLOCK_TYPE personalisation_type, char *passwd, char *new_passwd );
155
156
157 /*
158 ACI extension method for retrieving the status of a single personalisation type.
159 The personalisation status is stored in a separate customer managed memory area
160 and the customer has to implement this extension method to return the actual status
161 of the questioned personalisation type.
162 */
163 T_SIMLOCK_STATUS aci_ext_personalisation_set_status( T_SIMLOCK_TYPE personalisation_type,
164 T_SIMLOCK_STATUS lock, char* passwd);
165
166
167 #ifdef SIM_PERS
168 /*---------------------------------------------------
169 For Failure Counter reset. Uses Security Drv. method to reset FC
170 added on 11/03/2005
171 -----------------------------------------------------*/
172 T_OPER_RET_STATUS aci_ext_slock_reset_fc(char *fckey);
173
174 /*--------------------------------------
175 For Supplementary Info( e.g. FC MAX, MC Current value).
176 Uses Security Drv api sec_get_CFG
177 added on 11/03/2005
178 ----------------------------------------*/
179 T_OPER_RET_STATUS aci_ext_slock_sup_info (T_SUP_INFO *sup_info);
180
181 T_OPER_RET_STATUS aci_ext_slock_master_unlock (char *masterkey);
182
183 void aci_ext_set_timer_flag(BOOL status);
184
185 UBYTE aci_ext_check_timer(void);
186
187 /* auto personalisation for first sim */
188 T_AUTOLOCK_STATUS aci_ext_auto_personalise();
189 void aci_ext_add_code(T_SIMLOCK_TYPE type);
190
191 #endif /* SIM_PERS */
192
193
194 /* MMI Lock handling functions */
195 #ifdef TI_PS_FF_AT_P_CMD_SECP
196 T_SIMLOCK_STATUS aci_ext_personalisation_CS_change_password( char *passwd, char *new_passwd );
197 #endif /* TI_PS_FF_AT_P_CMD_SECP */
198 #ifdef TI_PS_FF_AT_P_CMD_SECS
199 T_SIMLOCK_STATUS aci_ext_personalisation_CS_set_status(T_SIMLOCK_STATUS lock , char * passwd);
200 T_SIMLOCK_STATUS aci_ext_personalisation_CS_get_status();
201 #endif /* TI_PS_FF_AT_P_CMD_SECS */
202
203 #ifdef SIM_PERS
204 void aci_ext_personalisation_free( void );
205 #endif /*SIM_PERS */
206
207 #endif /* ACI_EXT_PERS_H */