Home | History | Annotate | Download | only in hostapd

Lines Matching defs:imsi

18  * SIM-REQ-AUTH <IMSI> <max_chal>
19 * SIM-RESP-AUTH <IMSI> Kc1:SRES1:RAND1 Kc2:SRES2:RAND2 [Kc3:SRES3:RAND3]
20 * SIM-RESP-AUTH <IMSI> FAILURE
23 * AKA-REQ-AUTH <IMSI>
24 * AKA-RESP-AUTH <IMSI> <RAND> <AUTN> <IK> <CK> <RES>
25 * AKA-RESP-AUTH <IMSI> FAILURE
28 * AKA-AUTS <IMSI> <AUTS> <RAND>
30 * IMSI and max_chal are sent as an ASCII string,
34 * text file in IMSI:Kc:SRES:RAND format, IMSI in ASCII, other fields as hex
65 char imsi[20];
76 char imsi[20];
115 " imsi INTEGER PRIMARY KEY NOT NULL,"
194 unsigned long long imsi;
197 imsi = atoll(imsi_txt);
198 os_snprintf(db_tmp_milenage.imsi, sizeof(db_tmp_milenage.imsi),
199 "%llu", imsi);
201 "SELECT ki,opc,amf,sqn FROM milenage WHERE imsi=%llu;",
202 imsi);
221 "UPDATE milenage SET sqn='%s' WHERE imsi=%s;",
222 val, m->imsi);
224 printf("Failed to update SQN in database for IMSI %s\n",
225 m->imsi);
278 /* Parse IMSI:Kc:SRES:RAND */
297 /* IMSI */
300 printf("%s:%d - Invalid IMSI (%s)\n",
306 if (strlen(pos) >= sizeof(g->imsi)) {
307 printf("%s:%d - Too long IMSI (%s)\n",
312 os_strlcpy(g->imsi, pos, sizeof(g->imsi));
371 static struct gsm_triplet * get_gsm_triplet(const char *imsi)
376 if (strcmp(g->imsi, imsi) == 0) {
385 if (strcmp(g->imsi, imsi) == 0) {
416 /* Parse IMSI Ki OPc AMF SQN */
435 /* IMSI */
438 printf("%s:%d - Invalid IMSI (%s)\n",
444 if (strlen(pos) >= sizeof(m->imsi)) {
445 printf("%s:%d - Too long IMSI (%s)\n",
450 os_strlcpy(m->imsi, pos, sizeof(m->imsi));
544 /* IMSI Ki OPc AMF SQN */
554 if (strncmp(buf, m->imsi, imsi_len) == 0 &&
555 m->imsi[imsi_len] == '\0')
563 pos += snprintf(pos, end - pos, "%s ", m->imsi);
595 static struct milenage_parameters * get_milenage(const char *imsi)
600 if (strcmp(m->imsi, imsi) == 0)
607 m = db_get_milenage(imsi);
615 char *imsi)
625 pos = strchr(imsi, ' ');
636 ret = snprintf(rpos, rend - rpos, "SIM-RESP-AUTH %s", imsi);
641 m = get_milenage(imsi);
660 while (count < max_chal && (g = get_gsm_triplet(imsi))) {
661 if (strcmp(g->imsi, imsi) != 0)
677 printf("No GSM triplets found for %s\n", imsi);
715 char *imsi)
717 /* AKA-RESP-AUTH <IMSI> <RAND> <AUTN> <IK> <CK> <RES> */
729 m = get_milenage(imsi);
745 printf("Unknown IMSI: %s\n", imsi);
761 ret = snprintf(pos, end - pos, "AKA-RESP-AUTH %s ", imsi);
792 char *imsi)
798 /* AKA-AUTS <IMSI> <AUTS> <RAND> */
800 auts = strchr(imsi, ' ');
810 printf("AKA-AUTS: IMSI=%s AUTS=%s RAND=%s\n", imsi, auts, __rand);
817 m = get_milenage(imsi);
819 printf("Unknown IMSI: %s\n", imsi);