Lines Matching refs:imsi
73 char imsi[20]; member
84 char imsi[20]; member
209 unsigned long long imsi; in db_get_milenage() local
212 imsi = atoll(imsi_txt); in db_get_milenage()
213 os_snprintf(db_tmp_milenage.imsi, sizeof(db_tmp_milenage.imsi), in db_get_milenage()
214 "%llu", imsi); in db_get_milenage()
216 "SELECT * FROM milenage WHERE imsi=%llu;", imsi); in db_get_milenage()
239 val, m->imsi); in db_update_milenage_sqn()
242 m->imsi); in db_update_milenage_sqn()
317 if (!pos || os_strlen(pos) >= sizeof(g->imsi)) { in read_gsm_triplets()
322 os_strlcpy(g->imsi, pos, sizeof(g->imsi)); in read_gsm_triplets()
362 static struct gsm_triplet * get_gsm_triplet(const char *imsi) in get_gsm_triplet() argument
367 if (strcmp(g->imsi, imsi) == 0) { in get_gsm_triplet()
376 if (strcmp(g->imsi, imsi) == 0) { in get_gsm_triplet()
429 if (!pos || os_strlen(pos) >= sizeof(m->imsi)) { in read_milenage()
434 os_strlcpy(m->imsi, pos, sizeof(m->imsi)); in read_milenage()
529 if (strncmp(buf, m->imsi, imsi_len) == 0 && in update_milenage_file()
530 m->imsi[imsi_len] == '\0') in update_milenage_file()
538 pos += snprintf(pos, end - pos, "%s ", m->imsi); in update_milenage_file()
570 static struct milenage_parameters * get_milenage(const char *imsi) in get_milenage() argument
575 if (strcmp(m->imsi, imsi) == 0) in get_milenage()
582 m = db_get_milenage(imsi); in get_milenage()
589 static int sim_req_auth(char *imsi, char *resp, size_t resp_len) in sim_req_auth() argument
599 pos = strchr(imsi, ' '); in sim_req_auth()
610 ret = snprintf(rpos, rend - rpos, "SIM-RESP-AUTH %s", imsi); in sim_req_auth()
615 m = get_milenage(imsi); in sim_req_auth()
634 while (count < max_chal && (g = get_gsm_triplet(imsi))) { in sim_req_auth()
635 if (strcmp(g->imsi, imsi) != 0) in sim_req_auth()
651 printf("No GSM triplets found for %s\n", imsi); in sim_req_auth()
662 static int gsm_auth_req(char *imsi, char *resp, size_t resp_len) in gsm_auth_req() argument
670 pos = os_strchr(imsi, ' '); in gsm_auth_req()
677 ret = os_snprintf(rpos, rend - rpos, "GSM-AUTH-RESP %s", imsi); in gsm_auth_req()
682 m = get_milenage(imsi); in gsm_auth_req()
702 printf("No GSM triplets found for %s\n", imsi); in gsm_auth_req()
734 static int aka_req_auth(char *imsi, char *resp, size_t resp_len) in aka_req_auth() argument
748 m = get_milenage(imsi); in aka_req_auth()
770 printf("Unknown IMSI: %s\n", imsi); in aka_req_auth()
786 ret = snprintf(pos, end - pos, "AKA-RESP-AUTH %s ", imsi); in aka_req_auth()
811 static int aka_auts(char *imsi, char *resp, size_t resp_len) in aka_auts() argument
821 auts = strchr(imsi, ' '); in aka_auts()
833 imsi, auts, __rand); in aka_auts()
841 m = get_milenage(imsi); in aka_auts()
843 printf("Unknown IMSI: %s\n", imsi); in aka_auts()