comparison g23m/condat/ms/src/mfw/mfw_nma.c @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /*
2 +--------------------------------------------------------------------+
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_nma.c $|
4 | $Author:: Es $Revision:: 1 $|
5 | CREATED: 13.10.98 $Modtime:: 2.03.00 16:26 $|
6 | STATE : code |
7 +--------------------------------------------------------------------+
8
9 MODULE : MFW_NMA
10
11 PURPOSE : This modul contains the functions for network management.
12
13
14 $History:: mfw_nma.c $
15 *
16 * ***************** Version 17 *****************
17 * User: Es Date: 2.03.00 Time: 16:31
18 * Updated in $/GSM/Condat/MS/SRC/MFW
19 * use 'aci_delete()' to clear the primitive routing for mfw_nm.
20 *
21 * ***************** Version 16 *****************
22 * User: Vo Date: 10.01.00 Time: 14:41
23 * Updated in $/GSM/Condat/MS/SRC/MFW
24 * Bug fix: search operator list for long name, short name and numeric
25 * name
26 *
27 * ***************** Version 15 *****************
28 * User: Vo Date: 2.07.99 Time: 17:55
29 * Updated in $/GSM/DEV/MS/SRC/MFW
30 *
31 * ***************** Version 14 *****************
32 * User: Vo Date: 20.05.99 Time: 17:40
33 * Updated in $/GSM/DEV/MS/SRC/MFW
34 *
35 * ***************** Version 13 *****************
36 * User: Es Date: 15.03.99 Time: 18:22
37 * Updated in $/GSM/DEV/MS/SRC/MFW
38 *
39 * ***************** Version 12 *****************
40 * User: Vo Date: 11.03.99 Time: 14:38
41 * Updated in $/GSM/DEV/MS/SRC/MFW
42 *
43 * ***************** Version 11 *****************
44 * User: Vo Date: 17.02.99 Time: 19:03
45 * Updated in $/GSM/DEV/MS/SRC/MFW
46 *
47 * ***************** Version 10 *****************
48 * User: Vo Date: 12.02.99 Time: 18:59
49 * Updated in $/GSM/DEV/MS/SRC/MFW
50 *
51 * ***************** Version 9 *****************
52 * User: Vo Date: 9.02.99 Time: 14:54
53 * Updated in $/GSM/DEV/MS/SRC/MFW
54 *
55 * ***************** Version 8 *****************
56 * User: Es Date: 8.12.98 Time: 16:53
57 * Updated in $/GSM/DEV/MS/SRC/MFW
58 *
59 * ***************** Version 7 *****************
60 * User: Vo Date: 24.11.98 Time: 21:40
61 * Updated in $/GSM/DEV/MS/SRC/MFW
62 * first successful compilation of MFW
63 |
64 | ***************** Version 6 *****************
65 | User: Le Date: 11.11.98 Time: 13:35
66 | Updated in $/GSM/DEV/MS/SRC/MFW
67 |
68 | ***************** Version 5 *****************
69 | User: Le Date: 10.11.98 Time: 16:07
70 | Updated in $/GSM/DEV/MS/SRC/MFW
71 |
72 | ***************** Version 4 *****************
73 | User: Le Date: 10.11.98 Time: 11:08
74 | Updated in $/GSM/DEV/MS/SRC/MFW
75 |
76 | ***************** Version 3 *****************
77 | User: Le Date: 27.10.98 Time: 15:59
78 | Updated in $/GSM/DEV/MS/SRC/MFW
79 |
80 | ***************** Version 2 *****************
81 | User: Le Date: 21.10.98 Time: 16:20
82 | Updated in $/GSM/DEV/MS/SRC/MFW
83 */
84
85 #define ENTITY_MFW
86
87 #include "mfw_sys.h"
88
89 #if defined (NEW_FRAME)
90
91 #include "typedefs.h"
92 #include "vsi.h"
93 #include "custom.h"
94 #include "gsm.h"
95
96 #else
97
98 #include "STDDEFS.H"
99 #include "custom.h"
100 #include "gsm.h"
101 #include "vsi.h"
102
103 #endif
104
105 #include "message.h"
106 #include "prim.h"
107 #include "aci_cmh.h"
108 #include "cus_aci.h"
109 #include "mfw_mfw.h"
110 #include "mfw_nm.h"
111 #include "mfw_sima.h"
112 #include "mfw_nmi.h"
113 #include "mfw_sim.h"
114 #include "mfw_simi.h"
115 #include "mfw_nma.h"
116
117 #include "mfw_phb.h"
118 #include "mfw_cm.h"
119
120 #include "ksd.h"
121
122 #include "mfw_ss.h"
123
124 #include <string.h>
125
126 #define hCommMM _ENTITY_PREFIXED(hCommMM)
127 #if defined (NEW_FRAME)
128 EXTERN T_HANDLE hCommMM; /* MM Communication */
129 #else
130 EXTERN T_VSI_CHANDLE hCommMM; /* MM Communication */
131 #endif
132 #ifndef NEPTUNE_BOARD
133 EXTERN BOOL cmhMM_FindNumeric ( T_OPER_ENTRY * plmnDesc, /* Side access into cmh_mmf.c */
134 const CHAR *numStr );
135 EXTERN BOOL cmhMM_FindName ( T_OPER_ENTRY * plmnDesc, /* Side access into cmh_mmf.c */
136 const CHAR *string, T_ACI_CPOL_FRMT format );
137 #else
138 EXTERN T_OPER_NTRY * cmhMM_FindNumeric ( CHAR * numStr );
139 //EXTERN T_OPER_NTRY * cmhMM_FindLongName( CHAR * longStr );
140 //EXTERN T_OPER_NTRY * cmhMM_FindShrtName( CHAR * shrtStr );
141 EXTERN T_OPER_NTRY * cmhMM_FindName( const CHAR *string, T_ACI_CPOL_FRMT format);
142 #endif
143
144 EXTERN void aci_create (BOOL (*r_cb)(ULONG opc, void * data),
145 BOOL (*cmd)(char *));
146
147
148 typedef struct
149 {
150 #ifdef FF_2TO1_PS
151 T_CAUSE_ps_cause nreg_cause;
152 #else
153 USHORT nreg_cause; /* nreg cause from MMR_NREG_IND */
154 #endif
155 UBYTE forbidden_id[30]; /* forbidden indicator from MMR_PLMN_IND */
156 UBYTE fieldstrength [30]; /* fieldstrength from MMR_PLMN_IND */
157 } T_NM_ACI_DATA;
158
159 T_NM_ACI_DATA nm_aci_data;
160
161 /*
162 +--------------------------------------------------------------------+
163 | PROJECT: MMI-Framework (8417) MODULE: MFW_NMA |
164 | STATE : code ROUTINE: nma_response_cb |
165 +--------------------------------------------------------------------+
166
167 PURPOSE : Response Callback Handler.
168
169 */
170
171 #ifdef FF_2TO1_PS
172 GLOBAL BOOL nma_response_cb (ULONG opc, void * data)
173 {
174 /* BEGIN ADD: Neptune alignment*/
175 #ifdef NEPTUNE_BOARD
176 TRACE_FUNCTION ("nma_response_cb()");
177
178 if (opc EQ MMREG_INFO_IND)
179 {
180 /*
181 * send this NITZ information to MMI
182 */
183 nm_nitz_info_ind((T_MMREG_INFO_IND *)data);
184 return FALSE; /* normal processing of ACI */
185 }
186
187 #else
188 /* END ADD: Neptune Alignment*/
189 T_MMREG_DETACH_IND * nreg_ind;
190
191 TRACE_FUNCTION ("nma_response_cb()");
192
193 switch (opc)
194 {
195 case MMREG_PLMN_IND:
196 /*
197 * available PLMN list, store fieldstrength
198 * and forbidden indicator (not yet included)
199 */
200 return FALSE; /* normal processing of ACI */
201
202 case MMREG_DETACH_IND:
203 /*
204 * store the nreg cause
205 */
206 nreg_ind = (T_MMREG_DETACH_IND *)data;
207 nm_aci_data.nreg_cause = nreg_ind->ps_cause;
208 return FALSE; /* normal processing of ACI */
209
210 case MMREG_INFO_IND:
211 /*
212 * send this NITZ information to MMI
213 */
214 nm_nitz_info_ind((T_MMREG_INFO_IND *)data);
215 return FALSE; /* normal processing of ACI */
216 }
217
218 /* BEGIN ADD: Neptune alignment*/
219 #endif
220 /* END ADD: Neptune alignment*/
221 return FALSE; /* not processed by extension */
222 }
223 #else
224 GLOBAL BOOL nma_response_cb (ULONG opc, void * data)
225 {
226 T_MMR_NREG_IND * nreg_ind;
227
228 TRACE_FUNCTION ("nma_response_cb()");
229
230 switch (opc)
231 {
232 case MMR_PLMN_IND:
233 /*
234 * available PLMN list, store fieldstrength
235 * and forbidden indicator (not yet included)
236 */
237 return FALSE; /* normal processing of ACI */
238
239 case MMR_NREG_IND:
240 /*
241 * store the nreg cause
242 */
243 nreg_ind = (T_MMR_NREG_IND *)data;
244 nm_aci_data.nreg_cause = nreg_ind->cause;
245 return FALSE; /* normal processing of ACI */
246
247 case MMR_INFO_IND:
248 /*
249 * send this NITZ information to MMI
250 */
251 nm_nitz_info_ind((T_MMR_INFO_IND *)data);
252 return FALSE; /* normal processing of ACI */
253 }
254
255 return FALSE; /* not processed by extension */
256 }
257 #endif
258
259 /*
260 +--------------------------------------------------------------------+
261 | PROJECT: MMI-Framework (8417) MODULE: MFW_NMA |
262 | STATE : code ROUTINE: nma_init |
263 +--------------------------------------------------------------------+
264
265 PURPOSE : Install AT-Command Extension.
266
267 */
268
269 GLOBAL void nma_init ()
270 {
271 TRACE_FUNCTION ("nma_init()");
272 }
273
274
275 /*
276 +--------------------------------------------------------------------+
277 | PROJECT: MMI-Framework (8417) MODULE: MFW_NMA |
278 | STATE : code ROUTINE: sAT_PlusCOPSE |
279 +--------------------------------------------------------------------+
280
281 PURPOSE : Converts a given PLMN indication into the two other formats.
282
283 */
284 #ifdef NO_ASCIIZ
285 GLOBAL void sAT_PlusCOPSE(UBYTE *oper, UBYTE format,
286 T_MFW_LNAME *long_name,
287 T_MFW_SNAME *short_name,
288 UBYTE *numeric_name)
289 {
290 #ifndef NEPTUNE_BOARD
291 T_OPER_ENTRY plmnDesc;
292 BOOL found;
293 #else
294 T_OPER_NTRY * network_entry;
295 #endif
296
297 TRACE_FUNCTION ("sAT_PlusCOPSE()");
298
299 long_name->len = 0;
300 short_name->len = 0;
301 strcpy ((char *)numeric_name, "");
302
303 switch (format)
304 {
305 case COPS_FRMT_Numeric:
306 #ifndef NEPTUNE_BOARD
307 strcpy ((char *)numeric_name, (char *)oper);
308 found = cmhMM_FindNumeric (&plmnDesc, (char *)oper);
309 if (found)
310 {
311 long_name->len = MINIMUM(LONG_NAME-1, strlen(plmnDesc.longName));
312 memcpy (long_name->data, plmnDesc.longName, long_name->len);
313 long_name->data[long_name->len] = '\0';
314 long_name->dcs = MFW_ASCII;
315
316 short_name->len = MINIMUM(SHORT_NAME-1, strlen(plmnDesc.shrtName));
317 memcpy (short_name->data, plmnDesc.shrtName, short_name->len);
318 short_name->data[short_name->len] = '\0';
319 short_name->dcs = MFW_ASCII;
320 }
321 #else
322 strcpy ((char *)numeric_name, (char *)oper);
323 network_entry = cmhMM_FindNumeric ((char *)oper);
324 if (network_entry NEQ NULL)
325 {
326 if (network_entry->longName)
327 {
328 long_name->len = MINIMUM(LONG_NAME-1, strlen((char *)network_entry->longName));
329 memcpy (long_name->data, network_entry->longName, long_name->len);
330 long_name->data[long_name->len] = '\0';
331 long_name->dcs = MFW_ASCII;
332 }
333 if (network_entry->shrtName)
334 {
335 short_name->len = MINIMUM(SHORT_NAME-1, strlen((char *)network_entry->shrtName));
336 memcpy (short_name->data, network_entry->shrtName, short_name->len);
337 short_name->data[short_name->len] = '\0';
338 short_name->dcs = MFW_ASCII;
339 }
340 }
341 #endif
342 break;
343
344 case COPS_FRMT_Long:
345 if (oper)
346 {
347 long_name->len = MINIMUM(LONG_NAME-1, strlen((char *)oper));
348 memcpy (long_name->data, oper, long_name->len);
349 long_name->data[long_name->len] = '\0';
350 long_name->dcs = MFW_ASCII;
351 }
352 #ifndef NEPTUNE_BOARD
353 found = cmhMM_FindName (&plmnDesc, (char *)oper, COPS_FRMT_Long);
354 if (found)
355 {
356 numeric_name[0] = ((plmnDesc.mcc >> 8) & 0xf) + '0';
357 numeric_name[1] = ((plmnDesc.mcc >> 4) & 0xf) + '0';
358 numeric_name[2] = ( plmnDesc.mcc & 0xf) + '0';
359 numeric_name[3] = ((plmnDesc.mnc >> 8) & 0xf) + '0';
360 numeric_name[4] = ((plmnDesc.mnc >> 4) & 0xf) + '0';
361 if ((plmnDesc.mnc & 0xf) EQ 0xf)
362 numeric_name[5] = '\0'; /* 2-digit-MNC */
363 else
364 numeric_name[5] = ( plmnDesc.mnc & 0xf) + '0';
365 numeric_name[6] = '\0';
366
367 short_name->len = MINIMUM(SHORT_NAME-1, strlen(plmnDesc.shrtName));
368 memcpy (short_name->data, plmnDesc.shrtName, short_name->len);
369 short_name->data[short_name->len] = '\0';
370 short_name->dcs = MFW_ASCII;
371 }
372 #else
373
374 network_entry = cmhMM_FindName ((char *)oper, (T_ACI_CPOL_FRMT) COPS_FRMT_Long);
375 if (network_entry NEQ NULL)
376 {
377 numeric_name[0] = ((network_entry->mcc >> 8) & 0xf) + '0';
378 numeric_name[1] = ((network_entry->mcc >> 4) & 0xf) + '0';
379 numeric_name[2] = ( network_entry->mcc & 0xf) + '0';
380 numeric_name[3] = ((network_entry->mnc >> 8) & 0xf) + '0';
381 numeric_name[4] = ((network_entry->mnc >> 4) & 0xf) + '0';
382 if ((network_entry->mnc & 0xf) EQ 0xf)
383 numeric_name[5] = '\0'; /* 2-digit-MNC */
384 else
385 numeric_name[5] = ( network_entry->mnc & 0xf) + '0';
386 numeric_name[6] = '\0';
387
388 if (network_entry->shrtName)
389 {
390 short_name->len = MINIMUM(SHORT_NAME-1, strlen((char *)network_entry->shrtName));
391 memcpy (short_name->data, network_entry->shrtName, short_name->len);
392 short_name->data[short_name->len] = '\0';
393 short_name->dcs = MFW_ASCII;
394 }
395 }
396 #endif
397 break;
398
399 case COPS_FRMT_Short:
400 if (oper)
401 {
402 short_name->len = MINIMUM(SHORT_NAME-1, strlen((char *)oper));
403 memcpy (short_name->data, oper, short_name->len);
404 short_name->data[short_name->len] = '\0';
405 short_name->dcs = MFW_ASCII;
406 }
407 #ifndef NEPTUNE_BOARD
408 found = cmhMM_FindName (&plmnDesc, (char *)oper, COPS_FRMT_Short);
409 if (found)
410 {
411 numeric_name[0] = ((plmnDesc.mcc >> 8) & 0xf) + '0';
412 numeric_name[1] = ((plmnDesc.mcc >> 4) & 0xf) + '0';
413 numeric_name[2] = ( plmnDesc.mcc & 0xf) + '0';
414 numeric_name[3] = ((plmnDesc.mnc >> 8) & 0xf) + '0';
415 numeric_name[4] = ((plmnDesc.mnc >> 4) & 0xf) + '0';
416 if ((plmnDesc.mnc & 0xf) EQ 0xf)
417 numeric_name[5] = '\0'; /* 2-digit-MNC */
418 else
419 numeric_name[5] = ( plmnDesc.mnc & 0xf) + '0';
420 numeric_name[6] = '\0'; /* 3-digit-MNC */
421
422 long_name->len = MINIMUM(LONG_NAME-1, strlen(plmnDesc.longName));
423 memcpy (long_name->data, plmnDesc.longName, long_name->len);
424 long_name->data[long_name->len] = '\0';
425 long_name->dcs = MFW_ASCII;
426 }
427 #else
428 network_entry = cmhMM_FindName ((char *)oper, (T_ACI_CPOL_FRMT)COPS_FRMT_Short);
429 if (network_entry NEQ NULL)
430 {
431 numeric_name[0] = ((network_entry->mcc >> 8) & 0xf) + '0';
432 numeric_name[1] = ((network_entry->mcc >> 4) & 0xf) + '0';
433 numeric_name[2] = ( network_entry->mcc & 0xf) + '0';
434 numeric_name[3] = ((network_entry->mnc >> 8) & 0xf) + '0';
435 numeric_name[4] = ((network_entry->mnc >> 4) & 0xf) + '0';
436 if ((network_entry->mnc & 0xf) EQ 0xf)
437 numeric_name[5] = '\0'; /* 2-digit-MNC */
438 else
439 numeric_name[5] = ( network_entry->mnc & 0xf) + '0';
440 numeric_name[6] = '\0'; /* 3-digit-MNC */
441
442 if (network_entry->longName)
443 {
444 long_name->len = MINIMUM(LONG_NAME-1, strlen((char *)network_entry->longName));
445 memcpy (long_name->data, network_entry->longName, long_name->len);
446 long_name->data[long_name->len] = '\0';
447 long_name->dcs = MFW_ASCII;
448 }
449 }
450 #endif
451 break;
452 }
453 }
454 #else
455 GLOBAL void sAT_PlusCOPSE(UBYTE *oper, UBYTE format, UBYTE *long_name,
456 UBYTE *short_name, UBYTE *numeric_name)
457 {
458 #ifndef NEPTUNE_BOARD
459 T_OPER_ENTRY plmnDesc;
460 BOOL found;
461 #else
462 T_OPER_NTRY * network_entry;
463 #endif
464
465 TRACE_FUNCTION ("sAT_PlusCOPSE()");
466
467 strcpy ((char *)long_name, "");
468 strcpy ((char *)short_name, "");
469 strcpy ((char *)numeric_name, "");
470
471 switch (format)
472 {
473 case COPS_FRMT_Numeric:
474 #ifndef NEPTUNE_BOARD
475 strcpy ((char *)numeric_name, (char *)oper);
476 found = cmhMM_FindNumeric (&plmnDesc, (char *)oper);
477 if (found)
478 {
479 strncpy ((char *)long_name, plmnDesc.longName, LONG_NAME-1);
480 long_name[LONG_NAME-1] = '\0';
481
482 strncpy ((char *)short_name, plmnDesc.shrtName, SHORT_NAME-1);
483 short_name[SHORT_NAME-1] = '\0';
484 }
485 #else
486 strcpy ((char *)numeric_name, (char *)oper);
487 network_entry = cmhMM_FindNumeric ((char *)oper);
488 if (network_entry NEQ NULL)
489 {
490 if (network_entry->longName)
491 {
492 strncpy ((char *)long_name, (char *)network_entry->longName, LONG_NAME-1);
493 long_name[LONG_NAME-1] = '\0';
494 }
495 if (network_entry->shrtName)
496 {
497 strncpy ((char *)short_name, (char *)network_entry->shrtName, SHORT_NAME-1);
498 short_name[SHORT_NAME-1] = '\0';
499 }
500 }
501 #endif
502 break;
503
504 case COPS_FRMT_Long:
505 if (oper)
506 {
507 strncpy ((char *)long_name, (char *)oper, LONG_NAME-1);
508 long_name[LONG_NAME-1] = '\0';
509 }
510 #ifndef NEPTUNE_BOARD
511 found = cmhMM_FindName (&plmnDesc, (char *)oper, COPS_FRMT_Long);
512 if (found)
513 {
514 numeric_name[0] = ((plmnDesc.mcc >> 8) & 0xf) + '0';
515 numeric_name[1] = ((plmnDesc.mcc >> 4) & 0xf) + '0';
516 numeric_name[2] = ( plmnDesc.mcc & 0xf) + '0';
517 numeric_name[3] = ((plmnDesc.mnc >> 8) & 0xf) + '0';
518 numeric_name[4] = ((plmnDesc.mnc >> 4) & 0xf) + '0';
519 if ((plmnDesc.mnc & 0xf) EQ 0xf)
520 numeric_name[5] = '\0'; /* 2-digit-MNC */
521 else
522 numeric_name[5] = ( plmnDesc.mnc & 0xf) + '0';
523 numeric_name[6] = '\0'; /* 3-digit-MNC */
524
525 strncpy ((char *)short_name, plmnDesc.shrtName, SHORT_NAME-1);
526 short_name[SHORT_NAME-1] = '\0';
527 }
528 #else
529 network_entry = cmhMM_FindName ((char *)oper, COPS_FRMT_Long);
530 if (network_entry NEQ NULL)
531 {
532 numeric_name[0] = ((network_entry->mcc >> 8) & 0xf) + '0';
533 numeric_name[1] = ((network_entry->mcc >> 4) & 0xf) + '0';
534 numeric_name[2] = ( network_entry->mcc & 0xf) + '0';
535 numeric_name[3] = ((network_entry->mnc >> 8) & 0xf) + '0';
536 numeric_name[4] = ((network_entry->mnc >> 4) & 0xf) + '0';
537 if ((network_entry->mnc & 0xf) EQ 0xf)
538 numeric_name[5] = '\0'; /* 2-digit-MNC */
539 else
540 numeric_name[5] = ( network_entry->mnc & 0xf) + '0';
541 numeric_name[6] = '\0'; /* 3-digit-MNC */
542
543 if (network_entry->shrtName)
544 {
545 strncpy ((char *)short_name, (char *)network_entry->shrtName, SHORT_NAME-1);
546 short_name[SHORT_NAME-1] = '\0';
547 }
548 }
549 #endif
550 break;
551
552 case COPS_FRMT_Short:
553 if (oper)
554 {
555 strncpy ((char *)short_name, (char *)oper, SHORT_NAME-1);
556 short_name[SHORT_NAME-1] = '\0';
557 }
558 #ifndef NEPTUNE_BOARD
559 found = cmhMM_FindName (&plmnDesc, (char *)oper, COPS_FRMT_Short);
560 if (found)
561 {
562 numeric_name[0] = ((plmnDesc.mcc >> 8) & 0xf) + '0';
563 numeric_name[1] = ((plmnDesc.mcc >> 4) & 0xf) + '0';
564 numeric_name[2] = ( plmnDesc.mcc & 0xf) + '0';
565 numeric_name[3] = ((plmnDesc.mnc >> 8) & 0xf) + '0';
566 numeric_name[4] = ((plmnDesc.mnc >> 4) & 0xf) + '0';
567 if ((plmnDesc.mnc & 0xf) EQ 0xf)
568 numeric_name[5] = '\0'; /* 2-digit-MNC */
569 else
570 numeric_name[5] = ( plmnDesc.mnc & 0xf) + '0';
571 numeric_name[6] = '\0'; /* 3-digit-MNC */
572
573 strncpy ((char *)long_name, plmnDesc.longName, LONG_NAME-1);
574 long_name[LONG_NAME-1] = '\0';
575 }
576 #else
577 network_entry = cmhMM_FindName ((char *)oper, COPS_FRMT_Short);
578 if (network_entry NEQ NULL)
579 {
580 numeric_name[0] = ((network_entry->mcc >> 8) & 0xf) + '0';
581 numeric_name[1] = ((network_entry->mcc >> 4) & 0xf) + '0';
582 numeric_name[2] = ( network_entry->mcc & 0xf) + '0';
583 numeric_name[3] = ((network_entry->mnc >> 8) & 0xf) + '0';
584 numeric_name[4] = ((network_entry->mnc >> 4) & 0xf) + '0';
585 if ((network_entry->mnc & 0xf) EQ 0xf)
586 numeric_name[5] = '\0'; /* 2-digit-MNC */
587 else
588 numeric_name[5] = ( network_entry->mnc & 0xf) + '0';
589 numeric_name[6] = '\0'; /* 3-digit-MNC */
590
591 if (network_entry->longName)
592 {
593 strncpy ((char *)long_name, (char *)network_entry->longName, LONG_NAME-1);
594 long_name[LONG_NAME-1] = '\0';
595 }
596 }
597 #endif
598 break;
599 }
600 }
601 #endif
602
603 /*
604 +--------------------------------------------------------------------+
605 | PROJECT: MMI-Framework (8417) MODULE: MFW_NMA |
606 | STATE : code ROUTINE: sAT_PlusCREGE |
607 +--------------------------------------------------------------------+
608
609 PURPOSE : Request NREG cause.
610
611 */
612
613 #ifdef FF_2TO1_PS
614 GLOBAL T_CAUSE_ps_cause sAT_PlusCREGE ()
615 {
616 TRACE_FUNCTION ("sAT_PlusCREGE()");
617
618 return nm_aci_data.nreg_cause;
619 }
620 #else
621 GLOBAL USHORT sAT_PlusCREGE ()
622 {
623 TRACE_FUNCTION ("sAT_PlusCREGE()");
624
625 return nm_aci_data.nreg_cause;
626 }
627 #endif
628
629 /*
630 +--------------------------------------------------------------------+
631 | PROJECT: MMI-Framework (8417) MODULE: MFW_NMA |
632 | STATE : code ROUTINE: sAT_PlusCOPSF |
633 +--------------------------------------------------------------------+
634
635 PURPOSE : Request fieldstrength and forbidden indicator for
636 PLMN list.
637
638 */
639
640 GLOBAL void sAT_PlusCOPSF(UBYTE ** forbidden_id, UBYTE ** fieldstrength)
641 {
642 TRACE_FUNCTION ("sAT_PlusCOPSF()");
643
644 *forbidden_id = nm_aci_data.forbidden_id;
645 *fieldstrength = nm_aci_data.fieldstrength;
646 }
647