FreeCalypso > hg > fc-pcsc-tools
comparison simtool/dispatch.c @ 107:f1836c8d36cb
hexdump output commands reworked to support redirection
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 19 Feb 2021 06:43:01 +0000 |
parents | dcfec53643c5 |
children | e17940d7ce35 |
comparison
equal
deleted
inserted
replaced
106:dcfec53643c5 | 107:f1836c8d36cb |
---|---|
53 extern int cmd_readrec(); | 53 extern int cmd_readrec(); |
54 extern int cmd_restore_file(); | 54 extern int cmd_restore_file(); |
55 extern int cmd_savebin(); | 55 extern int cmd_savebin(); |
56 extern int cmd_save_sms_bin(); | 56 extern int cmd_save_sms_bin(); |
57 extern int cmd_select(); | 57 extern int cmd_select(); |
58 extern int cmd_sim_resp(); | |
58 extern int cmd_sms_erase_all(); | 59 extern int cmd_sms_erase_all(); |
59 extern int cmd_sms_erase_one(); | 60 extern int cmd_sms_erase_one(); |
60 extern int cmd_sms_erase_range(); | 61 extern int cmd_sms_erase_range(); |
61 extern int cmd_smsp_dump(); | 62 extern int cmd_smsp_dump(); |
62 extern int cmd_smsp_erase_all(); | 63 extern int cmd_smsp_erase_all(); |
79 extern int cmd_verify_ext(); | 80 extern int cmd_verify_ext(); |
80 extern int cmd_verify_hex(); | 81 extern int cmd_verify_hex(); |
81 extern int cmd_write_iccid(); | 82 extern int cmd_write_iccid(); |
82 extern int cmd_write_imsi(); | 83 extern int cmd_write_imsi(); |
83 | 84 |
84 extern int display_sim_resp_in_hex(); | |
85 extern int good_exit(); | 85 extern int good_exit(); |
86 extern int retrieve_atr(); | 86 extern int retrieve_atr(); |
87 | 87 |
88 static struct cmdtab { | 88 static struct cmdtab { |
89 char *cmd; | 89 char *cmd; |
146 {"plmnsel-erase", 1, 2, 0, cmd_plmnsel_erase}, | 146 {"plmnsel-erase", 1, 2, 0, cmd_plmnsel_erase}, |
147 {"plmnsel-erase-all", 0, 0, 0, cmd_plmnsel_erase_all}, | 147 {"plmnsel-erase-all", 0, 0, 0, cmd_plmnsel_erase_all}, |
148 {"plmnsel-write", 2, 2, 0, cmd_plmnsel_write}, | 148 {"plmnsel-write", 2, 2, 0, cmd_plmnsel_write}, |
149 {"pnn-dump", 0, 0, 0, cmd_pnn_dump}, | 149 {"pnn-dump", 0, 0, 0, cmd_pnn_dump}, |
150 {"quit", 0, 0, 0, good_exit}, | 150 {"quit", 0, 0, 0, good_exit}, |
151 {"readbin", 2, 2, 0, cmd_readbin}, | 151 {"readbin", 2, 2, 1, cmd_readbin}, |
152 {"readef", 1, 1, 0, cmd_readef}, | 152 {"readef", 1, 1, 1, cmd_readef}, |
153 {"readrec", 1, 2, 0, cmd_readrec}, | 153 {"readrec", 1, 2, 1, cmd_readrec}, |
154 {"restore-file", 2, 2, 0, cmd_restore_file}, | 154 {"restore-file", 2, 2, 0, cmd_restore_file}, |
155 {"savebin", 2, 2, 0, cmd_savebin}, | 155 {"savebin", 2, 2, 0, cmd_savebin}, |
156 {"save-sms-bin", 1, 1, 0, cmd_save_sms_bin}, | 156 {"save-sms-bin", 1, 1, 0, cmd_save_sms_bin}, |
157 {"select", 1, 1, 0, cmd_select}, | 157 {"select", 1, 1, 0, cmd_select}, |
158 {"sim-resp", 0, 0, 0, display_sim_resp_in_hex}, | 158 {"sim-resp", 0, 0, 1, cmd_sim_resp}, |
159 {"sms-erase-all", 0, 0, 0, cmd_sms_erase_all}, | 159 {"sms-erase-all", 0, 0, 0, cmd_sms_erase_all}, |
160 {"sms-erase-one", 1, 1, 0, cmd_sms_erase_one}, | 160 {"sms-erase-one", 1, 1, 0, cmd_sms_erase_one}, |
161 {"sms-erase-range", 2, 2, 0, cmd_sms_erase_range}, | 161 {"sms-erase-range", 2, 2, 0, cmd_sms_erase_range}, |
162 {"smsp-dump", 0, 1, 0, cmd_smsp_dump}, | 162 {"smsp-dump", 0, 1, 0, cmd_smsp_dump}, |
163 {"smsp-erase-all", 0, 0, 0, cmd_smsp_erase_all}, | 163 {"smsp-erase-all", 0, 0, 0, cmd_smsp_erase_all}, |