diff options
author | Andreas.Eversberg <jolly@eversberg.eu> | 2010-09-19 10:52:42 +0000 |
---|---|---|
committer | Andreas.Eversberg <jolly@eversberg.eu> | 2010-09-19 10:52:42 +0000 |
commit | 5e1cf12d67be5f45d811fc5f2529ba6593981b92 (patch) | |
tree | 8712b3bc5a9c2a67c2e8788e1517cfe6a4bccef5 /src/host/layer23/include/osmocom | |
parent | 0856c8a6a5ad48d810da598b421f81fc21d0ba55 (diff) |
[layer23] Fixed and completed SIM's PIN handling
Use VTY to handle PIN:
enable
sim pin 1 xxxx
sim change-pin 1 xxxx yyyy
sim disable-pin 1 xxxx
sim enable-pin 1 xxxx
sim unlock-pin 1 uuuuuuuu yyyy
1 = mobile station "1"
xxxx = current PIN
yyyy = new PIN
uuuuuuuu = unlock key (PuK)
Diffstat (limited to 'src/host/layer23/include/osmocom')
-rw-r--r-- | src/host/layer23/include/osmocom/bb/common/sim.h | 12 | ||||
-rw-r--r-- | src/host/layer23/include/osmocom/bb/mobile/subscriber.h | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/host/layer23/include/osmocom/bb/common/sim.h b/src/host/layer23/include/osmocom/bb/common/sim.h index c1e6087a..a676b92b 100644 --- a/src/host/layer23/include/osmocom/bb/common/sim.h +++ b/src/host/layer23/include/osmocom/bb/common/sim.h @@ -174,8 +174,8 @@ struct gsm_sim { int job_state; uint8_t reset; - uint8_t pin1[8], pin2[8]; - uint8_t pin1_len, pin2_len; + uint8_t chv1_remain, chv2_remain; + uint8_t unblk1_remain, unblk2_remain; }; struct sim_hdr { @@ -215,16 +215,16 @@ struct gsm1111_response_mfdf_gsm { uint8_t rfu1; uint8_t chv1_remain:4, rfu2:3, - chv1_init; + chv1_init:1; uint8_t unblk1_remain:4, rfu3:3, - unblk1_init; + unblk1_init:1; uint8_t chv2_remain:4, rfu4:3, - chv2_init; + chv2_init:1; uint8_t unblk2_remain:4, rfu5:3, - unblk2_init; + unblk2_init:1; uint8_t more_data[0]; } __attribute__ ((packed)); diff --git a/src/host/layer23/include/osmocom/bb/mobile/subscriber.h b/src/host/layer23/include/osmocom/bb/mobile/subscriber.h index 93e70524..15af5d06 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/subscriber.h +++ b/src/host/layer23/include/osmocom/bb/mobile/subscriber.h @@ -81,7 +81,8 @@ int gsm_subscr_init(struct osmocom_ms *ms); int gsm_subscr_exit(struct osmocom_ms *ms); int gsm_subscr_testcard(struct osmocom_ms *ms, uint16_t mcc, uint16_t mnc); int gsm_subscr_simcard(struct osmocom_ms *ms); -void gsm_subscr_sim_pin(struct osmocom_ms *ms, char *pin); +void gsm_subscr_sim_pin(struct osmocom_ms *ms, char *pin1, char *pin2, + int8_t mode); int gsm_subscr_write_loci(struct osmocom_ms *ms); int gsm_subscr_generate_kc(struct osmocom_ms *ms, uint8_t key_seq, uint8_t *rand, uint8_t no_sim); |