comparison uicc/names.c @ 130:f691a19f191d

fc-uicc-tool skeleton started
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 04 Feb 2021 00:08:12 +0000
parents
children
comparison
equal deleted inserted replaced
129:2adb802b2a98 130:f691a19f191d
1 /*
2 * This module contains the table of user-friendly file names
3 * and a function for searching this table.
4 */
5
6 #include <string.h>
7 #include <strings.h>
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include "file_id.h"
11
12 static struct nametab {
13 char *name;
14 int file_id;
15 } name_table[] = {
16 {"MF", FILEID_MF},
17 {"DF_GSM", DF_GSM},
18 {"DF_DCS1800", DF_DCS1800},
19 {"DF_TELECOM", DF_TELECOM},
20 {"gsm", DF_GSM},
21 {"telecom", DF_TELECOM},
22 /* EFs under MF */
23 {"EF_DIR", EF_DIR},
24 {"EF_ICCID", EF_ICCID},
25 /* EFs under DF_GSM */
26 {"EF_LP", EF_LP},
27 {"EF_IMSI", EF_IMSI},
28 {"EF_Kc", EF_Kc},
29 {"EF_PLMNsel", EF_PLMNsel},
30 {"EF_HPLMN", EF_HPLMN},
31 {"EF_ACMmax", EF_ACMmax},
32 {"EF_SST", EF_SST},
33 {"EF_ACM", EF_ACM},
34 {"EF_GID1", EF_GID1},
35 {"EF_GID2", EF_GID2},
36 {"EF_PUCT", EF_PUCT},
37 {"EF_CBMI", EF_CBMI},
38 {"EF_SPN", EF_SPN},
39 {"EF_CBMID", EF_CBMID},
40 {"EF_CBMIR", EF_CBMIR},
41 {"EF_BCCH", EF_BCCH},
42 {"EF_ACC", EF_ACC},
43 {"EF_FPLMN", EF_FPLMN},
44 {"EF_LOCI", EF_LOCI},
45 {"EF_AD", EF_AD},
46 {"EF_PHASE", EF_PHASE},
47 {"EF_ECC", EF_ECC},
48 {"EF_PNN", EF_PNN},
49 {"EF_OPL", EF_OPL},
50 /* EFs under DF_TELECOM */
51 {"EF_ADN", EF_ADN},
52 {"EF_FDN", EF_FDN},
53 {"EF_SMS", EF_SMS},
54 {"EF_CCP", EF_CCP},
55 {"EF_MSISDN", EF_MSISDN},
56 {"EF_SMSP", EF_SMSP},
57 {"EF_SMSS", EF_SMSS},
58 {"EF_LND", EF_LND},
59 {"EF_SDN", EF_SDN},
60 {"EF_EXT1", EF_EXT1},
61 {"EF_EXT2", EF_EXT2},
62 {"EF_EXT3", EF_EXT3},
63 /* table search terminator */
64 {0, -1}
65 };
66
67 find_symbolic_file_name(soughtname)
68 char *soughtname;
69 {
70 struct nametab *tp;
71
72 for (tp = name_table; tp->name; tp++)
73 if (!strcmp(tp->name, soughtname))
74 break;
75 return tp->file_id;
76 }