Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching full:imsi

125 		if (cred->pcsc || cred->imsi)
137 if (cred->pcsc || cred->imsi)
153 if (cred->domain || cred->pcsc || cred->imsi)
602 static int plmn_id_match(struct wpabuf *anqp, const char *imsi, int mnc_len)
609 plmn[0] = (imsi[0] - '0') | ((imsi[1] - '0') << 4);
610 plmn[1] = imsi[2] - '0';
613 plmn[1] |= (imsi[5] - '0') << 4;
616 plmn[2] = (imsi[3] - '0') | ((imsi[4] - '0') << 4);
665 static int build_root_nai(char *nai, size_t nai_len, const char *imsi,
675 * <aka:0|sim:1><IMSI>@wlan.mnc<MNC>.mcc<MCC>.3gppnetwork.org
679 if (imsi == NULL || os_strlen(imsi) > 16) {
680 wpa_printf(MSG_DEBUG, "No valid IMSI available");
683 sep = os_strchr(imsi, '-');
685 plmn_len = sep - imsi;
687 } else if (mnc_len && os_strlen(imsi) >= 3 + mnc_len) {
689 msin = imsi + plmn_len;
700 os_memcpy(pos, imsi, plmn_len);
707 *pos++ = imsi[3];
708 *pos++ = imsi[4];
710 *pos++ = imsi[3];
711 *pos++ = imsi[4];
712 *pos++ = imsi[5];
715 imsi[0], imsi[1], imsi[2]);
721 static int set_root_nai(struct wpa_ssid *ssid, const char *imsi, char prefix)
724 if (build_root_nai(nai, sizeof(nai), imsi, 0, prefix) < 0)
818 if (!cred->pcsc && set_root_nai(ssid, cred->imsi, prefix) < 0) {
1340 const char *imsi;
1345 wpa_s->imsi[0]) {
1346 imsi = wpa_s->imsi;
1352 if (cred->imsi == NULL || !cred->imsi[0] ||
1356 sep = os_strchr(cred->imsi, '-');
1358 (sep - cred->imsi != 5 && sep - cred->imsi != 6))
1360 mnc_len = sep - cred->imsi - 3;
1361 imsi = cred->imsi;
1368 ret = plmn_id_match(bss->anqp->anqp_3gpp, imsi, mnc_len);
1486 char *imsi = NULL;
1488 if (cred->imsi)
1489 imsi = cred->imsi;
1492 wpa_s->scard && wpa_s->imsi[0]) {
1493 imsi = wpa_s->imsi;
1498 imsi && build_root_nai(nai, sizeof(nai), imsi, mnc_len, 0) == 0) {