FreeCalypso > hg > fc-pcsc-tools
comparison simtool/miscadm.c @ 183:2545dd27ca38
fc-simtool write-imsi-sh command implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 06 Mar 2021 05:24:26 +0000 |
parents | f4edccd4b583 |
children | 9797417ececa |
comparison
equal
deleted
inserted
replaced
182:f4edccd4b583 | 183:2545dd27ca38 |
---|---|
118 nibbles[0] = 1; | 118 nibbles[0] = 1; |
119 binrec[0] = (ndig + 2) >> 1; | 119 binrec[0] = (ndig + 2) >> 1; |
120 pack_reversed_nibbles(nibbles, binrec + 1, 8); | 120 pack_reversed_nibbles(nibbles, binrec + 1, 8); |
121 return write_imsi_bin(binrec); | 121 return write_imsi_bin(binrec); |
122 } | 122 } |
123 | |
124 cmd_write_imsi_sh(argc, argv) | |
125 char **argv; | |
126 { | |
127 int rc; | |
128 u_char nibbles[16], binrec[9]; | |
129 | |
130 rc = parse_decimal_shorthand(argv[1], nibbles + 1, 15); | |
131 if (rc < 0) | |
132 return(rc); | |
133 nibbles[0] = 9; | |
134 binrec[0] = 8; | |
135 pack_reversed_nibbles(nibbles, binrec + 1, 8); | |
136 return write_imsi_bin(binrec); | |
137 } |