FreeCalypso > hg > freecalypso-hwlab
comparison simtool/dispatch.c @ 88:91486a77643e
fc-simtool: implement hex display of full SIM responses
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 24 Jan 2021 05:09:48 +0000 |
parents | b57cf64ece29 |
children | 53e2c00566af |
comparison
equal
deleted
inserted
replaced
87:2a0d1d5b9313 | 88:91486a77643e |
---|---|
11 #include <pcsclite.h> | 11 #include <pcsclite.h> |
12 #include <winscard.h> | 12 #include <winscard.h> |
13 #include "globals.h" | 13 #include "globals.h" |
14 | 14 |
15 extern int cmd_select(); | 15 extern int cmd_select(); |
16 | |
17 extern int display_sim_resp_in_hex(); | |
16 | 18 |
17 cmd_exit() | 19 cmd_exit() |
18 { | 20 { |
19 SCardDisconnect(hCard, SCARD_UNPOWER_CARD); | 21 SCardDisconnect(hCard, SCARD_UNPOWER_CARD); |
20 SCardReleaseContext(hContext); | 22 SCardReleaseContext(hContext); |
28 int (*func)(); | 30 int (*func)(); |
29 } cmdtab[] = { | 31 } cmdtab[] = { |
30 {"exit", 0, 0, cmd_exit}, | 32 {"exit", 0, 0, cmd_exit}, |
31 {"quit", 0, 0, cmd_exit}, | 33 {"quit", 0, 0, cmd_exit}, |
32 {"select", 1, 1, cmd_select}, | 34 {"select", 1, 1, cmd_select}, |
35 {"sim-resp", 0, 0, display_sim_resp_in_hex}, | |
33 {0, 0, 0, 0} | 36 {0, 0, 0, 0} |
34 }; | 37 }; |
35 | 38 |
36 simtool_dispatch_cmd(cmd) | 39 simtool_dispatch_cmd(cmd) |
37 char *cmd; | 40 char *cmd; |