comparison uicc/dispatch.c @ 119:0ac0aee0df11

fc-uicc-tool: remaining PIN commands from fc-simtool
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 19 Feb 2021 23:42:18 +0000
parents 5d45cde6e4b2
children a98992e9fe82
comparison
equal deleted inserted replaced
118:5d45cde6e4b2 119:0ac0aee0df11
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <string.h> 7 #include <string.h>
8 #include <strings.h> 8 #include <strings.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
11 extern int cmd_change_pin();
11 extern int cmd_dir(); 12 extern int cmd_dir();
13 extern int cmd_disable_pin();
14 extern int cmd_enable_pin();
12 extern int cmd_exec(); 15 extern int cmd_exec();
13 extern int cmd_iccid(); 16 extern int cmd_iccid();
14 extern int cmd_readbin(); 17 extern int cmd_readbin();
15 extern int cmd_readef(); 18 extern int cmd_readef();
16 extern int cmd_readrec(); 19 extern int cmd_readrec();
17 extern int cmd_select(); 20 extern int cmd_select();
18 extern int cmd_select_aid(); 21 extern int cmd_select_aid();
19 extern int cmd_select_isim(); 22 extern int cmd_select_isim();
20 extern int cmd_select_usim(); 23 extern int cmd_select_usim();
21 extern int cmd_sim_resp(); 24 extern int cmd_sim_resp();
25 extern int cmd_unblock_pin();
22 extern int cmd_update_bin(); 26 extern int cmd_update_bin();
23 extern int cmd_update_bin_imm(); 27 extern int cmd_update_bin_imm();
24 extern int cmd_update_rec(); 28 extern int cmd_update_rec();
25 extern int cmd_verify_hex(); 29 extern int cmd_verify_hex();
26 extern int cmd_verify_pin(); 30 extern int cmd_verify_pin();
34 int maxargs; 38 int maxargs;
35 int allow_redir; 39 int allow_redir;
36 int (*func)(); 40 int (*func)();
37 } cmdtab[] = { 41 } cmdtab[] = {
38 {"atr", 0, 0, 0, retrieve_atr}, 42 {"atr", 0, 0, 0, retrieve_atr},
43 {"change-pin", 3, 3, 0, cmd_change_pin},
39 {"dir", 0, 0, 1, cmd_dir}, 44 {"dir", 0, 0, 1, cmd_dir},
45 {"disable-pin", 2, 2, 0, cmd_disable_pin},
46 {"enable-pin", 2, 2, 0, cmd_enable_pin},
40 {"exec", 1, 1, 0, cmd_exec}, 47 {"exec", 1, 1, 0, cmd_exec},
41 {"exit", 0, 0, 0, good_exit}, 48 {"exit", 0, 0, 0, good_exit},
42 {"iccid", 0, 0, 0, cmd_iccid}, 49 {"iccid", 0, 0, 0, cmd_iccid},
43 {"quit", 0, 0, 0, good_exit}, 50 {"quit", 0, 0, 0, good_exit},
44 {"readbin", 2, 2, 1, cmd_readbin}, 51 {"readbin", 2, 2, 1, cmd_readbin},
47 {"select", 1, 1, 0, cmd_select}, 54 {"select", 1, 1, 0, cmd_select},
48 {"select-aid", 1, 1, 0, cmd_select_aid}, 55 {"select-aid", 1, 1, 0, cmd_select_aid},
49 {"select-isim", 0, 0, 0, cmd_select_isim}, 56 {"select-isim", 0, 0, 0, cmd_select_isim},
50 {"select-usim", 0, 0, 0, cmd_select_usim}, 57 {"select-usim", 0, 0, 0, cmd_select_usim},
51 {"sim-resp", 0, 0, 1, cmd_sim_resp}, 58 {"sim-resp", 0, 0, 1, cmd_sim_resp},
59 {"unblock-pin", 3, 3, 0, cmd_unblock_pin},
52 {"update-bin", 2, 2, 0, cmd_update_bin}, 60 {"update-bin", 2, 2, 0, cmd_update_bin},
53 {"update-bin-imm", 2, 2, 0, cmd_update_bin_imm}, 61 {"update-bin-imm", 2, 2, 0, cmd_update_bin_imm},
54 {"update-rec", 2, 2, 0, cmd_update_rec}, 62 {"update-rec", 2, 2, 0, cmd_update_rec},
55 {"verify-ext", 2, 2, 0, cmd_verify_pin}, 63 {"verify-ext", 2, 2, 0, cmd_verify_pin},
56 {"verify-hex", 2, 2, 0, cmd_verify_hex}, 64 {"verify-hex", 2, 2, 0, cmd_verify_hex},