📄 svgsmadisp.cpp
字号:
{bytedisp(0x0e) //IEI
bytedisp(0x0f) //LI
bytedisp(0x10) //Auxiliary states
}//Auxiliary states
break;
case 0x10://User information
case 0x50://User information
procUSERtoUSER(0x07);//User-user
if(*recbuf==0xa0) {bytedisp(0x0a)} //More data IEI
break;
default:break;
}//switch(mt)
}//call control message
else if(*recbuf==0x05)//Mobility Management message
{procPDandSI(4);//协议鉴别器&跳指示
mt=*recbuf;
bytedisp(6)
switch(mt)
{
case 0x12: //Authentication request
case 0x52: //Authentication request
*dispbuf++=0x07;//密钥序列号
*dispbuf++=0;
*dispbuf++=3;
*dispbuf++=*recbuf<<3;
*dispbuf++=0xcc;
recbuf++;
displen+=5;
*dispbuf++=0x08;//RAND
*dispbuf++=16;
for(i=0;i<16;i++) *dispbuf++=*recbuf++;
*dispbuf++=0xcc;
displen+=19;
break;
case 0x14: //Authentication response
case 0x54: //Authentication response
*dispbuf++=0x07;//SRES
*dispbuf++=4;
for(i=0;i<4;i++) *dispbuf++=*recbuf++;
*dispbuf++=0xcc;
displen+=7;
break;
case 0x28: //Re-establishment request
case 0x68: //Re-establishment request
*dispbuf++=0x07;//密钥序列号
*dispbuf++=0;
*dispbuf++=3;
*dispbuf++=*recbuf<<3;
*dispbuf++=0xcc;
recbuf++;
displen+=5;
bytedisp(0x08) //MS Classmark2 LI
proc3byte(0x09) //MS Classmark2
procMSID(0x0a);//移动标识
if((*recbuf&0x7f)==0x13)//LAI
{bytedisp(0x0d)
procLAI(0x0e);
}//LAI
break;
case 0x22: //CM service reject
case 0x62: //CM service reject
case 0x29: //Abort
case 0x69: //Abort
case 0x04: //Location update reject
case 0x44: //Location update reject
case 0x31: //MM status(network to MS)
case 0x71: //MM status(MS to network)
bytedisp(0x07) //reject case
break;
case 0x24: //CM service request
case 0x64: //CM service request
*dispbuf++=0x07;//CM service type
*dispbuf++=0;
*dispbuf++=3;
*dispbuf++=*recbuf<<4;
*dispbuf++=0xcc;
*dispbuf++=0x08;//密钥序列号
*dispbuf++=0;
*dispbuf++=3;
*dispbuf++=*recbuf<<1;
*dispbuf++=0xcc;
recbuf++;
displen+=10;
bytedisp(0x09) //MS Classmark2 LI
proc3byte(0x0a) //MS Classmark2
procMSID(0x0b);//移动标识
break;
case 0x18: //Identity request
case 0x58: //Identity request
*dispbuf++=0x07;//CM service type(
*dispbuf++=0;
*dispbuf++=4;
*dispbuf++=*recbuf<<4;
*dispbuf++=0xcc;
displen+=5;
recbuf++;
break;
case 0x19: //Identity response
case 0x59: //Identity response
procMSID(0x07);//移动标识
break;
case 0x01: //IMSI detach indication
case 0x41: //IMSI detach indication
bytedisp(0x07) //MS classmark1
procMSID(0x08);//移动标识
break;
case 0x02: //Location update accept
case 0x42: //Location update accept
procLAI(0x07); //LAI
if((*recbuf&0x7f)==0x17)//移动标识
{bytedisp(0x0a) //移动标识 IEI
procMSID(0x0b);//移动标识
}//移动标识
if(*recbuf==0xa1) {bytedisp(0x0e)} //Follow on proceed IEI
break;
case 0x08: //Location update request
case 0x48: //Location update request
*dispbuf++=0x07;//Locatee update type
*dispbuf++=0;
*dispbuf++=3;
*dispbuf++=*recbuf<<4;
*dispbuf++=0xcc;
*dispbuf++=0x08;//密钥序列号
*dispbuf++=0;
*dispbuf++=3;
*dispbuf++=*recbuf<<1;
*dispbuf++=0xcc;
recbuf++;
displen+=10;
procLAI(0x09); //LAI
bytedisp(0x0c) //MS Classmark1
procMSID(0x0d);//移动标识
break;
case 0x1a: //TMSI reallocation command
case 0x5a: //TMSI reallocation command
procLAI(0x07); //LAI
procMSID(0x0a);//移动标识
break;
default:break;
}
}//Mobility Management message
else if(*recbuf==0x06)//Radio Resource management message
{procPDandSI(4);//协议鉴别器&跳指示
mt=*recbuf;
bytedisp(6)
switch(mt)
{
case 0x3b:
procChanDescription(7); //信道描述
if((*recbuf&0x7f)==0x72) procVARInfoUnit(0x0d);
if((*recbuf&0x7f)==0x7c)//Starting Time
{bytedisp(0x10) //IEI
proc2byte(0x11) //Starting Time
}//Starting Time
break;
case 0x2e://ASSIGNMENT COMMAND
procChanDescription(7); //第一信道描述
bytedisp(0x0d) //Power Command
if((*recbuf&0x7f)==0x05) procVARInfoUnit(0x0e); //Frequency List,after time
if((*recbuf&0x7f)==0x62)//Cell Channel Description
{bytedisp(0x11)
*dispbuf++=0x12; //Cell Channel Description
*dispbuf++=16;
for(i=0;i<16;i++) *dispbuf++=*recbuf++;
*dispbuf++=0xcc;
displen+=19;
}//Cell Channel Description
if((*recbuf&0x7f)==0x63) //第一信道模式
{bytedisp(0x13) //第一信道模式IEI
bytedisp(0x14) //第一信道模式
}//第一信道模式
if((*recbuf&0x7f)==0x64) //第二信道描述,after time
{bytedisp(0x15) //IEI
procChanDescription(0x16); //第二信道描述,after time
}//第二信道描述,after time
if((*recbuf&0x7f)==0x66) //第二信道模式
{bytedisp(0x1c) //第二信道模式IEI
bytedisp(0x1d) //第二信道模式
}//第二信道模式
if((*recbuf&0x7f)==0x72) procVARInfoUnit(0x1e); //Mobile Allocation,after time
if((*recbuf&0x7f)==0x7c) //start time
{bytedisp(0x21) //start timeIEI
proc2byte(0x22) //start time
}//start time
if((*recbuf&0x7f)==0x19) procVARInfoUnit(0x23); //Frequency List,before time
if((*recbuf&0x7f)==0x1c) //第一信道描述,before time
{bytedisp(0x26) //IEI
procChanDescription(0x27); //第一信道描述,before time
}//第一信道描述,before time
if((*recbuf&0x7f)==0x1c) //第二信道描述,before time
{bytedisp(0x2d) //IEI
procChanDescription(0x2e); //第二信道描述,before time
}//第二信道描述,before time
if((*recbuf&0x7f)==0x1e) //频率信道序列,before time
{bytedisp(0x34) //IEI
procFCSeq(0x35);
}//频率信道序列,before time
if((*recbuf&0x7f)==0x21) procVARInfoUnit(0x37); //Mobile Allocation,before time
if((*recbuf&0xf0)==0x90)//加密算法标识
{*dispbuf++=0x35; //加密算法标识
*dispbuf++=1;
*dispbuf++=(*recbuf++)&0x0f;
*dispbuf++=0xcc;
displen+=4;
}//加密算法标识
break;
case 0x29: //ASSIGNMENT COMPLETE
case 0x2f: //ASSIGNMENT Failure
bytedisp(7) //RR Cause value
break;
case 0x10: //Channel Mode Modify
case 0x17: //Channel Mode Modify Acknowledge
procChanDescription(0x07); //信道描述
bytedisp(0x0d) //信道模式
break;
case 0x0d: //Channel Release
bytedisp(0x0d) //RR Cause value
if((*recbuf&0x7f)==0x73)//BA range
{bytedisp(0x08)
li=*recbuf;
bytedisp(0x09)
bytedisp(0x0a)
li--;
*dispbuf++=0x0b;//range
*dispbuf++=li;//range
for(i=0;i<li;i++) *dispbuf++=*recbuf++;
*dispbuf++=0xcc;
displen+=li+3;
}//BA range
break;
case 0x35: //Ciphering mode command
*dispbuf++=7; //加密算法标识
*dispbuf++=0;
*dispbuf++=4;
*dispbuf++=(*recbuf)<<4;
*dispbuf++=0xcc;
*dispbuf++=8; //加密响应
*dispbuf++=0;
*dispbuf++=4;
*dispbuf++=(*recbuf++)&0xf0;
*dispbuf++=0xcc;
displen+=10;
break;
case 0x32: //Ciphering mode complete
if((*recbuf&0x7f)==0x17)//移动标识
{bytedisp(7) //移动标识IEI
procMSID(8);
}//移动标识
break;
case 0x16:
bytedisp(7) //MS Classmark LI
proc3byte(8) //MS Classmark
if((*recbuf&0x7f)==0x20) procVARInfoUnit(9); //Additional MS Classmark
break;
case 0x14:
procChanDescription(0x07); //信道描述
li=*recbuf;
bytedisp(0x0d) //length of Mobile Allocation
if(li>0)
{*dispbuf++=0x0e; //Mobile Allocation
*dispbuf++=li;
for(i=0;i<li;i++) *dispbuf++=*recbuf++;
*dispbuf++=0xcc;
displen+=li+3;
}
proc2byte(0x0f) //Starting time
if((*recbuf&0x7f)==0x62)//小区信道描述
{bytedisp(0x10)
*dispbuf++=0x11; //小区信道描述
*dispbuf++=16;
for(i=0;i<16;i++) *dispbuf++=*recbuf++;
*dispbuf++=0xcc;
displen+=19;
}//小区信道描述
break;
case 0x2b://Handover Command
*dispbuf++=0x07; //BCC of 小区描述
*dispbuf++=0;
*dispbuf++=3;
*dispbuf++=(*recbuf)<<5;
*dispbuf++=0xcc;
*dispbuf++=0x08; //NCC of 小区描述
*dispbuf++=0;
*dispbuf++=3;
*dispbuf++=(*recbuf&0x38)<<2;
*dispbuf++=0xcc;
*dispbuf++=0x09; //BCCH ARFCN of 小区描述
*dispbuf++=0;
*dispbuf++=10;
*dispbuf++=(*recbuf&0xc0)|((*(recbuf+1))>>2);
*dispbuf++=(*(recbuf+1))<<8;
*dispbuf++=0xcc;
recbuf+=2;
displen+=16;
procChanDescription(0x0a); //第一信道描述,after time
bytedisp(0x10) //Handover Reference value
bytedisp(0x11) //Power level(Power Command)
if((*recbuf&0xf0)==0xd0) //Synchronization Indication
{*dispbuf++=0x12;
*dispbuf++=0;
*dispbuf++=4;
*dispbuf++=(*recbuf++)<<4;
*dispbuf++=0xcc;
displen+=5;
}//Synchronization Indication
if((*recbuf&0x7f)==0x02)//Frequence Short List,after time
{bytedisp(0x13) //IEI
*dispbuf++=0x14; //content
*dispbuf++=9;
for(i=0;i<9;i++) *dispbuf++=*recbuf++;
*dispbuf++=0xcc;
displen+=12;
}//Frequence Short List,after time
if((*recbuf&0x7f)==0x05) procVARInfoUnit(0x15);//Frequence List,after time
if((*recbuf&0x7f)==0x62)//小区信道描述
{bytedisp(0x18) //IEI
*dispbuf++=0x19; //小区信道描述
*dispbuf++=16;
for(i=0;i<16;i++) *dispbuf++=*recbuf++;
*dispbuf++=0xcc;
displen+=19;
}//小区信道描述
if((*recbuf&0x7f)==0x63)//第一信道模式
{bytedisp(0x1a) //IEI
bytedisp(0x1b) //第一信道模式
}//第一信道模式
if((*recbuf&0x7f)==0x64)//第二信道描述,after time
{bytedisp(0x1c) //IEI
procChanDescription(0x1d); //第二信道描述,after time
}//第二信道描述,after time
if((*recbuf&0x7f)==0x66)//第二信道模式
{bytedisp(0x23) //IEI
bytedisp(0x24) //第二信道模式
}//第二信道模式
if((*recbuf&0x7f)==0x69)//Frequence Channel Sequence,after time
{bytedisp(0x25) //IEI
procFCSeq(0x26); //Frequence Channel Sequence,after time
}//Frequence Channel Sequence,after time
if((*recbuf&0x7f)==0x72) procVARInfoUnit(0x28); //Mobile Allocation,after time
if((*recbuf&0x7f)==0x7c)//Starting Time
{bytedisp(0x2b) //IEI
proc2byte(0x2c) //Starting Time
}//Starting Time
if((*recbuf&0x7f)==0x7b)//RealTime Difference
{bytedisp(0x2d) //IEI
bytedisp(0x2e) //LI
bytedisp(0x2f) //RealTime Difference
}//RealTime Difference
if((*recbuf&0x7f)==0x7d)//Timing Advance
{bytedisp(0x30) //IEI
bytedisp(0x31) //Timing Advance
}//Timing Advance
if((*recbuf&0x7f)==0x12)//Frequence Short List,before time
{bytedisp(0x32) //IEI
*dispbuf++=0x33;//Frequence Short List,before time
*dispbuf++=9;
for(i=0;i<9;i++) *dispbuf++=*recbuf++;
*dispbuf++=0xcc;
displen+=12;
}//Frequence Short List,before time
if((*recbuf&0x7f)==0x19) procVARInfoUnit(0x34); //Frequence List,before time
if((*recbuf&0x7f)==0x1c)//第一信道描述,before time
{bytedisp(0x37) //IEI
procChanDescription(0x38); //第一信道描述,before time
}//第一信道描述,before time
if((*recbuf&0x7f)==0x1d)//第二信道描述,before time
{bytedisp(0x3e) //IEI
procChanDescription(0x3f); //第二信道描述,before time
}//第二信道描述,before time
if((*recbuf&0x7f)==0x1e)//Frequence Channel Sequence,before time
{bytedisp(0x45) //IEI
procFCSeq(0x46); //Frequence Channel Sequence,before time
}//Frequence Channel Sequence,before time
if((*recbuf&0x7f)==0x21) procVARInfoUnit(0x48); //Mobile Allocation,before time
if((*recbuf&0xf0)==0x90)//加密算法标识(加密模式设置)
{*dispbuf++=0x4b;
*dispbuf++=0;
*dispbuf++=4;
*dispbuf++=(*recbuf++)<<4;
*dispbuf++=0xcc;
displen+=5;
}//加密算法标识(加密模式设置)
break;
case 0x2c: //Handover Complete
bytedisp(0x07) //RR cause
if((*recbuf&0x7f)==0x77) procVARInfoUnit(0x08); //Mobile Observed Time Difference
break;
case 0x28: //Handover Failure
bytedisp(0x07) //RR cause
break;
case 0x15: //Measurement report
*dispbuf++=0x07; //Measurement result
*dispbuf++=16;
for(i=0;i<16;i++) *dispbuf++=*recbuf++;
*dispbuf++=0xcc;
displen+=19;
break;
case 0x27: //Paging Response
*dispbuf++=0x07; //密钥序列号
*dispbuf++=0;
*dispbuf++=3;
*dispbuf++=*(recbuf++)<<5;
*dispbuf++=0xcc;
displen+=5;
bytedisp(0x08) //length of MS Classmark2
proc3byte(0x09) //MS Classmark2
procMSID(0x0a); //移动标识
break;
case 0x0a: //Partial release
procChanDescription(0x07); //信道描述
break;
case 0x2d: //Physical information
bytedisp(0x07) //Timing Advance
break;
case 0x12: //RR status
bytedisp(0x07) //RR cause
break;
case 0x1d: //System information type 5
case 0x05: //System information type 5bis
*dispbuf++=0x07; //Measurement result
*dispbuf++=16;
for(i=0;i<16;i++) *dispbuf++=*recbuf++;
*dispbuf++=0xcc;
displen+=19;
break;
case 0x1e: //System information type 6
proc2byte(0x07) //Cell Identity
procLAI(0x08); //LAI
bytedisp(0x0b) //Cell Option
bytedisp(0x0b) //NCC Permitted
break;
default:break;
}//switch(mt)
}//Radio Resource management message
else if((*recbuf&0x03)==0x01)//Radio Resource management message with L2 li
{*dispbuf++=4; //L2 Pseudo length
*dispbuf++=0;
*dispbuf++=6;
*dispbuf++=(*recbuf++)&0xfc;
*dispbuf++=0xcc;
displen+=5;
procPDandSI(5);//协议鉴别器&跳指示
mt=*recbuf;
bytedisp(7) //MT
switch(mt)
{
case 0x3f: //Immediate assignment
*dispbuf++=8; //Page Mode
*dispbuf++=0;
*dispbuf++=4;
*dispbuf++=*recbuf<<4;
recbuf++;
*dispbuf++=0xcc;
displen+=5;
procChanDescription(0x09); //信道描述
procReqRef(0x0f); //请求参考
bytedisp(0x13) //Time Advance
li=*recbuf; //get Mobile Allocation len
bytedisp(0x14) //Mobile Allocation len
if(li!=0)
{*dispbuf++=0x15; //Mobile Allocation
*dispbuf++=li;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -