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
21 * GSM-AUTH-REQ <IMSI> RAND1:RAND2[:RAND3]
22 * GSM-AUTH-RESP <IMSI> Kc1:SRES1:Kc2:SRES2[:Kc3:SRES3]
23 * GSM-AUTH-RESP <IMSI> FAILURE
26 * AKA-REQ-AUTH <IMSI>
27 * AKA-RESP-AUTH <IMSI> <RAND> <AUTN> <IK> <CK> <RES>
28 * AKA-RESP-AUTH <IMSI> FAILURE
31 * AKA-AUTS <IMSI> <AUTS> <RAND>
33 * IMSI and max_chal are sent as an ASCII string,
37 * text file in IMSI:Kc:SRES:RAND format, IMSI in ASCII, other fields as hex
73 char imsi[20];
84 char imsi[20];
125 " imsi INTEGER PRIMARY KEY NOT NULL,"
209 unsigned long long imsi;
212 imsi = atoll(imsi_txt);
213 os_snprintf(db_tmp_milenage.imsi, sizeof(db_tmp_milenage.imsi),
214 "%llu", imsi);
216 "SELECT * FROM milenage WHERE imsi=%llu;", imsi);
238 "UPDATE milenage SET sqn='%s' WHERE imsi=%s;",
239 val, m->imsi);
241 printf("Failed to update SQN in database for IMSI %s\n",
242 m->imsi);
295 /* Parse IMSI:Kc:SRES:RAND */
314 /* IMSI */
317 if (!pos || os_strlen(pos) >= sizeof(g->imsi)) {
318 printf("%s:%d - Invalid IMSI\n", fname, line);
322 os_strlcpy(g->imsi, pos, sizeof(g->imsi));
362 static struct gsm_triplet * get_gsm_triplet(const char *imsi)
367 if (strcmp(g->imsi, imsi) == 0) {
376 if (strcmp(g->imsi, imsi) == 0) {
407 /* Parse IMSI Ki OPc AMF SQN [RES_len] */
426 /* IMSI */
429 if (!pos || os_strlen(pos) >= sizeof(m->imsi)) {
430 printf("%s:%d - Invalid IMSI\n", fname, line);
434 os_strlcpy(m->imsi, pos, sizeof(m->imsi));
519 /* IMSI Ki OPc AMF SQN */
529 if (strncmp(buf, m->imsi, imsi_len) == 0 &&
530 m->imsi[imsi_len] == '\0')
538 pos += snprintf(pos, end - pos, "%s ", m->imsi);
570 static struct milenage_parameters * get_milenage(const char *imsi)
575 if (strcmp(m->imsi, imsi) == 0)
582 m = db_get_milenage(imsi);
589 static int sim_req_auth(char *imsi, char *resp, size_t resp_len)
599 pos = strchr(imsi, ' ');
610 ret = snprintf(rpos, rend - rpos, "SIM-RESP-AUTH %s", imsi);
615 m = get_milenage(imsi);
634 while (count < max_chal && (g = get_gsm_triplet(imsi))) {
635 if (strcmp(g->imsi, imsi) != 0)
651 printf("No GSM triplets found for %s\n", imsi);
662 static int gsm_auth_req(char *imsi, char *resp, size_t resp_len)
670 pos = os_strchr(imsi, ' ');
677 ret = os_snprintf(rpos, rend - rpos, "GSM-AUTH-RESP %s", imsi);
682 m = get_milenage(imsi);
702 printf("No GSM triplets found for %s\n", imsi);
734 static int aka_req_auth(char *imsi, char *resp, size_t resp_len)
736 /* AKA-RESP-AUTH <IMSI> <RAND> <AUTN> <IK> <CK> <RES> */
748 m = get_milenage(imsi);
770 printf("Unknown IMSI: %s\n", imsi);
786 ret = snprintf(pos, end - pos, "AKA-RESP-AUTH %s ", imsi);
811 static int aka_auts(char *imsi, char *resp, size_t resp_len)
819 /* AKA-AUTS <IMSI> <AUTS> <RAND> */
821 auts = strchr(imsi, ' ');
832 printf("AKA-AUTS: IMSI=%s AUTS=%s RAND=%s\n",
833 imsi, auts, __rand);
841 m = get_milenage(imsi);
843 printf("Unknown IMSI: %s\n", imsi);
994 "\"AKA-REQ-AUTH <IMSI>\" is used, a single\n"