min match by mcc mnc
来源:互联网 发布:宇信数据科技有限公司 编辑:程序博客网 时间:2024/05/01 21:19
#include <stdio.h>
#include <string.h>
static char match8[][24] = {"72406", "72410", "72411", "72423", "72402",
"72403", "72404", "72408", "72431", "72424",
"72416", "72432", "72433", "72434", "72439",
"73002", "73009", "73001", "73010", "73003",
"73008", "73004", "73005", "73007" };
static char match7[][8] = { "722310", "722341", "72234", "72207", "21407",
"71606", "71610", "71617" };
int getMatchCountByMccMnc() {
int matchCount = 2;
char *pMccMnc =(char *)malloc(40);
memset(pMccMnc, 0, sizeof(char) * 40);
property_get("gsm.sim.operator.numeric", pMccMnc,"0");
int i = 0;
while( i < sizeof(match7)/sizeof(match7[0])) {
if(strcmp(pMccMnc, match7[i]) == 0) {
printf("mcc mnc %s is 7 bit match!\n", match7[i]);
matchCount = 7;
goto exit;
}
i++;
}
i = 0;
while( i < sizeof(match8)/sizeof(match8[0])) {
if(strcmp(pMccMnc, match8[i]) == 0) {
printf("mcc mnc %s is 8 bit match!\n", match8[i]);
matchCount = 8;
goto exit;
}
i++;
}
printf("No mcc mnc match, use default 7 bit\n");
exit:
free(pMccMnc);
return matchCount;
}
int main() {
getMatchCountByMccMnc();
return 0;
}
#include <string.h>
static char match8[][24] = {"72406", "72410", "72411", "72423", "72402",
"72403", "72404", "72408", "72431", "72424",
"72416", "72432", "72433", "72434", "72439",
"73002", "73009", "73001", "73010", "73003",
"73008", "73004", "73005", "73007" };
static char match7[][8] = { "722310", "722341", "72234", "72207", "21407",
"71606", "71610", "71617" };
int getMatchCountByMccMnc() {
int matchCount = 2;
char *pMccMnc =(char *)malloc(40);
memset(pMccMnc, 0, sizeof(char) * 40);
property_get("gsm.sim.operator.numeric", pMccMnc,"0");
int i = 0;
while( i < sizeof(match7)/sizeof(match7[0])) {
if(strcmp(pMccMnc, match7[i]) == 0) {
printf("mcc mnc %s is 7 bit match!\n", match7[i]);
matchCount = 7;
goto exit;
}
i++;
}
i = 0;
while( i < sizeof(match8)/sizeof(match8[0])) {
if(strcmp(pMccMnc, match8[i]) == 0) {
printf("mcc mnc %s is 8 bit match!\n", match8[i]);
matchCount = 8;
goto exit;
}
i++;
}
printf("No mcc mnc match, use default 7 bit\n");
exit:
free(pMccMnc);
return matchCount;
}
int main() {
getMatchCountByMccMnc();
return 0;
}
- min match by mcc mnc
- MCC MNC
- MCC/MNC
- MCC/MNC
- IMSI-MCC-MNC
- MCC与MNC
- 运营商MCC+MNC
- MCC、MNC计算方法
- imsi+mcc+mnc
- Android 读取MCC, MNC
- MCC MNC 什么意思
- MCC与MNC
- MCC 以及 MNC
- MCC 以及 MNC
- Android 读取MCC, MNC
- 运营商MCC,MNC大全
- IMSI , MCC MNC 的概念
- android 如何获取MCC/MNC
- Visual C++ 2008下,SDL的编译链接问题!
- 指针篇之十 传递指针共享内存
- C#记录程序运行时间记录显示
- 在ubuntu中安装编译工具mingw
- java时间操作
- min match by mcc mnc
- python 学习笔记 6 -- 异常处理
- yymore & yyless
- 对一个vim 函数的详细注释。
- AAC ADTS LATM 格式分析
- C#与JavaScript互相调用
- fork()与输出缓冲区:一个有意思的坑
- android.app.Activity//
- 使用waveOut接口在Windows中播放声音