ocs init
This commit is contained in:
918
plat/xapp/src/mapp/Map_opr.c
Normal file
918
plat/xapp/src/mapp/Map_opr.c
Normal file
@@ -0,0 +1,918 @@
|
||||
#include "map_includes.h"
|
||||
|
||||
/**************** vlr inquery opr ********************/
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding MapDetermineOprUser Arg argument */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_MapDetermineOprUserArg(struct MapDetermineOprUser_Arg *dou_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = dou_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,dou_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
if (flag & 0x02) // has imei
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMEI_LEN,dou_ptr->imei,0x80,&asn_buf);//add imei parameter
|
||||
}
|
||||
|
||||
if (flag & 0x04) //has roamingRestraintFlag
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&dou_ptr->roamingRestraintFlag,0x80,&asn_buf);
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapDetermineOprUserArg(struct MapDetermineOprUser_Arg *dou_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
dou_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapDetermineOprUserArg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(dou_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len == IMEI_LEN) // get imei
|
||||
{
|
||||
flag |= 0x02;
|
||||
memcpy(dou_ptr->imei,temp_buf,len);
|
||||
}
|
||||
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get roamingRestraintFlag
|
||||
if (len == 1)
|
||||
{
|
||||
dou_ptr->roamingRestraintFlag = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding MapDetermineOprUser Response */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_MapDetermineOprUserRes(struct MapDetermineOprUser_Res *dou_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = dou_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,dou_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDetermineOprUserRes loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x02) // has imei
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMEI_LEN,dou_ptr->imei,0x80,&asn_buf);//add imei parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDetermineOprUserRes loss IMEI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x04) //has oprFlag
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&dou_ptr->oprflag,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDetermineOprUserRes loss oprFlag");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x08) //has msisdn
|
||||
{
|
||||
sprintf(tlv1,"3-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,dou_ptr->msisdn[0],dou_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapDetermineOprUserRes(struct MapDetermineOprUser_Res *dou_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
dou_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapDetermineOprUserRes param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(dou_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDetermineOprUserRes:loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len == IMEI_LEN) // get imei
|
||||
{
|
||||
flag |= 0x02;
|
||||
memcpy(dou_ptr->imei,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDetermineOprUserRes:loss IMEI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get oprflag
|
||||
if (len == 1)
|
||||
{
|
||||
dou_ptr->oprflag = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDetermineOprUserRes:loss oprflag");
|
||||
return RER;
|
||||
}
|
||||
len = get_tlv("3",temp_buf,&asn_buf); //get msisdn
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x08;
|
||||
dou_ptr->msisdn[0] = len;
|
||||
memcpy(dou_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
/**************** opr updataLocation vlr ********************/
|
||||
int assign_MapVlrUpdateLocationArg(struct MapVlrUpdateLocation_Arg *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapVlrUpdateLocationArg loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x02) // has oprflag
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->status,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapVlrUpdateLocationArg loss status");
|
||||
return RER;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int extract_MapVlrUpdateLocationArg(struct MapVlrUpdateLocation_Arg *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapVlrUpdateLocationArg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapVlrUpdateLocationArg:loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
len = get_tlv("1",temp_buf,&asn_buf);/* get status */
|
||||
if (len == 1)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->status = temp_buf[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapVlrUpdateLocationArg:loss status");
|
||||
return RER;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int assign_MapVlrUpdateLocationRes(struct MapVlrUpdateLocation_Res *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
if (flag & 0x02) // has status
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->status,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
if (flag & 0x04) //has error
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->error,0x80,&asn_buf);
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapVlrUpdateLocationRes(struct MapVlrUpdateLocation_Res *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapVlrUpdateLocationRes param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len == 1)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->status = temp_buf[0];
|
||||
}
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get reult
|
||||
if (len == 1)
|
||||
{
|
||||
cuwm_ptr->error = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
/**************** opr create hlr ********************/
|
||||
int assign_MapCreateUserWithMsisdnImsiArg(struct MapCreateUserWithMsisdnImsi_Arg *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiArg loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,cuwm_ptr->msisdn[0],cuwm_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiArg loss MSISDN");
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (flag & 0x04) //has imsiFlag
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->imsiflag,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiArg loss imsiFlag");
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (flag & 0x08) //has camelFlag
|
||||
{
|
||||
sprintf(tlv1,"3-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->camelflag,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiArg loss camelflag");
|
||||
return RER;
|
||||
}
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int extract_MapCreateUserWithMsisdnImsiArg(struct MapCreateUserWithMsisdnImsi_Arg *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapCreateUserWithMsisdnImsiArg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapCreateUserWithMsisdnImsiArg:loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->msisdn[0] = len;
|
||||
memcpy(cuwm_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapCreateUserWithMsisdnImsiArg:msisdn length error");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get imsiflag
|
||||
if (len == 1)
|
||||
{
|
||||
cuwm_ptr->imsiflag = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapCreateUserWithMsisdnImsiArg:loss roamingRestraintFlag");
|
||||
return RER;
|
||||
}
|
||||
len = get_tlv("3",temp_buf,&asn_buf); //get camelflag
|
||||
if (len == 1)
|
||||
{
|
||||
cuwm_ptr->camelflag = temp_buf[0];
|
||||
flag |= 0x08;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapCreateUserWithMsisdnImsiArg:loss camelflag");
|
||||
return RER;
|
||||
}
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int assign_MapCreateUserWithMsisdnImsiRes(struct MapCreateUserWithMsisdnImsi_Res *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,cuwm_ptr->msisdn[0],cuwm_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
|
||||
if (flag & 0x04) //has result
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->result,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiRes loss result");
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (flag & 0x08) //has cause
|
||||
{
|
||||
sprintf(tlv1,"3-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->cause,0x80,&asn_buf);
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapCreateUserWithMsisdnImsiRes(struct MapCreateUserWithMsisdnImsi_Res *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapCreateUserWithMsisdnImsiRes param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->msisdn[0] = len;
|
||||
memcpy(cuwm_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get reult
|
||||
if (len == 1)
|
||||
{
|
||||
cuwm_ptr->result = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapCreateUserWithMsisdnImsiArg:loss result");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("3",temp_buf,&asn_buf); //get cause
|
||||
if (len == 1)
|
||||
{
|
||||
cuwm_ptr->cause = temp_buf[0];
|
||||
flag |= 0x08;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*********** opr delete hlr ***************************/
|
||||
int assign_MapDeleteOprUserArg(struct MapDeleteOprUser_Arg *dou_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = dou_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,dou_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDeleteOprUserArg loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,dou_ptr->msisdn[0],dou_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDeleteOprUserArg loss MSISDN");
|
||||
return RER;
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int extract_MapDeleteOprUserArg(struct MapDeleteOprUser_Arg *dou_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
dou_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapDeleteOprUserArg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(dou_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDeleteOprUserArg:loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
dou_ptr->msisdn[0] = len;
|
||||
memcpy(dou_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDeleteOprUserArg:msisdn length error");
|
||||
return RER;
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int assign_MapDeleteOprUserRes(struct MapDeleteOprUser_Res *dou_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = dou_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,dou_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,dou_ptr->msisdn[0],dou_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
|
||||
if (flag & 0x04) //has result
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&dou_ptr->result,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDeleteOprUserRes loss result");
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (flag & 0x08) //has cause
|
||||
{
|
||||
sprintf(tlv1,"3-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&dou_ptr->cause,0x80,&asn_buf);
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapDeleteOprUserRes(struct MapDeleteOprUser_Res *dou_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
dou_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapDeleteOprUserRes param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(dou_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
dou_ptr->msisdn[0] = len;
|
||||
memcpy(dou_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get reult
|
||||
if (len == 1)
|
||||
{
|
||||
dou_ptr->result = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDeleteOprUserRes:loss result");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("3",temp_buf,&asn_buf); //get cause
|
||||
if (len == 1)
|
||||
{
|
||||
dou_ptr->cause = temp_buf[0];
|
||||
flag |= 0x08;
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int assign_MapVlrEnquiryIMDM_Arg(struct MapVlrEnquiryIMDM_Arg *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add imsi parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapVlrEnquiryIMDM_Arg loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,cuwm_ptr->msisdn[0],cuwm_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiArg loss MSISDN");
|
||||
return RER;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int assign_MapVlrEnquiryIMDM_Res(struct MapVlrEnquiryIMDM_Res *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add imsi parameter
|
||||
}
|
||||
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,cuwm_ptr->msisdn[0],cuwm_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
if (flag & 0x04) // has status
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->status,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapVlrEnquiryIMDM_Arg loss staus");
|
||||
return RER;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int extract_MapVlrEnquiryIMDM_Arg(struct MapVlrEnquiryIMDM_Arg *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapVlrEnquiryIMDM_Arg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapVlrEnquiryIMDM_Arg:loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->msisdn[0] = len;
|
||||
memcpy(cuwm_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapVlrEnquiryIMDM_Arg:msisdn length error");
|
||||
return RER;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapVlrEnquiryIMDM_Res(struct MapVlrEnquiryIMDM_Res *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapVlrEnquiryIMDM_Res param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->msisdn[0] = len;
|
||||
memcpy(cuwm_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf);/* status */
|
||||
if (len == 1)
|
||||
{
|
||||
flag |= 0x04;
|
||||
cuwm_ptr->status = temp_buf[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapVlrEnquiryIMDM_Res:status loss");
|
||||
return RER;
|
||||
}
|
||||
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
28
plat/xapp/src/mapp/imap.h
Normal file
28
plat/xapp/src/mapp/imap.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/* MAP message interface head file */
|
||||
/* Written by Liu Zhiguo 2003-08-26 */
|
||||
/* Version 1.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#ifndef _MAP_INTERFACE
|
||||
#define _MAP_INTERFACE
|
||||
|
||||
#include "../../../sccp/src/include/sccp.h"
|
||||
#include "map_const.h"
|
||||
#include "map_struct.h"
|
||||
|
||||
int build_mapparam(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
u8 extract_mapparam(struct MapOprSrv_struct *opr_ptr,u8 opr_code,u8 opr_flag,u32 pre_param_len,u8 *pre_param);
|
||||
|
||||
int build_is41param(struct MapOprSrv_struct *opr_ptr,u8 *buf); // build is41 service paramter
|
||||
u8 extract_is41param(struct MapOprSrv_struct *opr_ptr,u8 opr_code,u8 opr_flag,u32 pre_param_len,u8 *pre_param);
|
||||
|
||||
int code_ansitcap_digits(struct _ansiTcapDigits *digits, u8 *outBuf);// return len
|
||||
int decode_ansitcap_digits(struct _ansiTcapDigits *digits, u8 *inBuf);
|
||||
|
||||
int build_ainparam(struct MapOprSrv_struct *opr_ptr,u8 *buf); // build ain service paramter
|
||||
u8 extract_ainparam(struct MapOprSrv_struct *opr_ptr,u8 opr_code,u8 opr_flag,u32 pre_param_len,u8 *pre_param);
|
||||
|
||||
void is41_init();
|
||||
void is41_timer();
|
||||
|
||||
#endif
|
||||
110
plat/xapp/src/mapp/is41_code.h
Normal file
110
plat/xapp/src/mapp/is41_code.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/* IS41 code define */
|
||||
/* Created by daniel on 2005-05-27 */
|
||||
/* Modified by daniel on 2005-05-27 */
|
||||
/* -------------------------------------*/
|
||||
#ifndef _IS41_CODE
|
||||
#define _IS41_CODE
|
||||
|
||||
//Authorization Denied reason
|
||||
#define AUTHDEN_DELINQUENT_ACCOUNT 1
|
||||
#define AUTHDEN_INVALID_SERIAL_NUMBER 2
|
||||
#define AUTHDEN_STOLEN_UNIT 3
|
||||
#define AUTHDEN_DUPLICATE_UNIT 4
|
||||
#define AUTHDEN_UNASSIGNED_DIRECTORY_NUMBER 5
|
||||
#define AUTHDEN_UNSPECIFIED 6
|
||||
#define AUTHDEN_MULTIPLE_ACCESS 7
|
||||
#define AUTHDEN_NOT_AUTHORIZED_FOR_THE_MSC 8
|
||||
#define AUTHDEN_MISSING_AUTHENTICATION_PARAMETERS 9
|
||||
#define AUTHDEN_TERMINALTYPE_MISMATCH 10
|
||||
|
||||
#define WXC_SYSTEM_MY_TYPE_CODE 0
|
||||
|
||||
#define CANTYP_SERVING_SYSTEM_OPTION 1
|
||||
#define CANTYP_REPORTINCALL 2
|
||||
#define CANTYP_DISCONTINUE 3
|
||||
|
||||
//type of digits
|
||||
#define TOD_CALLED_PARTY_NUMBER 1
|
||||
#define TOD_CALLING_PARTY_NUMBER 2
|
||||
#define TOD_CALLER_INTERACTION 3
|
||||
#define TOD_ROUTING_NUMBER 4
|
||||
#define TOD_BILLING_NUMBER 5
|
||||
#define TOD_DESTINATION_NUMBER 6//This is the network address of the called party
|
||||
#define TOD_LATA 7
|
||||
#define TOD_CARRIER 8//In North America the three, four, or five digits represent an interexchange or international carrier
|
||||
|
||||
#define QUALCODE_VALIDATION_ONLY 2
|
||||
#define QUALCODE_VALIDATION_AND_PROFILE 3
|
||||
#define QUALCODE_PROFILE_ONLY 4
|
||||
|
||||
#define ACCDEN_UNASSIGNED_DIRECTORY_NUMBER 1
|
||||
#define ACCDEN_INACTIVE 2
|
||||
#define ACCDEN_BUSY 3
|
||||
#define ACCDEN_TERMINATION_DENIED 4
|
||||
#define ACCDEN_NO_PAGE_RESPONSE 5
|
||||
#define ACCDEN_UNAVAILABLE 6
|
||||
|
||||
//DMH_RedirectionIndicator
|
||||
#define REDIND_CFU 1
|
||||
#define REDIND_CFB 2
|
||||
#define REDIND_CFNA 3
|
||||
#define REDIND_CFO 4
|
||||
#define REDIND_CD_UNSPECIFIED 5
|
||||
#define REDIND_CD_PSTN 6
|
||||
#define REDIND_CD_PRIVATE 7
|
||||
#define REDIND_PSTN_TANDEM 8
|
||||
#define REDIND_PRIVATE_TANDEM 9
|
||||
#define REDIND_BUSY 10
|
||||
#define REDIND_INACTIVE 11
|
||||
#define REDIND_UNASSIGNED 12
|
||||
#define REDIND_TERMINATION_DENIED 13
|
||||
#define REDIND_CD_FAILURE 14
|
||||
#define REDIND_ECT 15
|
||||
#define REDIND_MAH 16
|
||||
#define REDIND_FA 17
|
||||
#define REDIND_ABANDONED_CALL_LEG 18
|
||||
#define REDIND_PCA_CALL_REFUSED 19
|
||||
#define REDIND_SCA_CALL_REFUSED 20
|
||||
#define REDIND_DIALOGUE 21
|
||||
#define REDIND_CFD 22
|
||||
#define REDIND_CD_LOCAL 23
|
||||
#define REDIND_VOICE_MAIL_RETRIEVAL 24
|
||||
|
||||
//RedirectionReason
|
||||
#define REDREASON_BUSY 1
|
||||
#define REDREASON_NO_ANSWER 2
|
||||
#define REDREASON_UNCONDITIONAL 3
|
||||
#define REDREASON_NO_PAGE_RESPONSE 4
|
||||
#define REDREASON_UNAVAILABLE 5
|
||||
#define REDREASON_UNROUTABLE 6
|
||||
#define REDREASON_CALL_ACCEPTED 7
|
||||
#define REDREASON_CALL_REFUSED 8
|
||||
|
||||
#define ORIGIND_Prior_agreement 1
|
||||
#define ORIGIND_Origination_denied 2
|
||||
#define ORIGIND_Local_calls_only 3
|
||||
#define ORIGIND_Selected_ldigits 4
|
||||
#define ORIGIND_Selected_ldigits_and_local_call 5
|
||||
#define ORIGIND_National_long_distance 6
|
||||
#define ORIGIND_International_calls 7
|
||||
#define ORIGIND_Single_directory_number 8
|
||||
|
||||
#define AUTHPER_Per_Call 1
|
||||
#define AUTHPER_Hours 2
|
||||
#define AUTHPER_Days 3
|
||||
#define AUTHPER_Weeks 4
|
||||
#define AUTHPER_Per_Agreement 5
|
||||
#define AUTHPER_Indefinite 6
|
||||
#define AUTHPER_Number_of_calls 7
|
||||
|
||||
|
||||
#define ACCTYPE_FLASHREQ 2
|
||||
#define ACCTYPE_REGISTRATION 3
|
||||
#define ACCTYPE_ORIGINATION 4
|
||||
#define ACCTYPE_TERMINATION 5
|
||||
#define ACCTYPE_NOACCESS 6
|
||||
#define ACCTYPE_POWERDOWN 7
|
||||
#define ACCTYPE_SMS_PAGERESPONSE 8
|
||||
|
||||
|
||||
#endif
|
||||
1345
plat/xapp/src/mapp/is41_code_auc.c
Normal file
1345
plat/xapp/src/mapp/is41_code_auc.c
Normal file
File diff suppressed because it is too large
Load Diff
3968
plat/xapp/src/mapp/is41_code_ms.c
Normal file
3968
plat/xapp/src/mapp/is41_code_ms.c
Normal file
File diff suppressed because it is too large
Load Diff
1134
plat/xapp/src/mapp/is41_code_sms.c
Normal file
1134
plat/xapp/src/mapp/is41_code_sms.c
Normal file
File diff suppressed because it is too large
Load Diff
1871
plat/xapp/src/mapp/is41_code_win.c
Normal file
1871
plat/xapp/src/mapp/is41_code_win.c
Normal file
File diff suppressed because it is too large
Load Diff
490
plat/xapp/src/mapp/is41_coding.c
Normal file
490
plat/xapp/src/mapp/is41_coding.c
Normal file
@@ -0,0 +1,490 @@
|
||||
/* MAP Update Location c file */
|
||||
/* created by daniel zhang 2004-06-17 */
|
||||
/* last modufy by xinyu yan 2006-05-15 */
|
||||
/* ------------------------------------ */
|
||||
|
||||
#include "map_includes.h"
|
||||
#include "map_code.h"
|
||||
|
||||
/* external functions */
|
||||
void is41_debug(DWORD mask, const char *fmt, ...);
|
||||
void is41_showbuf(DWORD mask, BYTE *buf, int len);
|
||||
|
||||
static int (*is41_assign_arg[128]) ();
|
||||
static int (*is41_assign_rsp[128]) ();
|
||||
static int (*is41_extract_arg[128]) ();
|
||||
static int (*is41_extract_rsp[128]) ();
|
||||
static char is41_opr_string[128][48] = {
|
||||
"",
|
||||
"HandoffMeasurementRequest",
|
||||
"FacilitiesDirective",
|
||||
"MobileOnChannel",
|
||||
"HandoffBack",
|
||||
"FacilitiesRelease",
|
||||
"QualificationRequest",
|
||||
"QualificationDirective",
|
||||
"Blocking",
|
||||
"Unblocking",
|
||||
"ResetCircuit",
|
||||
"TrunkTest",
|
||||
"TrunkTestDisconnect",
|
||||
"RegistrationNotification",
|
||||
"RegistrationCancellation",
|
||||
"LocationRequest",
|
||||
"RoutingRequest",
|
||||
"FeatureRequest",
|
||||
"ServiceProfileRequest",
|
||||
"ServiceProfileDirective",
|
||||
"UnreliableRoamerDataDirective",
|
||||
"CallDataREquest",
|
||||
"MSInactive",
|
||||
"TransferToNumberRequest",
|
||||
"RedirectionRequest",
|
||||
"HandoffToThird",
|
||||
"FlashRequest",
|
||||
"AuthenticationDirective",
|
||||
"AuthenticationRequest",
|
||||
"BaseStationChallenge",
|
||||
"AuthenticationFailureReport",
|
||||
"CountRequest",
|
||||
"InterSystemPage",
|
||||
"UnsolicitedResponse",
|
||||
"BulkDeregistration",
|
||||
"HandoffMeasurementRequest2",
|
||||
"FacilitiesDirective2",
|
||||
"HandoffBack2",
|
||||
"HandoffToThird2",
|
||||
"AuthenticationDirectiveForward",
|
||||
"AuthenticationStatusReport",
|
||||
"InformationBackward",
|
||||
"InformationDirective",
|
||||
"InformationForward",
|
||||
"InterSystemAnswer",
|
||||
"InterSystemPage2",
|
||||
"InterSystemSetup",
|
||||
"OriginationRequest",
|
||||
"RandomVariableRequest",
|
||||
"RedirectionDirective",
|
||||
"RemoteUserInteractionDirective",
|
||||
"SMSDeliveryBackward",
|
||||
"SMSDeliveryForward",
|
||||
"SMSDeliveryPointToPoint",
|
||||
"SMSNotification",
|
||||
"SMSRequest",
|
||||
"", "", "", "", "", "", "", "",
|
||||
"AnalyzedInformation",
|
||||
"ConnectionFailureReport",
|
||||
"ConnectResource",
|
||||
"DisconnectResource",
|
||||
"FacilitySelectedAndAvailable",
|
||||
"InstructionRequest",
|
||||
"Modify",
|
||||
"ResetTimer",
|
||||
"Search",
|
||||
"SeizeResource",
|
||||
"SRFDirective",
|
||||
"TBusy",
|
||||
"TNoAnswer",
|
||||
"", "", "",
|
||||
"BulkDisconnection",
|
||||
"CallControlDirective",
|
||||
"OAnswer",
|
||||
"ODisconnect",
|
||||
"CallRecoveryReport",
|
||||
"TAnswer",
|
||||
"TDisconnect",
|
||||
"UnreliableCallData",
|
||||
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
||||
"ShortMessageAnalyzed",
|
||||
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""
|
||||
};
|
||||
|
||||
void is41_register_encode_arg(u8 opr_code, int (*func)())
|
||||
{
|
||||
is41_assign_arg[opr_code] = func;
|
||||
}
|
||||
|
||||
void is41_register_encode_rsp(u8 opr_code, int (*func)())
|
||||
{
|
||||
is41_assign_rsp[opr_code] = func;
|
||||
}
|
||||
|
||||
void is41_register_decode_arg(u8 opr_code, int (*func)())
|
||||
{
|
||||
is41_extract_arg[opr_code] = func;
|
||||
}
|
||||
|
||||
void is41_register_decode_rsp(u8 opr_code, int (*func)())
|
||||
{
|
||||
is41_extract_rsp[opr_code] = func;
|
||||
}
|
||||
|
||||
void init_assignFunc_pointer()
|
||||
{
|
||||
is41_register_encode_arg(IS41OPR_AuthenticationDirective, assign_is41AuthenticationDirective_arg);
|
||||
is41_register_encode_rsp(IS41OPR_AuthenticationDirective, assign_is41AuthenticationDirective_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_AuthenticationFailureReport, assign_is41AuthenticationFailureReport_arg);
|
||||
is41_register_encode_rsp(IS41OPR_AuthenticationFailureReport, assign_is41AuthenticationFailureReport_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_AuthenticationRequest, assign_is41AuthenticationRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_AuthenticationRequest, assign_is41AuthenticationRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_AuthenticationStatusReport, assign_is41AuthenticationStatusReport_arg);
|
||||
is41_register_encode_rsp(IS41OPR_AuthenticationStatusReport, assign_is41AuthenticationStatusReport_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_AuthenticationDirectiveForward, assign_is41AuthenticationDirectiveForward_arg);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_BaseStationChallenge, assign_is41BaseStationChallenge_arg);
|
||||
is41_register_encode_rsp(IS41OPR_BaseStationChallenge, assign_is41BaseStationChallenge_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_CountRequest, assign_is41CountRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_CountRequest, assign_is41CountRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SMSDeliveryBackward, assign_Is41SmsDeliveryBackward_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SMSDeliveryBackward, assign_Is41SmsDeliveryBackward_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SMSDeliveryForward, assign_Is41SmsDeliveryForward_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SMSDeliveryForward, assign_Is41SmsDeliveryForward_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SMSDeliveryPointToPoint, assign_Is41SmsDeliveryPointToPoint_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SMSDeliveryPointToPoint, assign_Is41SmsDeliveryPointToPoint_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SMSNotification, assign_Is41SmsNotification_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SMSNotification, assign_Is41SmsNotification_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SMSRequest, assign_Is41SmsRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SMSRequest, assign_Is41SmsRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_RegistrationNotification, assign_is41RegistrationNotification_arg);
|
||||
is41_register_encode_rsp(IS41OPR_RegistrationNotification, assign_is41RegistrationNotification_rsp);
|
||||
is41_register_encode_arg(IS41OPR_RegistrationCancellation, assign_is41RegistrationCancellation_arg);
|
||||
is41_register_encode_rsp(IS41OPR_RegistrationCancellation, assign_is41RegistrationCancellation_rsp);
|
||||
is41_register_encode_arg(IS41OPR_LocationRequest, assign_is41LocationRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_LocationRequest, assign_is41LocationRequest_rsp);
|
||||
is41_register_encode_arg(IS41OPR_RoutingRequest, assign_is41RoutingRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_RoutingRequest, assign_is41RoutingRequest_rsp);
|
||||
is41_register_encode_arg(IS41OPR_MSInactive, assign_is41MSInactive_arg);
|
||||
is41_register_encode_rsp(IS41OPR_MSInactive, assign_is41MSInactive_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_FeatureRequest, assign_is41FeatureRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_FeatureRequest, assign_is41FeatureRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_QualificationDirective, assign_is41QualificationDirective_arg);
|
||||
is41_register_encode_rsp(IS41OPR_QualificationDirective, assign_is41QualificationDirective_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_TransferToNumberRequest, assign_is41TransferToNumberRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_TransferToNumberRequest, assign_is41TransferToNumberRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_RedirectionRequest, assign_is41RedirectionRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_RedirectionRequest, assign_is41RedirectionRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_OriginationRequest, assign_is41OriginationRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_OriginationRequest, assign_is41OriginationRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_AnalyzedInformation, assign_is41AnalyzedInformation_arg);
|
||||
is41_register_encode_rsp(IS41OPR_AnalyzedInformation, assign_is41AnalyzedInformation_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_OAnswer, assign_is41OAnswer_arg);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_ODisconnect, assign_is41ODisconnect_arg);
|
||||
is41_register_encode_rsp(IS41OPR_ODisconnect, assign_is41ODisconnect_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_TAnswer, assign_is41TAnswer_arg);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_TDisconnect, assign_is41TDisconnect_arg);
|
||||
is41_register_encode_rsp(IS41OPR_TDisconnect, assign_is41TDisconnect_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_CallControlDirective, assign_is41CallControlDirective_arg);
|
||||
is41_register_encode_rsp(IS41OPR_CallControlDirective, assign_is41CallControlDirective_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SeizeResource, assign_is41SeizeResource_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SeizeResource, assign_is41SeizeResource_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_ConnectResource, assign_is41ConnectResource_arg);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SRFDirective, assign_is41SRFDirective_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SRFDirective, assign_is41SRFDirective_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_ShortMessageAnalyzed, assign_is41ShortMessageAnalyzed_arg);
|
||||
is41_register_encode_rsp(IS41OPR_ShortMessageAnalyzed, assign_is41ShortMessageAnalyzed_rsp);
|
||||
}
|
||||
|
||||
void init_extractFunc_pointer()
|
||||
{
|
||||
is41_register_decode_arg(IS41OPR_AuthenticationDirective, extract_is41AuthenticationDirective_arg);
|
||||
is41_register_decode_rsp(IS41OPR_AuthenticationDirective, extract_is41AuthenticationDirective_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_AuthenticationFailureReport, extract_is41AuthenticationFailureReport_arg);
|
||||
is41_register_decode_rsp(IS41OPR_AuthenticationFailureReport, extract_is41AuthenticationFailureReport_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_AuthenticationRequest, extract_is41AuthenticationRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_AuthenticationRequest, extract_is41AuthenticationRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_AuthenticationStatusReport, extract_is41AuthenticationStatusReport_arg);
|
||||
is41_register_decode_rsp(IS41OPR_AuthenticationStatusReport, extract_is41AuthenticationStatusReport_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_AuthenticationDirectiveForward, extract_is41AuthenticationDirectiveForward_arg);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_BaseStationChallenge, extract_is41BaseStationChallenge_arg);
|
||||
is41_register_decode_rsp(IS41OPR_BaseStationChallenge, extract_is41BaseStationChallenge_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_CountRequest, extract_is41CountRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_CountRequest, extract_is41CountRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SMSDeliveryBackward, extract_Is41SmsDeliveryBackward_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SMSDeliveryBackward, extract_Is41SmsDeliveryBackward_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SMSDeliveryForward, extract_Is41SmsDeliveryForward_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SMSDeliveryForward, extract_Is41SmsDeliveryForward_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SMSDeliveryPointToPoint, extract_Is41SmsDeliveryPointToPoint_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SMSDeliveryPointToPoint, extract_Is41SmsDeliveryPointToPoint_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SMSNotification, extract_Is41SmsNotification_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SMSNotification, extract_Is41SmsNotification_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SMSRequest, extract_Is41SmsRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SMSRequest, extract_Is41SmsRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_RegistrationNotification, extract_is41RegistrationNotification_arg);
|
||||
is41_register_decode_rsp(IS41OPR_RegistrationNotification, extract_is41RegistrationNotification_rsp);
|
||||
is41_register_decode_arg(IS41OPR_RegistrationCancellation, extract_is41RegistrationCancellation_arg);
|
||||
is41_register_decode_rsp(IS41OPR_RegistrationCancellation, extract_is41RegistrationCancellation_rsp);
|
||||
is41_register_decode_arg(IS41OPR_LocationRequest, extract_is41LocationRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_LocationRequest, extract_is41LocationRequest_rsp);
|
||||
is41_register_decode_arg(IS41OPR_RoutingRequest, extract_is41RoutingRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_RoutingRequest, extract_is41RoutingRequest_rsp);
|
||||
is41_register_decode_arg(IS41OPR_MSInactive, extract_is41MSInactive_arg);
|
||||
is41_register_decode_rsp(IS41OPR_MSInactive, extract_is41MSInactive_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_FeatureRequest, extract_is41FeatureRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_FeatureRequest, extract_is41FeatureRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_QualificationDirective, extract_is41QualificationDirective_arg);
|
||||
is41_register_decode_rsp(IS41OPR_QualificationDirective, extract_is41QualificationDirective_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_TransferToNumberRequest, extract_is41TransferToNumberRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_TransferToNumberRequest, extract_is41TransferToNumberRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_RedirectionRequest, extract_is41RedirectionRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_RedirectionRequest, extract_is41RedirectionRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_OriginationRequest, extract_is41OriginationRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_OriginationRequest, extract_is41OriginationRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_AnalyzedInformation, extract_is41AnalyzedInformation_arg);
|
||||
is41_register_decode_rsp(IS41OPR_AnalyzedInformation, extract_is41AnalyzedInformation_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_OAnswer, extract_is41OAnswer_arg);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_ODisconnect, extract_is41ODisconnect_arg);
|
||||
is41_register_decode_rsp(IS41OPR_ODisconnect, extract_is41ODisconnect_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_TAnswer, extract_is41TAnswer_arg);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_TDisconnect, extract_is41TDisconnect_arg);
|
||||
is41_register_decode_rsp(IS41OPR_TDisconnect, extract_is41TDisconnect_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_CallControlDirective, extract_is41CallControlDirective_arg);
|
||||
is41_register_decode_rsp(IS41OPR_CallControlDirective, extract_is41CallControlDirective_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SeizeResource, extract_is41SeizeResource_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SeizeResource, extract_is41SeizeResource_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_ConnectResource, extract_is41ConnectResource_arg);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SRFDirective, extract_is41SRFDirective_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SRFDirective, extract_is41SRFDirective_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_ShortMessageAnalyzed, extract_is41ShortMessageAnalyzed_arg);
|
||||
is41_register_decode_rsp(IS41OPR_ShortMessageAnalyzed, extract_is41ShortMessageAnalyzed_rsp);
|
||||
}
|
||||
|
||||
int is41_u8Type_to_charType(u8 type,char *cType)
|
||||
{
|
||||
if(type >= 128)
|
||||
return 0;
|
||||
else if(strlen(is41_opr_string[type]) == 0)
|
||||
return 0;
|
||||
strcpy(cType, is41_opr_string[type]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*int is41_u8Type_to_charType(u8 type,char *cType)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
// Authentication service operation
|
||||
case IS41OPR_AuthenticationDirective:
|
||||
sprintf(cType,"AuthenticationDirective");
|
||||
break;
|
||||
case IS41OPR_AuthenticationFailureReport:
|
||||
sprintf(cType,"AuthenticationFailureReport");
|
||||
break;
|
||||
case IS41OPR_AuthenticationRequest:
|
||||
sprintf(cType,"AuthenticationRequest");
|
||||
break;
|
||||
case IS41OPR_AuthenticationStatusReport:
|
||||
sprintf(cType,"AuthenticationStatusReport");
|
||||
break;
|
||||
case IS41OPR_AuthenticationDirectiveForward:
|
||||
sprintf(cType,"AuthenticationDirectiveForward");
|
||||
break;
|
||||
case IS41OPR_CountRequest:
|
||||
sprintf(cType,"CountRequest");
|
||||
break;
|
||||
case IS41OPR_BaseStationChallenge:
|
||||
sprintf(cType,"BaseStationChallenge");
|
||||
break;
|
||||
case IS41OPR_SMSDeliveryBackward:
|
||||
sprintf(cType,"SMSDeliveryBackward");
|
||||
break;
|
||||
case IS41OPR_SMSDeliveryForward:
|
||||
sprintf(cType,"SMSDeliveryForward");
|
||||
break;
|
||||
case IS41OPR_SMSDeliveryPointToPoint:
|
||||
sprintf(cType,"SMSDeliveryPointToPoint");
|
||||
break;
|
||||
case IS41OPR_SMSNotification:
|
||||
sprintf(cType,"IS41OPR_SMSNotification");
|
||||
break;
|
||||
case IS41OPR_SMSRequest:
|
||||
sprintf(cType,"SMSRequest");
|
||||
break;
|
||||
|
||||
case IS41OPR_RegistrationNotification:
|
||||
sprintf(cType,"REGNOT");
|
||||
break;
|
||||
case IS41OPR_RegistrationCancellation:
|
||||
sprintf(cType,"REGCANC");
|
||||
break;
|
||||
case IS41OPR_LocationRequest:
|
||||
sprintf(cType,"LOCREQ");
|
||||
break;
|
||||
case IS41OPR_RoutingRequest:
|
||||
sprintf(cType,"ROUTREQ");
|
||||
break;
|
||||
case IS41OPR_MSInactive:
|
||||
sprintf(cType,"MSINACT");
|
||||
break;
|
||||
case IS41OPR_FeatureRequest:
|
||||
sprintf(cType,"FEATREQ");
|
||||
break;
|
||||
case IS41OPR_QualificationDirective:
|
||||
sprintf(cType,"QUALDIR");
|
||||
break;
|
||||
case IS41OPR_TransferToNumberRequest:
|
||||
sprintf(cType,"TRANUMREQ");
|
||||
break;
|
||||
case IS41OPR_RedirectionRequest:
|
||||
sprintf(cType,"REDREQ");
|
||||
break;
|
||||
|
||||
default: // unknown operation
|
||||
// sprintf(info_str,"MAPP error:the operation is unknown:%d",opr_ptr->message_type);
|
||||
// xap_send_error(info_str);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}*/
|
||||
|
||||
int build_is41param(struct MapOprSrv_struct *opr_ptr,u8 *buf) // build is41 service paramter
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u8 seq_flag=1;
|
||||
int param_len = 0;
|
||||
u8 info_str[1024];
|
||||
char charName[128];
|
||||
|
||||
if (opr_ptr == NULL || buf == NULL)
|
||||
return 0;
|
||||
if (!is41_u8Type_to_charType(opr_ptr->message_type,charName))
|
||||
{
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode]Building param,Operation code:%d not correct",opr_ptr->message_type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (opr_ptr->message_flag == MAP_REQUEST)
|
||||
{
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode] MAP_REQUEST,OPRType=%s",charName);
|
||||
param_len = (*is41_assign_arg[opr_ptr->message_type]) (opr_ptr,buf);
|
||||
}
|
||||
else if (opr_ptr->message_flag == MAP_RESPONSE)
|
||||
{
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode] MAP_RESPONSE,OPRType=%s",charName);
|
||||
param_len = (*is41_assign_rsp[opr_ptr->message_type])(opr_ptr,buf);
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
|
||||
if (seq_flag == 1 && param_len > 0)
|
||||
{
|
||||
memcpy(info_str,buf,param_len%1024);
|
||||
AsnEncode(buf,256,&asn_buf);
|
||||
param_len = AddTLV(SET_NATIONAL,param_len,info_str,0xe0,&asn_buf);
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode] Completed,len=%d",param_len);
|
||||
is41_showbuf(IS41DB_ENCODE,buf,param_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
AsnEncode(buf,256,&asn_buf);
|
||||
param_len = AddTLV(SET_NATIONAL,0,info_str,0xc0,&asn_buf);
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode] Completed,paramlen=0");
|
||||
is41_showbuf(IS41DB_ENCODE,buf,param_len);
|
||||
}
|
||||
return param_len;
|
||||
}
|
||||
|
||||
u8 extract_is41param(struct MapOprSrv_struct *opr_ptr,u8 opr_code,u8 opr_flag,u32 pre_param_len,u8 *pre_param)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
// u8 info_str[1024];
|
||||
u8 param[1024];
|
||||
int param_len;
|
||||
char charName[128];
|
||||
|
||||
asn_decode(pre_param,1,&asn_buf);
|
||||
param_len = get_tlv(SET_NATIONAL,param,&asn_buf);
|
||||
|
||||
if (param_len == -1) // not has sequence id
|
||||
{
|
||||
param_len = pre_param_len;
|
||||
memcpy(param,pre_param,param_len);
|
||||
}
|
||||
|
||||
if (!is41_u8Type_to_charType(opr_code,charName))
|
||||
{
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode]Extracting param,Operation code:%d not correct",opr_code);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (opr_flag == MAP_INDICATE)
|
||||
{
|
||||
is41_debug(IS41DB_DECODE,"[IS41-Decode]USER->IS41P,IS41_INDICATE,OPRType=%s",charName);
|
||||
is41_showbuf(IS41DB_DECODE,param,param_len);
|
||||
if (*is41_extract_arg[opr_code] != NULL)
|
||||
{
|
||||
return (*is41_extract_arg[opr_code])(opr_ptr,param_len,param);
|
||||
}
|
||||
else
|
||||
{
|
||||
is41_debug(IS41DB_ERR,"[IS41-Decode]No decode function for IS41_INDICATE opr_code=%d",opr_code);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (opr_flag == MAP_CONFIRM)
|
||||
{
|
||||
is41_debug(IS41DB_DECODE,"[IS41-Decode]USER->IS41P,MAP_CONFIRM,OPRType=%s",charName);
|
||||
is41_showbuf(IS41DB_DECODE,param,param_len);
|
||||
if (*is41_extract_rsp[opr_code] != NULL)
|
||||
return (*is41_extract_rsp[opr_code])(opr_ptr,param_len,param);
|
||||
else
|
||||
{
|
||||
is41_debug(IS41DB_ERR,"[IS41-Decode]No decode function for IS41_CONFIRM opr_code=%d",opr_code);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
3650
plat/xapp/src/mapp/is41_debug.c
Normal file
3650
plat/xapp/src/mapp/is41_debug.c
Normal file
File diff suppressed because it is too large
Load Diff
23
plat/xapp/src/mapp/is41_init.c
Normal file
23
plat/xapp/src/mapp/is41_init.c
Normal file
@@ -0,0 +1,23 @@
|
||||
/* IS41 init c file */
|
||||
/* created by daniel zhang 2004-06-18 */
|
||||
/* last modify by daniel zhang 2004-07-13 */
|
||||
/* version 1.0 */
|
||||
/* ------------------------------------ */
|
||||
|
||||
void is41_debug_setup();
|
||||
void is41_debug_timer();
|
||||
|
||||
|
||||
void init_assignFunc_pointer();
|
||||
void init_extractFunc_pointer();
|
||||
void is41_init()
|
||||
{
|
||||
is41_debug_setup();
|
||||
init_assignFunc_pointer();
|
||||
init_extractFunc_pointer();
|
||||
}
|
||||
|
||||
void is41_timer()
|
||||
{
|
||||
is41_debug_timer();
|
||||
}
|
||||
430
plat/xapp/src/mapp/map_LCSCode.c
Normal file
430
plat/xapp/src/mapp/map_LCSCode.c
Normal file
@@ -0,0 +1,430 @@
|
||||
#include "map_includes.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int extract_RoutingInfoForLCS_Arg(RoutingInfoForLCS_Arg *ptr,u32 buf_len,u8 *buf)
|
||||
|
||||
{
|
||||
|
||||
ASN_BUF asn_buf;
|
||||
|
||||
int len;
|
||||
|
||||
u8 temp_buf[256];
|
||||
|
||||
u32 flag=0;
|
||||
|
||||
|
||||
|
||||
if (buf_len == 0)
|
||||
|
||||
{
|
||||
|
||||
mapp_log_debug("extract RoutingInfoForLCS_Arg param len is:0");
|
||||
|
||||
return RER;
|
||||
|
||||
}
|
||||
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
|
||||
return RER;
|
||||
|
||||
len = get_tlv("0",temp_buf,&asn_buf); /* mlc number */
|
||||
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
|
||||
{
|
||||
|
||||
flag |= 0x01;
|
||||
|
||||
ptr->mlcNumber[0] = len;
|
||||
|
||||
memcpy(ptr->mlcNumber+1,temp_buf,len);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
{
|
||||
|
||||
mapp_log_debug("extract RoutingInfoForLCS_Arg:loss MLC number");
|
||||
|
||||
return RER;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (get_tlv("1",temp_buf,&asn_buf) != -1)/* targetMs */
|
||||
|
||||
{
|
||||
|
||||
flag |= 0x02;
|
||||
|
||||
len = get_tlv("1.0",temp_buf,&asn_buf); // IMSI
|
||||
|
||||
if (len == IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0)
|
||||
|
||||
{
|
||||
|
||||
ptr->targetMs.identityChoice = 0x01;
|
||||
|
||||
memcpy(ptr->targetMs.imsi,temp_buf,IMSI_LEN);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
{
|
||||
|
||||
len = get_tlv("1.1",temp_buf,&asn_buf); // msisdn
|
||||
|
||||
if (len > 0 && len <= ISDN_LEN)
|
||||
|
||||
{
|
||||
|
||||
ptr->targetMs.identityChoice = 0x02;
|
||||
|
||||
ptr->targetMs.msisdn[0] = len;
|
||||
|
||||
memcpy(ptr->targetMs.msisdn+1,temp_buf,len);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
return RER;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
{
|
||||
|
||||
mapp_log_debug("extract RoutingInfoForLCS_Arg:loss TargetMs");
|
||||
|
||||
return RER;
|
||||
|
||||
}
|
||||
|
||||
ptr->param_flag = flag;
|
||||
|
||||
return buf_len;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
int assign_RoutingInfoForLCS_Res(RoutingInfoForLCS_Res *ptr,u8 *buf, u8 ver)
|
||||
|
||||
{
|
||||
|
||||
ASN_BUF asn_buf;
|
||||
|
||||
u32 flag;
|
||||
|
||||
int buf_len=0;
|
||||
|
||||
u8 len;
|
||||
|
||||
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
|
||||
flag = ptr->param_flag;
|
||||
|
||||
|
||||
|
||||
if (flag & 0x01) /* targetMs */
|
||||
|
||||
{
|
||||
|
||||
if (ptr->targetMs.identityChoice == 1) // IMSI
|
||||
|
||||
buf_len = add_tlv("0.0",IMSI_LEN,ptr->targetMs.imsi,0x80,&asn_buf);
|
||||
|
||||
else if (ptr->targetMs.identityChoice == 2) // msisdn
|
||||
|
||||
{
|
||||
|
||||
len = ptr->targetMs.msisdn[0];
|
||||
|
||||
buf_len = add_tlv("0.1",len,ptr->targetMs.msisdn+1,0x80,&asn_buf);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
return RER;
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
return RER;
|
||||
|
||||
|
||||
|
||||
if (flag & 0x02)/* mscNumber */
|
||||
|
||||
{
|
||||
|
||||
len = ptr->mscNumber[0];
|
||||
|
||||
buf_len = add_tlv("1.4-1",len,ptr->mscNumber+1,0x00,&asn_buf);
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
mapp_log_debug("assign RoutingInfoForLCS_Res:loss MSC NUMBER");
|
||||
|
||||
return RER;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return buf_len;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
int extract_ProvideSubscriberLocation_Arg(ProvideSubscriberLocation_Arg *ptr,u32 buf_len,u8 *buf)
|
||||
|
||||
{
|
||||
|
||||
ASN_BUF asn_buf;
|
||||
|
||||
int len;
|
||||
|
||||
u8 temp_buf[256];
|
||||
|
||||
u32 flag=0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (buf_len == 0)
|
||||
|
||||
{
|
||||
|
||||
mapp_log_debug("extract ProvideSubscriberLocation_Arg param len is:0");
|
||||
|
||||
return RER;
|
||||
|
||||
}
|
||||
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
|
||||
return RER;
|
||||
|
||||
|
||||
|
||||
if((len=get_tlv("16-1.0",temp_buf,&asn_buf)) > 0)/* locationType */
|
||||
|
||||
{
|
||||
|
||||
flag |= 0x01;
|
||||
|
||||
ptr->locationType.locationEstimateType = temp_buf[0];
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
return RER;
|
||||
|
||||
|
||||
|
||||
if((len=get_tlv("4-2",temp_buf,&asn_buf)) > 0)/* MLC number */
|
||||
|
||||
{
|
||||
|
||||
flag |= 0x02;
|
||||
|
||||
ptr->mlcNumber[0] = len;
|
||||
|
||||
memcpy(ptr->mlcNumber+1,temp_buf,len);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
return RER;
|
||||
|
||||
|
||||
|
||||
if ((len=get_tlv("2",temp_buf,&asn_buf)) != -1) /* imsi */
|
||||
|
||||
{
|
||||
|
||||
if (len == IMSI_LEN)
|
||||
|
||||
{
|
||||
|
||||
flag |= 0x08;
|
||||
|
||||
memcpy(ptr->imsi,temp_buf,len);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
return RER;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ((len=get_tlv("3",temp_buf,&asn_buf)) != -1) /* msisdn */
|
||||
|
||||
{
|
||||
|
||||
if (len > 0 && len <= ISDN_LEN)
|
||||
|
||||
{
|
||||
|
||||
flag |= 0x04;
|
||||
|
||||
ptr->msisdn[0] = len;
|
||||
|
||||
memcpy(ptr->msisdn+1,temp_buf,len);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
return RER;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
ptr->param_flag = flag;
|
||||
|
||||
return buf_len;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int assign_ProvideSubscriberLocation_Res(ProvideSubscriberLocation_Res *ptr,u8 *buf, u8 ver)
|
||||
|
||||
{
|
||||
|
||||
ASN_BUF asn_buf;
|
||||
|
||||
u32 flag;
|
||||
|
||||
int buf_len=0;
|
||||
|
||||
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
|
||||
flag = ptr->param_flag;
|
||||
|
||||
if (flag & 0x01)/* locationEstimate */
|
||||
|
||||
{
|
||||
|
||||
u8 locationEstimate[maxExtGeographicalInformation] = {0};
|
||||
|
||||
if(ptr->locationEstimate.typeOfShape != EllipsoidPoint) /* only support EllipsoidPoint */
|
||||
|
||||
return RER;
|
||||
|
||||
locationEstimate[0] |= ptr->locationEstimate.typeOfShape << 4;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(ptr->locationEstimate.degreesOfLatitude >= 0)
|
||||
|
||||
locationEstimate[1] &= 0x00;
|
||||
|
||||
else
|
||||
|
||||
locationEstimate[1] |= 0x80;
|
||||
|
||||
ptr->locationEstimate.degreesOfLatitude &= 0x7fffff;
|
||||
|
||||
locationEstimate[1] |= ptr->locationEstimate.degreesOfLatitude >> 16;
|
||||
|
||||
locationEstimate[2] = ptr->locationEstimate.degreesOfLatitude >> 8;
|
||||
|
||||
locationEstimate[3] = ptr->locationEstimate.degreesOfLatitude & 0xff;
|
||||
|
||||
|
||||
|
||||
ptr->locationEstimate.degreesOfLongitude &= 0xffffff;
|
||||
|
||||
locationEstimate[4] = ptr->locationEstimate.degreesOfLongitude >> 16;
|
||||
|
||||
locationEstimate[5] = ptr->locationEstimate.degreesOfLongitude >> 8;
|
||||
|
||||
locationEstimate[6] = ptr->locationEstimate.degreesOfLongitude & 0xff;
|
||||
|
||||
|
||||
|
||||
buf_len = add_tlv("4-1",7,locationEstimate,0x00,&asn_buf);
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
return RER;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (flag & 0x02)/* cgi */
|
||||
|
||||
{
|
||||
|
||||
u8 cgi[16] = {0};
|
||||
|
||||
if(ptr->cgi.cgiOrLaiChoice != CgiOrSai) /* only support cgiOrSai */
|
||||
|
||||
return RER;
|
||||
|
||||
memcpy(cgi,ptr->cgi.mccMnc,3);
|
||||
|
||||
cgi[3] = ptr->cgi.lac >> 8;
|
||||
|
||||
cgi[4] = ptr->cgi.lac & 0xff;
|
||||
|
||||
cgi[5] = ptr->cgi.cellId >> 8;
|
||||
|
||||
cgi[6] = ptr->cgi.cellId & 0xff;
|
||||
|
||||
buf_len = add_tlv("6-2.0",7,cgi,0x80,&asn_buf);
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return buf_len;
|
||||
|
||||
}
|
||||
|
||||
260
plat/xapp/src/mapp/map_LCSCode.h
Normal file
260
plat/xapp/src/mapp/map_LCSCode.h
Normal file
@@ -0,0 +1,260 @@
|
||||
|
||||
|
||||
/***************** LCS **************
|
||||
|
||||
#define AC_locationServiceGateWay 37
|
||||
|
||||
#define AC_locationServiceEnquiry 38
|
||||
|
||||
|
||||
|
||||
#define RoutingInfoForLCS 85
|
||||
|
||||
#define ProvideSubscriberLocation 83
|
||||
|
||||
**************** LCS **************/
|
||||
|
||||
|
||||
|
||||
typedef struct _SubscriberIdentity
|
||||
|
||||
{
|
||||
|
||||
u8 identityChoice; /*1:imsi,2:msisdn*/
|
||||
|
||||
u8 msisdn[ISDN_LEN+1]; /* TBCD */
|
||||
|
||||
u8 imsi[IMSI_LEN+1]; /* TBCD */
|
||||
|
||||
}SubscriberIdentity;
|
||||
|
||||
|
||||
|
||||
typedef struct _MapRoutingInfoForLCS_Arg
|
||||
|
||||
{
|
||||
|
||||
u32 param_flag;
|
||||
|
||||
u8 mlcNumber[ISDN_LEN+1]; /* TBCD */
|
||||
|
||||
SubscriberIdentity targetMs;
|
||||
|
||||
u8 user_error;
|
||||
|
||||
u8 provider_error;
|
||||
|
||||
}RoutingInfoForLCS_Arg;
|
||||
|
||||
|
||||
|
||||
typedef struct _MapRoutingInfoForLCS_Res
|
||||
|
||||
{
|
||||
|
||||
u32 param_flag;
|
||||
|
||||
SubscriberIdentity targetMs;
|
||||
|
||||
u8 mscNumber[ISDN_LEN+1]; /* TBCD */
|
||||
|
||||
u8 user_error;
|
||||
|
||||
u8 provider_error;
|
||||
|
||||
}RoutingInfoForLCS_Res;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum _LocationEstimateType
|
||||
|
||||
{
|
||||
|
||||
currentLocation = 0,
|
||||
|
||||
currentOrLastKnownLocation,
|
||||
|
||||
initialLocation,
|
||||
|
||||
activateDeferredLocation,
|
||||
|
||||
cancelDeferredLocation,
|
||||
|
||||
notificationVerificationOnly
|
||||
|
||||
}LocationEstimateType;
|
||||
|
||||
|
||||
|
||||
typedef enum _DeferredLocationEventType
|
||||
|
||||
{
|
||||
|
||||
msAvailable = 0,
|
||||
|
||||
enteringIntoArea,
|
||||
|
||||
leavingFromArea,
|
||||
|
||||
beingInsideArea,
|
||||
|
||||
periodicLDR
|
||||
|
||||
}DeferredLocationEventType;
|
||||
|
||||
|
||||
|
||||
typedef struct _LocationType
|
||||
|
||||
{
|
||||
|
||||
LocationEstimateType locationEstimateType;
|
||||
|
||||
DeferredLocationEventType deferredLocationEventType;
|
||||
|
||||
}LocationType;
|
||||
|
||||
|
||||
|
||||
typedef struct _ProvideSubscriberLocation_Arg
|
||||
|
||||
{
|
||||
|
||||
u32 param_flag;
|
||||
|
||||
LocationType locationType;
|
||||
|
||||
u8 mlcNumber[ISDN_LEN+1]; /* TBCD */
|
||||
|
||||
u8 msisdn[ISDN_LEN+1]; /* TBCD */
|
||||
|
||||
u8 imsi[IMSI_LEN+1]; /* TBCD */
|
||||
|
||||
u8 user_error;
|
||||
|
||||
u8 provider_error;
|
||||
|
||||
}ProvideSubscriberLocation_Arg;
|
||||
|
||||
|
||||
|
||||
typedef enum _TypeOfShape
|
||||
|
||||
{
|
||||
|
||||
EllipsoidPoint = 0,
|
||||
|
||||
EllipsoidPointWithUncertaintyCircle = 1,
|
||||
|
||||
EllipsoidPointWithUncertaintyEllipse = 3,
|
||||
|
||||
Polygon = 5,
|
||||
|
||||
EllipsoidPointWithAltitude = 8,
|
||||
|
||||
EllipsoidPointWithAltitudeAndUncertaintyEllipsoid = 9,
|
||||
|
||||
EllipsoidArc =10
|
||||
|
||||
}TypeOfShape;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define maxExtGeographicalInformation 20
|
||||
|
||||
typedef struct _LocationEstimate
|
||||
|
||||
{
|
||||
|
||||
TypeOfShape typeOfShape;/* only support EllipsoidPoint */
|
||||
|
||||
long degreesOfLatitude;
|
||||
|
||||
long degreesOfLongitude;
|
||||
|
||||
u8 reserve[maxExtGeographicalInformation - 7];
|
||||
|
||||
}LocationEstimate;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum _CgiSaiOrLaiChoice
|
||||
|
||||
{
|
||||
|
||||
CgiOrSai = 1,
|
||||
|
||||
LAI = 2
|
||||
|
||||
}CgiSaiOrLaiChoice;
|
||||
|
||||
|
||||
|
||||
typedef struct _CGI
|
||||
|
||||
{
|
||||
|
||||
CgiSaiOrLaiChoice cgiOrLaiChoice;
|
||||
|
||||
/*
|
||||
|
||||
-- octet 1 bits 4321 Mobile Country Code 1st digit
|
||||
|
||||
-- bits 8765 Mobile Country Code 2nd digit
|
||||
|
||||
-- octet 2 bits 4321 Mobile Country Code 3rd digit
|
||||
|
||||
-- bits 8765 Mobile Network Code 3rd digit
|
||||
|
||||
-- or filler (1111) for 2 digit MNCs
|
||||
|
||||
-- octet 3 bits 4321 Mobile Network Code 1st digit
|
||||
|
||||
-- bits 8765 Mobile Network Code 2nd digit
|
||||
|
||||
-- octets 4 and 5 Location Area Code according to 3GPP TS 24.008
|
||||
|
||||
-- octets 6 and 7 Cell Identity (CI) value or
|
||||
|
||||
-- Service Area Code (SAC) value
|
||||
|
||||
-- according to 3GPP TS 23.003
|
||||
|
||||
*/
|
||||
|
||||
u8 mccMnc[3]; /* tbcd */
|
||||
|
||||
u16 lac; /* integer */
|
||||
|
||||
u16 cellId; /* integer */
|
||||
|
||||
}CGI;
|
||||
|
||||
|
||||
|
||||
typedef struct _ProvideSubscriberLocation_Res
|
||||
|
||||
{
|
||||
|
||||
u32 param_flag;
|
||||
|
||||
LocationEstimate locationEstimate;
|
||||
|
||||
CGI cgi;
|
||||
|
||||
u8 user_error;
|
||||
|
||||
u8 provider_error;
|
||||
|
||||
}ProvideSubscriberLocation_Res;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
75
plat/xapp/src/mapp/map_acn.h
Normal file
75
plat/xapp/src/mapp/map_acn.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/* MAP application context name head file */
|
||||
/* Written by Liu zhiguo 2001-12-28 */
|
||||
/* Version 1.0 (according GSM 09.02 17.3.3) */
|
||||
/* ---------------------------------------- */
|
||||
#ifndef _MAP_ACN
|
||||
#define _MAP_ACN
|
||||
|
||||
/* public portion */
|
||||
#define Identified_Organization 0x04
|
||||
#define ETSI 0x00
|
||||
#define MobileDomain 0x00
|
||||
#define GSM_Network 0x01
|
||||
#define AC_ID 0x00
|
||||
#define AC_Version1 0x01
|
||||
#define AC_Version2 0x02
|
||||
#define AC_Version3 0x03
|
||||
/* private portion */
|
||||
#define AC_networkLocUp 1 // network loction update
|
||||
#define AC_locationCancel 2 // location cancel
|
||||
#define AC_roamingNbEnquiry 3 // roaming number enquiry
|
||||
#define AC_locInfoRetrieval 5 // location info retrieval
|
||||
#define AC_reset 10 // reset context
|
||||
#define AC_handoverControl 11 // handover control
|
||||
#define AC_equipmentMngt 13 // equipment management
|
||||
#define AC_infoRetrieval 14 // info retrieval
|
||||
#define AC_interVlrInfoRetrieval 15
|
||||
#define AC_subscriberDataMngt 16
|
||||
#define AC_tracing 17 // tracing
|
||||
#define AC_networkFunctionalSs 18
|
||||
#define AC_networkUnstructuredSs 19
|
||||
#define AC_shortMsgGateway 20
|
||||
#define AC_shortMsgMoRelay 21
|
||||
#define AC_shortMsgAlert 23
|
||||
#define AC_mwdMngt 24
|
||||
#define AC_shortMsgMtRelay 25
|
||||
#define AC_imsiRetrieval 26
|
||||
#define AC_msPurging 27
|
||||
#define AC_subsriberInfoEnquiry 28
|
||||
#define AC_anyTimeInfoEnquiry 29
|
||||
#define AC_callControlTransfer 6
|
||||
#define AC_ssInvNotify 36 // ss-InvocationNotificationContext
|
||||
#define AC_sIWFSAllocation 12 // sIWFSAllocationContext
|
||||
#define AC_groupCallControl 31 // group call control context
|
||||
#define AC_gprsLocUp 32 // GPRS location update context
|
||||
#define AC_gprsLocInfoRetrieval 33 // GPRS location info retrieval context
|
||||
#define AC_failureReport 34 // failure report context
|
||||
#define AC_gprsNotify 35 // GPRS notify context
|
||||
#define AC_reporting 7 // reporting context
|
||||
#define AC_callCompletion 8 // call completion context
|
||||
#define AC_authFailReport 39 //authenticationFailureReport add by gxchen
|
||||
#define AC_istAlert 4 //istAlertingContext ist-Alert add by gxchen
|
||||
#define AC_serviceTermination 9 //serviceTerminationContext ist-Command add by gxchen
|
||||
|
||||
#define AC_anyTimeInfoHandling 43
|
||||
|
||||
/* MAP-H application context */
|
||||
#define AC_SecurityTriplet 200 // security triplet
|
||||
#define AC_SubsInter 201 // subscriber interrogate
|
||||
#define AC_HLRSubsMng 202 // HLR subscriber management
|
||||
#define AC_HLRPingAUC 203 // HLR ping AUC
|
||||
|
||||
#define AC_VlrCamelPhase 209
|
||||
|
||||
/* Opr,vlr,hlr ACN */
|
||||
#define OprVlrACN 210
|
||||
#define OprHlrACN 211
|
||||
|
||||
/***************** LCS **************/
|
||||
#define AC_locationServiceGateWay 37
|
||||
#define AC_locationServiceEnquiry 38
|
||||
/***************** LCS **************/
|
||||
|
||||
#define AC_Test 255
|
||||
|
||||
#endif
|
||||
343
plat/xapp/src/mapp/map_code.h
Normal file
343
plat/xapp/src/mapp/map_code.h
Normal file
@@ -0,0 +1,343 @@
|
||||
/* MAP operation and error code */
|
||||
/* written by liu zhiguo 2001-07-25 */
|
||||
/* Version 1.0 (according GSM 09.02 17.5) */
|
||||
/* ------------------------------------- */
|
||||
#ifndef _MAP_CODE
|
||||
#define _MAP_CODE
|
||||
|
||||
/* +++++++++++++++++ */
|
||||
/* MAP message type */
|
||||
/* +++++++++++++++++ */
|
||||
/* dialogue control portion */
|
||||
#define MAP_OPEN 0xff
|
||||
#define MAP_CLOSE 0xfe
|
||||
#define MAP_U_ABORT 0xfd
|
||||
#define MAP_P_ABORT 0xfc
|
||||
#define MAP_NOTICE 0xfb
|
||||
#define MAP_DELIMITER 0xfa
|
||||
#define MAP_LINK 0xef
|
||||
|
||||
#define MAP_REQUEST 0x01
|
||||
#define MAP_INDICATE 0x02
|
||||
#define MAP_RESPONSE 0x03
|
||||
#define MAP_CONFIRM 0x04
|
||||
|
||||
/* ++++++++++++++++++++ */
|
||||
/* MAP operation code */
|
||||
/* ++++++++++++++++++++ */
|
||||
|
||||
/* locaion registration operation codes */
|
||||
#define UpLoc 2 // update location
|
||||
#define CancelLoc 3 // cancel location
|
||||
#define PurgeMS 67 // purge mobile station
|
||||
#define SndIdent 55 // send identification
|
||||
|
||||
/* handover operatin codes */
|
||||
#define PreHo 68 // prepare handover
|
||||
#define SndEndSig 29 // send end signal
|
||||
#define ProcAccSig 33 // process access signalling
|
||||
#define FwdAccSig 34 // forward access signalling
|
||||
#define PreSubsHo 69 // prepare subsequent handover
|
||||
|
||||
/* authentication operation codes */
|
||||
#define SndAuthInfo 56 // send authentication information
|
||||
#define AuthFailReport 15 //authenticationFailureReport add by gxchen
|
||||
|
||||
/* IMEI management operation codes */
|
||||
#define ChkIMEI 43 // check IMEI
|
||||
|
||||
/* subscriber management operation codes */
|
||||
#define InsSubData 7 // insert subscriber data
|
||||
#define DelSubData 8 // delete subscriber data
|
||||
#define SendParam 9 // send parameters
|
||||
|
||||
/* fault recovery operation codes */
|
||||
#define Reset 37 // reset
|
||||
#define FwdChkSSInd 38 // forward check SS indication
|
||||
#define RestoreData 57 // restore data
|
||||
|
||||
/* operation and maintenance operation codes */
|
||||
#define ActvTraceMode 50 // active trace mode
|
||||
#define DeactvTraceMode 51 // deactive trace mode
|
||||
#define SndIMSI 58 // send IMSI
|
||||
|
||||
/* call handling operation codes */
|
||||
#define SndRoutInfo 22 // send routing information
|
||||
#define ProvRoamNum 4 // provide roaming number
|
||||
#define ResumeCH 6 // resume call handling
|
||||
#define ProvSIWFSNum 31 // provide SIWFS nunmber
|
||||
#define SIWFSSigMdf 32 // SIWFS signalling modify
|
||||
#define SetRepState 73 // set report state
|
||||
#define StatusRep 74 // status report
|
||||
#define RmtUserFree 75 // remote user free
|
||||
#define IstAlert 87 //ist-Alert add by gxchen
|
||||
#define IstCommand 88 //ist-Command add by gxchen
|
||||
|
||||
/* supplementary service handling operation codes */
|
||||
#define RegSS 10 // register SS
|
||||
#define EraseSS 11 // erase SS
|
||||
#define ActvSS 12 // activate SS
|
||||
#define DeactvSS 13 // deactivate SS
|
||||
#define InterSS 14 // interrogate SS
|
||||
#define ProcUnstrctSSReq 59 // process unstructure SS request
|
||||
#define UnstrctSSReq 60 // unstructure SS request
|
||||
#define UnstrctSSNoti 61 // unstructure SS notify
|
||||
#define RegPasswd 17 // register password
|
||||
#define GetPasswd 18 // get password
|
||||
#define RegCCEntry 76 // register CC entry
|
||||
#define EraseCCEntry 77 // erase CC entry
|
||||
|
||||
/* short message service operation codes */
|
||||
#define SndRoutInfoForSM 45 // send routing information for SM
|
||||
#define FwdSM 46 // Forward SM V1
|
||||
#define MOFwdSM 46 // MO-forward SM
|
||||
#define MTFwdSM 46 // MT-forward SM
|
||||
#define MTFwdSM_v3 44
|
||||
#define RptSMDelvStat 47 // report SM delivery status
|
||||
#define InfSC 63 // inform service center
|
||||
#define AlrtSC 64 // alert service center
|
||||
#define RdyForSM 66 // ready for SM
|
||||
|
||||
/* provide subsriber info operation codes */
|
||||
#define ProvSubInfo 70 // provider subscriber information
|
||||
|
||||
/* any time interrogation operation codes */
|
||||
#define AnyTimeInter 71 // any time interrogation
|
||||
|
||||
/* any time subscription interrogation operation codes */
|
||||
#define AnyTimeSubInter 62 // any time subscription interrogation
|
||||
|
||||
/* supplementary service invocation notification operation codes */
|
||||
#define SSInvNoti 72 // SS invocation notification
|
||||
|
||||
/* group call operation codes */
|
||||
#define PreGrpCall 39 // prepare group call
|
||||
#define SndGrpCallEndSig 40 // send group call end signal
|
||||
#define ProcGrpCallSig 41 // process group call signalling
|
||||
#define FwdGrpCallSig 42 // forward group call signalling
|
||||
|
||||
/* GPRS location updating operation codes */
|
||||
#define UpGprsLoc 23 // update GPRS location
|
||||
|
||||
/* GPRS location information retrieval operation codes */
|
||||
#define SndRoutInfoForGprs 24 // send routing info for GPRS
|
||||
|
||||
/* failure reportin operation codes */
|
||||
#define FailRep 25 // failure report
|
||||
|
||||
/* GPRS notification operation codes */
|
||||
#define NoteMsPresForGprs 26 // note ms present for GPRS
|
||||
|
||||
/* MAP-H operaion codes, defined by owner */
|
||||
#define SecuTrip 200 // security triplets
|
||||
#define InterrSubs 201 // interrogate subscriber
|
||||
#define CreateSubs 202 // create subscriber
|
||||
#define DelSubs 203 // deleter subscriber
|
||||
#define PingAuc 204 // HLR ping AUC
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP operation error code */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
|
||||
/* generic error codes */
|
||||
#define SysFail 34 // system failure
|
||||
#define DataMissing 35
|
||||
#define UnexpDataVal 36 // unexpected data value
|
||||
#define FaciNotSpprt 21 // facility not support
|
||||
#define IncomTerm 28 // incompatible terminal
|
||||
#define ResLimit 51 // resource limitation
|
||||
|
||||
/* identification and numbering error codes */
|
||||
#define UnknwnSub 1 // unknown subscriber
|
||||
#define NumChng 44 // number changed
|
||||
#define UnknwnMSC 3 // unknown MSC
|
||||
#define UnidentSub 5 // unidentified subscriber
|
||||
#define UnknwnEquip 7 // unkown equipment
|
||||
|
||||
/* subscription error codes */
|
||||
#define RoamNotAllow 8 // roaming not allowed
|
||||
#define IllgSub 9 // illegal subscriber
|
||||
#define IllgEquip 12 // illegal equipment
|
||||
#define BSNotProv 10 // bearer service not provisioned
|
||||
#define TSNotProv 11 // teleservice not provisioned
|
||||
|
||||
/* handover error codes */
|
||||
#define NoHONumAvail 25 // no handover number available
|
||||
#define SubsHOFail 26 // subsequent handover failure
|
||||
|
||||
/* operation and maintenance error codes */
|
||||
#define TrcBufferFull 40 // tracing buffer full
|
||||
|
||||
/* call handling error codes */
|
||||
#define NoRoamNumAvail 39 // no roaming number available
|
||||
#define AbsentSub 27 // absent subscriber
|
||||
#define BusySub 45 // busy subscriber
|
||||
#define NoSubReply 46 // no subscriber reply
|
||||
#define CallBarred 13
|
||||
#define FwdFail 47 // forwarding failing
|
||||
#define OR_NotAllow 48 // OR not allowed
|
||||
#define FwdViolate 14 // forwarding violate
|
||||
#define CUG_Reject 15
|
||||
|
||||
/* any time interrogatin error codes */
|
||||
#define ATI_NotAllow 49 // ati not allowed
|
||||
#define InformationNotAvailable 62
|
||||
|
||||
/* group call error codes */
|
||||
#define NoGrpCallNumAvail 50 // no group call number available
|
||||
|
||||
/* supplementary service error codes */
|
||||
#define IllgSSOper 16 // illegal SS operation
|
||||
#define SSErrStatus 17 // SS error status
|
||||
#define SSNotAvail 18 // SS not available
|
||||
#define SSSubscViolate 19 // SS subscription violation
|
||||
#define SSIncompat 20 // SS incompatibility
|
||||
#define UnknwnAlph 71 // unknown alphabet
|
||||
#define USSDBusy 72
|
||||
#define PWRegFail 37 // pw-registration failure
|
||||
#define NegPWCheck 38 // negative pw-check
|
||||
#define NumOfPWAttViolate 43 // number of pw-attempts violation
|
||||
#define ShortTermDen 29 // short term denial
|
||||
#define LongTermDen 30 // long term denial
|
||||
|
||||
/* short message service error codes */
|
||||
#define SubBusyForMTSMS 31 // subscriber busy for MT-SMS
|
||||
#define SMDelivFail 32 // SM-delivery failure
|
||||
#define MsgWaitListFull 33 // message waiting list full
|
||||
#define AbsentSubSM 6 // absent subscriber SM
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++ */
|
||||
/* MAP operation provider error */
|
||||
/* defined by user */
|
||||
/* ++++++++++++++++++++++++++++++++ */
|
||||
#define DupInvokeId 101 // duplicated invoke id
|
||||
#define SrvNotSupport 102 // service not supported
|
||||
#define MistypeParam 103 // mistyped parameter
|
||||
#define ResourceLimit 104 // resource limitation
|
||||
#define InitRelease 105 // initiating release
|
||||
#define UnexpResFromPeer 106 // unexpected response from the peer
|
||||
#define SrvCompleteFailure 107 // service completion failure
|
||||
#define NoResFromPeer 108 // no response from the peer
|
||||
#define InvResReceive 109 // invalid response received
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++ */
|
||||
/* the following codes is reserved */
|
||||
/* ++++++++++++++++++++++++++++++++ */
|
||||
|
||||
/* reserved operation codes */
|
||||
#define SndParam 9 // send parameter
|
||||
#define ProcUnstrctSSData 19 // process unstructure SS data
|
||||
#define PerformHo 28 // perform handover
|
||||
#define PerformSubsHo 30 // perform subsequence handvoer
|
||||
#define NoteInterHo 35 // note internal handover
|
||||
#define NoteSubPrnt 48 // not subscriber present
|
||||
#define AlrtSCWithoutRes 49 // alert service center without result
|
||||
#define TraceSubAct 52 // trace subscriber activity
|
||||
#define BeginSubAct 54 // beging subscriber activity
|
||||
|
||||
/* reserved error codes */
|
||||
#define UnknwnBS 2 // unknowd base station
|
||||
#define InvalidTBS 23 // invalid target base station
|
||||
#define NoRRAvail 24 // no radio resource available
|
||||
|
||||
/* MAP OPEN response result */
|
||||
#define OpenResultRefuse 0x01
|
||||
#define OpenResultAccept 0x02
|
||||
|
||||
/* MAP OPEN refuse result */
|
||||
#define ACNotSupported 0x01
|
||||
#define InvalidDesReference 0x02 // invalid destination reference
|
||||
#define InvalidOrgReference 0x03 // invalid original reference
|
||||
#define NoReasonGiven 0x04
|
||||
#define RemoteNodeNotReachable 0x05
|
||||
#define PotentialVerIncompat 0x06 // potential version incompatibility
|
||||
|
||||
/* MAP CLOSE release method */
|
||||
#define NormalRelease 0x01
|
||||
#define PrearrangedEnd 0x02
|
||||
|
||||
/* MAP U-ABORT user reason */
|
||||
#define ResourceLimite 0x01
|
||||
#define ResourceUnavailable 0x02
|
||||
#define ApplicationCancel 0x03
|
||||
#define ProcedureError 0x04
|
||||
|
||||
/* MAP U-AOBRT diagnostic information */
|
||||
#define ShortTermProblem 0x01
|
||||
#define LongTermProblem 0x02
|
||||
#define HandoverCancel 0x03
|
||||
#define RadioChannelRelease 0x04
|
||||
#define NetworkPathRelease 0x05
|
||||
#define CallRelease 0x06
|
||||
#define AssociateProcedureFailure 0x07
|
||||
#define TandemDialogueRelease 0x08
|
||||
#define RemoteOperationFailure 0x09
|
||||
|
||||
/* MAP P-ABORT provider reason */
|
||||
#define ProviderMalfunction 0x01
|
||||
#define SupportingReleased 0x02
|
||||
#define ResourceLimitation 0x03
|
||||
#define MaintenanceActivity 0x04
|
||||
#define VersionIncompatibility 0x05
|
||||
#define AbnormalMAPDialogue 0x06
|
||||
|
||||
/* MAP P-ABORT source */
|
||||
#define MAPProblem 0x01
|
||||
#define TCProblem 0x02
|
||||
#define NetworkProblem 0x03
|
||||
|
||||
/* MAP NOTICE problem diagnostic */
|
||||
#define AbnormalEventDetect 0x01
|
||||
#define ResponseRejected 0x02
|
||||
#define AbnormalEventReceived 0x03
|
||||
#define MessageNotDelivered 0x04
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////lw add MAP V1 Modify
|
||||
|
||||
#define SendParam 9 // send parameters
|
||||
#define NoteSubPrnt 48 // not subscriber present
|
||||
#define ProcUnstrctSSData 19 // process unstructure SS data
|
||||
#define BeginSubAct 54 // beging subscriber activity
|
||||
#define PerformHo 28 // perform handover
|
||||
#define PerformSubsHo 30 // perform subsequence handvoer
|
||||
#define NoteInterHo 35 // note internal handover
|
||||
#define BeginSubAct 54 // beging subscriber activity
|
||||
#define AlrtSCWithoutRes 49 // alert service center without result
|
||||
#define TraceSubAct 52 // trace subscriber activity
|
||||
//////////////////////////////////////
|
||||
|
||||
/**** OPR VLR message ********/
|
||||
#define DetermineOprUser 128
|
||||
#define VlrUpdateLocation 129
|
||||
/**** OPR VLR message ********/
|
||||
|
||||
/**** OPR HLR message ********/
|
||||
#define CreateUserWithMsisdnImsi 130
|
||||
#define DeleteOprUser 131
|
||||
/**** OPR HLR message ********/
|
||||
|
||||
/**** IMDM VLR message ********/
|
||||
#define VlrEnquiryIMDMStatus 132
|
||||
/**** IMDM VLR message ********/
|
||||
|
||||
/***************** LCS **************/
|
||||
#define RoutingInfoForLCS 85
|
||||
#define ProvideSubscriberLocation 83
|
||||
/***************** LCS **************/
|
||||
|
||||
|
||||
///////////////////////////////////Jink add MNP AIN (ANSI TCAP) start
|
||||
//National Operations code
|
||||
#define ProvideInstructionStart 3
|
||||
// opr_ptr->message_type = ProvideInstructionStart; opr_ptr->message_flag = 1;
|
||||
#define ConnectionControlConnect 4
|
||||
///////////////////////////////////Jink add MNP AIN (ANSI TCAP) end
|
||||
|
||||
|
||||
#endif
|
||||
436
plat/xapp/src/mapp/map_code_auc.c
Normal file
436
plat/xapp/src/mapp/map_code_auc.c
Normal file
@@ -0,0 +1,436 @@
|
||||
/* map coding auc service file */
|
||||
/* written by Liu Zhiguo 2002-06-03 */
|
||||
/* Version 2.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#include "map_includes.h"
|
||||
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding security triplets argument */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_securityTriplets_arg(struct MapST_Arg *ptr,u8 *buf, u8 version)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
int temp_len;
|
||||
u8 temp_buf[256];
|
||||
u8 tag1 = 1;
|
||||
char tlv1[8];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
|
||||
sprintf(tlv1, "4-%d", tag1++);
|
||||
if(ptr->param_flag & 0x01) //imsi
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,ptr->imsi,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
sprintf(tlv1, "4-%d", tag1++);
|
||||
if(ptr->param_flag & 0x02) //hlr_id
|
||||
buf_len = add_tlv(tlv1,HLRID_LEN,ptr->hlr_id,0x00,&asn_buf);
|
||||
/* sprintf(tlv1, "1-%d", tag1++);
|
||||
if(ptr->param_flag & 0x04)
|
||||
buf_len = add_tlv(tlv1, 1, (u8*)&ptr->choice_flag, 0x80, &asn_buf);*/
|
||||
|
||||
//quintuplet add by gxchen
|
||||
if(version == 3)
|
||||
{
|
||||
sprintf(tlv1, "2-%d", tag1++);
|
||||
if(ptr->param_flag & 0x04)
|
||||
buf_len = add_tlv(tlv1, 1, &ptr->num_req_vec, 0x00, &asn_buf);
|
||||
else
|
||||
{
|
||||
mapp_log_debug("version_4 assign security arg lack numberOfRequestedVectors");
|
||||
// return RER; //temp take out
|
||||
}
|
||||
sprintf(tlv1, "5-%d", tag1++);
|
||||
if(ptr->param_flag & 0x08)
|
||||
buf_len = add_tlv(tlv1, 1, &ptr->seg_prohibit, 0x00, &asn_buf);
|
||||
sprintf(tlv1, "1-%d", tag1++);
|
||||
if(ptr->param_flag & 0x10)
|
||||
buf_len = add_tlv(tlv1, 1, &ptr->imm_res_prefer, 0x80, &asn_buf);
|
||||
sprintf(tlv1, "16");
|
||||
if(ptr->param_flag & 0x20)
|
||||
{
|
||||
temp_len = assign_authReSynInfo(&ptr->resyn_info, temp_buf);
|
||||
if(temp_len != RER)
|
||||
buf_len = add_tlv(tlv1, temp_len, temp_buf, 0x20, &asn_buf);
|
||||
}
|
||||
sprintf(tlv1, "3-%d", tag1++);
|
||||
if(ptr->param_flag & 0x40)
|
||||
buf_len = add_tlv(tlv1, 1, (u8*)&ptr->node_type, 0x80, &asn_buf);
|
||||
sprintf(tlv1, "4-%d", tag1++);
|
||||
if(ptr->param_flag & 0x80)
|
||||
buf_len = add_tlv(tlv1, 3, ptr->req_plmn_id, 0x80, &asn_buf);
|
||||
sprintf(tlv1, "5-%d", tag1++);
|
||||
if(ptr->param_flag & 0x100)
|
||||
buf_len = add_tlv(tlv1, 1, &ptr->num_req_add_vec, 0x80, &asn_buf);
|
||||
sprintf(tlv1, "6-%d", tag1++);
|
||||
if(ptr->param_flag & 0x200)
|
||||
buf_len = add_tlv(tlv1, 1, &ptr->add_vec_eps, 0x80, &asn_buf);
|
||||
}
|
||||
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_securityTriplets_arg(struct MapST_Arg *ptr,u32 buf_len,u8 *buf, u8 version)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256];
|
||||
int len;
|
||||
u8 tag1 = 1;
|
||||
char tlv1[8];
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_securityTriplets_arg buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if(asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
ptr->param_flag = 0;
|
||||
|
||||
sprintf(tlv1, "4-%d", tag1++);
|
||||
len = get_tlv(tlv1,temp_buf,&asn_buf);
|
||||
if(len == IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0 ) //imsi
|
||||
{
|
||||
ptr->param_flag |= 0x01;
|
||||
memcpy(ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("%s: lack IMSI", __FUNCTION__);
|
||||
return RER;
|
||||
}
|
||||
sprintf(tlv1, "4-%d", tag1++);
|
||||
if((len=get_tlv(tlv1,temp_buf,&asn_buf)) == HLRID_LEN ) //hlr_id
|
||||
{
|
||||
ptr->param_flag |= 0x02;
|
||||
memcpy(ptr->hlr_id,temp_buf,len);
|
||||
}
|
||||
/* sprintf(tlv1, "1-%d", tag1++);
|
||||
if((get_tlv(tlv1, temp_buf, &asn_buf)) == 1) //choice_flag
|
||||
{
|
||||
ptr->param_flag |= 0x04;
|
||||
ptr->choice_flag = temp_buf[0];
|
||||
}*/
|
||||
|
||||
//quintuplet add by gxchen
|
||||
if(version == 3)
|
||||
{
|
||||
sprintf(tlv1, "2-%d", tag1++);
|
||||
if(get_tlv(tlv1, temp_buf, &asn_buf) == 1)
|
||||
{
|
||||
ptr->param_flag |= 0x04;
|
||||
ptr->num_req_vec = temp_buf[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("%s: lack numberOfRequestedVectors", __FUNCTION__);
|
||||
// return RER; //temp take out
|
||||
}
|
||||
sprintf(tlv1, "5-%d", tag1++);
|
||||
if(get_tlv(tlv1, temp_buf, &asn_buf) == 1)
|
||||
{
|
||||
ptr->param_flag |= 0x08;
|
||||
ptr->seg_prohibit = temp_buf[0];
|
||||
}
|
||||
sprintf(tlv1, "1-%d", tag1++);
|
||||
if(get_tlv(tlv1, temp_buf, &asn_buf) == 1)
|
||||
{
|
||||
ptr->param_flag |= 0x10;
|
||||
ptr->imm_res_prefer = temp_buf[0];
|
||||
}
|
||||
sprintf(tlv1, "16");
|
||||
if((len = get_tlv(tlv1, temp_buf, &asn_buf)) > 0)
|
||||
{
|
||||
ptr->param_flag |= 0x20;
|
||||
extract_authReSynInfo(&ptr->resyn_info, len, temp_buf);
|
||||
}
|
||||
sprintf(tlv1, "3-%d", tag1++);
|
||||
if(get_tlv(tlv1, temp_buf, &asn_buf) == 1)
|
||||
{
|
||||
ptr->param_flag |= 0x40;
|
||||
ptr->node_type = temp_buf[0];
|
||||
}
|
||||
sprintf(tlv1, "4-%d", tag1++);
|
||||
if(get_tlv(tlv1, temp_buf, &asn_buf) > 0)
|
||||
{
|
||||
ptr->param_flag |= 0x80;
|
||||
memcpy(ptr->req_plmn_id, temp_buf, 3);
|
||||
}
|
||||
sprintf(tlv1, "5-%d", tag1++);
|
||||
if(get_tlv(tlv1, temp_buf, &asn_buf) == 1)
|
||||
{
|
||||
ptr->param_flag |= 0x100;
|
||||
ptr->num_req_add_vec = temp_buf[0];
|
||||
}
|
||||
sprintf(tlv1, "6-%d", tag1++);
|
||||
if(get_tlv(tlv1, temp_buf, &asn_buf) == 1)
|
||||
{
|
||||
ptr->param_flag |= 0x200;
|
||||
ptr->add_vec_eps = temp_buf[0];
|
||||
}
|
||||
}
|
||||
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding security triplets response */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_securityTriplets_res(struct MapST_Res *ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
int ii;
|
||||
char tlv1[32];
|
||||
int temp_len;
|
||||
u8 temp_buf[256];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
if ((ptr->param_flag & 0x2) == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--assign_securityTriplets_res flag=0");
|
||||
return RER;
|
||||
}
|
||||
if(ptr->param_flag & 0x01)
|
||||
buf_len = add_tlv("1", 1, (u8*)&ptr->choice_flag, 0x80, &asn_buf);
|
||||
|
||||
if(ptr->choice_flag == AUTH_LIST_QUINTUPLET) //add by gxchen
|
||||
{
|
||||
if (ptr->choice.quin_list.quin_len > AUTHLIST_LEN)
|
||||
{
|
||||
mapp_log_debug("MAPP--assign_securityTriplets_res quintuplet auth_len>AUTHLIST_LEN");
|
||||
return RER;
|
||||
}
|
||||
for(ii = 0; ii < ptr->choice.quin_list.quin_len && ii < 1; ii ++)
|
||||
{
|
||||
temp_len = assign_quintuplet(&ptr->choice.quin_list.quintuplet[ii], temp_buf);
|
||||
if(temp_len == RER)
|
||||
break;
|
||||
sprintf(tlv1, "16-%d", ii+1);
|
||||
buf_len = add_tlv(tlv1, temp_len, temp_buf, 0x20, &asn_buf);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ptr->choice.tri_list.tri_len > AUTHLIST_LEN)
|
||||
{
|
||||
mapp_log_debug("MAPP--assign_securityTriplets_res auth_len>AUTHLIST_LEN");
|
||||
return RER;
|
||||
}
|
||||
for (ii = 0;ii < ptr->choice.tri_list.tri_len;ii ++)
|
||||
{
|
||||
temp_len = assign_authset((AuthSet_struct*)&ptr->choice.tri_list.triplet[ii],temp_buf);
|
||||
if (temp_len == RER)
|
||||
break;
|
||||
sprintf(tlv1,"16-%d",ii+1);
|
||||
buf_len = add_tlv(tlv1,temp_len,temp_buf,0x20,&asn_buf);
|
||||
}
|
||||
}
|
||||
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_securityTriplets_res(struct MapST_Res *ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
u8 temp_buf[256];
|
||||
char tlv1[32];
|
||||
int ii;
|
||||
int len;
|
||||
ASN_BUF asn_buf;
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_securityTriplets_res buf_len=0");
|
||||
return ROK;
|
||||
}
|
||||
if(asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
ptr->param_flag = 0;
|
||||
|
||||
//add by gxchen
|
||||
if((get_tlv("1", temp_buf, &asn_buf)) == 1) //choice flag
|
||||
{
|
||||
ptr->param_flag |= 0x01;
|
||||
ptr->choice_flag = temp_buf[0];
|
||||
}
|
||||
if(ptr->choice_flag == AUTH_LIST_QUINTUPLET) //quintuplet
|
||||
{
|
||||
ptr->choice.quin_list.quin_len = 0;
|
||||
for(ii = 0; ii < AUTHLIST_LEN; ii++)
|
||||
{
|
||||
sprintf(tlv1, "16-%d", ii+1);
|
||||
len = get_tlv(tlv1, temp_buf, &asn_buf);
|
||||
if(len <= 0) //has not data
|
||||
break;
|
||||
if(!extract_quintuplet(&ptr->choice.quin_list.quintuplet[ii], len, temp_buf))
|
||||
break;
|
||||
ptr->param_flag |= 0x02;
|
||||
ptr->choice.quin_list.quin_len++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr->choice.tri_list.tri_len = 0;
|
||||
for(ii = 0;ii < AUTHLIST_LEN;ii ++)
|
||||
{
|
||||
sprintf(tlv1,"16-%d",ii+1);
|
||||
len = get_tlv(tlv1,temp_buf,&asn_buf);
|
||||
if (len == -1)
|
||||
break;
|
||||
if (!extract_authset((AuthSet_struct*)&ptr->choice.tri_list.triplet[ii],len,temp_buf))
|
||||
break;
|
||||
ptr->param_flag |= 0x02;
|
||||
ptr->choice.tri_list.tri_len++;
|
||||
}
|
||||
}
|
||||
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding interrogation subscriber argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_interrogateSubscriber_arg(struct MapIS_Arg *ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
u32 flag;
|
||||
|
||||
flag = ptr->param_flag;
|
||||
asn_encode(buf,&asn_buf);
|
||||
if(flag & 0x01) //imsi
|
||||
buf_len = add_tlv("4-1",IMSI_LEN,ptr->imsi,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
if(flag & 0x02) //hlr_id
|
||||
buf_len = add_tlv("4-2",HLRID_LEN,ptr->hlr_id,0x00,&asn_buf);
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_interrogateSubscriber_arg(struct MapIS_Arg *ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256];
|
||||
int len;
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_interrogateSubscriber_arg buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if(asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
ptr->param_flag = 0;
|
||||
len = get_tlv("4-1",temp_buf,&asn_buf);
|
||||
if(len == IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0 )//imsi
|
||||
{
|
||||
ptr->param_flag|=0x01;
|
||||
memcpy(ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
if((get_tlv("4-2",temp_buf,&asn_buf)) == HLRID_LEN)//hlr_id
|
||||
{
|
||||
ptr->param_flag |= 0x02;
|
||||
memcpy(ptr->hlr_id,temp_buf,HLRID_LEN);
|
||||
}
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding create subscriber argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_createSubscriber_arg(struct MapCS_Arg *ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
u32 flag;
|
||||
|
||||
flag = ptr->param_flag;
|
||||
asn_encode(buf,&asn_buf);
|
||||
if(flag & 0x01) //imsi
|
||||
buf_len = add_tlv("4-1",IMSI_LEN,ptr->imsi,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
if(flag & 0x02) //hlr_id
|
||||
buf_len = add_tlv("4-2",HLRID_LEN,ptr->hlr_id,0x00,&asn_buf);
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_createSubscriber_arg(struct MapCS_Arg *ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256];
|
||||
int len;
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_createSubscriber_arg buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if(asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
ptr->param_flag = 0;
|
||||
len = get_tlv("4-1",temp_buf,&asn_buf);
|
||||
if(len == IMSI_LEN && (temp_buf[7]&0xf0) == 0xf0) //imsi
|
||||
{
|
||||
ptr->param_flag |= 0x01;
|
||||
memcpy(ptr->imsi,temp_buf,len);
|
||||
}
|
||||
if((get_tlv("4-2",temp_buf,&asn_buf))==HLRID_LEN) //hlr_id
|
||||
{
|
||||
ptr->param_flag |= 0x02;
|
||||
memcpy(ptr->hlr_id,temp_buf,HLRID_LEN);
|
||||
}
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding delete subscriber argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_deleteSubscriber_arg(struct MapDS_Arg *ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
u32 flag;
|
||||
|
||||
flag = ptr->param_flag;
|
||||
asn_encode(buf,&asn_buf);
|
||||
if(flag & 0x01) //imsi
|
||||
buf_len = add_tlv("4-1",IMSI_LEN,ptr->imsi,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
if(flag & 0x02) //hlr_id
|
||||
buf_len = add_tlv("4-2",HLRID_LEN,ptr->hlr_id,0x00,&asn_buf);
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_deleteSubscriber_arg(struct MapDS_Arg *ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256];
|
||||
int len;
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_createSubscriber_arg buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if(asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
ptr->param_flag = 0;
|
||||
len = get_tlv("4-1",temp_buf,&asn_buf);
|
||||
if(len == IMSI_LEN && (temp_buf[7]&0xf0) == 0xf0) //imsi
|
||||
{
|
||||
ptr->param_flag |= 0x01;
|
||||
memcpy(ptr->imsi,temp_buf,len);
|
||||
}
|
||||
if((get_tlv("4-2",temp_buf,&asn_buf))==HLRID_LEN) //hlr_id
|
||||
{
|
||||
ptr->param_flag |= 0x02;
|
||||
memcpy(ptr->hlr_id,temp_buf,HLRID_LEN);
|
||||
}
|
||||
return ROK;
|
||||
}
|
||||
1937
plat/xapp/src/mapp/map_code_ch.c
Normal file
1937
plat/xapp/src/mapp/map_code_ch.c
Normal file
File diff suppressed because it is too large
Load Diff
210
plat/xapp/src/mapp/map_code_dlgpdu.c
Normal file
210
plat/xapp/src/mapp/map_code_dlgpdu.c
Normal file
@@ -0,0 +1,210 @@
|
||||
/* MAP dialogue PDU coding/decoding c file */
|
||||
/* Written by Liu Zhiguo 2003-08-25 */
|
||||
/* Version: 1.0 */
|
||||
/* -------------------------------------- */
|
||||
|
||||
#include "map_includes.h"
|
||||
#include "../../../tcap/src/include/tcap_head.h"
|
||||
#include "../../../tcap/src/include/tcap_public.h"
|
||||
#include "../../../tcap/src/include/tcap_struct.h"
|
||||
#include "../xap_interfunc.h"
|
||||
#include "map_dlgpdu.h"
|
||||
|
||||
|
||||
static u8 MAPP_Dlgpdu[7] = {0x04,0x00,0x00,0x01,0x01,0x01,0x01};
|
||||
|
||||
u8 build_mapdlg(struct MapDlg_struct *dlg_ptr,u8 *data_buf) // build user information portion
|
||||
{
|
||||
struct MapDlgOpen_struct *map_open;
|
||||
struct MapDlgUAbort_struct *map_uabort;
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256],temp_data[256];
|
||||
int len=0,len1=0;
|
||||
|
||||
asn_encode(temp_buf,&asn_buf);
|
||||
switch (dlg_ptr->dlg_type)
|
||||
{
|
||||
case MAPDLG_OPEN:
|
||||
map_open = (MapDlgOpen_struct *) &dlg_ptr->map_dlg.map_open;
|
||||
if ((map_open->param_flag & 0x01))
|
||||
len1 = add_tlv("0.0",map_open->peer_ref[0],map_open->peer_ref+1,0x80,&asn_buf);
|
||||
if ((map_open->param_flag & 0x02))
|
||||
len1 = add_tlv("0.1",map_open->local_ref[0],map_open->local_ref+1,0x80,&asn_buf);
|
||||
break;
|
||||
case MAPDLG_ACCEPT:
|
||||
len1 = add_tlv("1",0,&dlg_ptr->dlg_type,0x80,&asn_buf);
|
||||
break;
|
||||
case MAPDLG_CLOSE:
|
||||
len1 = add_tlv("2",0,&dlg_ptr->dlg_type,0x80,&asn_buf);
|
||||
break;
|
||||
case MAPDLG_REFUSE:
|
||||
temp_data[0] = dlg_ptr->map_dlg.map_refuse.reason;
|
||||
len1 = add_tlv("3.10",1,temp_data,0x00,&asn_buf);
|
||||
break;
|
||||
case MAPDLG_UABORT:
|
||||
map_uabort = (MapDlgUAbort_struct *) &dlg_ptr->map_dlg.map_uabort;
|
||||
switch (map_uabort->choice_flag)
|
||||
{
|
||||
case 0:
|
||||
len1 = add_null("4.0",0x00,&asn_buf);
|
||||
break;
|
||||
case 1:
|
||||
len1 = add_null("4.1",0x00,&asn_buf);
|
||||
break;
|
||||
case 2:
|
||||
temp_data[0] = map_uabort->choice.resunavi;
|
||||
len1 = add_tlv("4.2.10",1,temp_data,0x00,&asn_buf);
|
||||
break;
|
||||
case 3:
|
||||
temp_data[0] = map_uabort->choice.appproccancel;
|
||||
len1 = add_tlv("4.3.10",1,temp_data,0x00,&asn_buf);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MAPDLG_PABORT:
|
||||
temp_data[0] = dlg_ptr->map_dlg.map_pabort.reason;
|
||||
len1 = add_tlv("5.10",1,temp_data,0x00,&asn_buf);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
asn_encode(data_buf,&asn_buf);
|
||||
len = add_tlv("8",0,temp_data,0x20,&asn_buf);
|
||||
len = add_tlv("8.6-1",7,MAPP_Dlgpdu,0x00,&asn_buf);
|
||||
len = add_tlv("8.0-2",len1,temp_buf,0xa0,&asn_buf);
|
||||
return len;
|
||||
}
|
||||
|
||||
u8 extract_mapdlg(struct MapDlg_struct *dlg_ptr,struct dlgport_struct *port_ptr)
|
||||
{
|
||||
struct MapDlgOpen_struct *map_open;
|
||||
struct MapDlgUAbort_struct *map_uabort;
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256],temp_data[256];
|
||||
int len;
|
||||
|
||||
dlg_ptr->dlg_type = 0xff;
|
||||
len = asn_decode(port_ptr->user_info,1,&asn_buf);
|
||||
if (len != port_ptr->user_info_len)
|
||||
{
|
||||
sprintf((char *)temp_buf, "MAPP extract user info error, wrong length, %d v.s. %d", len, port_ptr->user_info_len);
|
||||
xap_send_error((char *)temp_buf);
|
||||
//return 0;
|
||||
}
|
||||
len = get_tlv("8",temp_buf,&asn_buf); // get External tag
|
||||
if (len == -1) // has nor external tag
|
||||
{
|
||||
xap_send_error("MAPP extract user info error, no external Tag");
|
||||
return 0;
|
||||
}
|
||||
len = get_tlv("8.6",temp_buf,&asn_buf);
|
||||
if (len == 7) // get MAP dialgoue PDU
|
||||
{
|
||||
if (temp_buf[5] != 1 || temp_buf[6] != 1)
|
||||
{
|
||||
xap_send_error("MAPP extract user info error identifier");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
len = get_tlv("8.0",temp_buf,&asn_buf); // get ASN.1 type
|
||||
if (len == -1)
|
||||
{
|
||||
xap_send_error("MAPP extract user info error ASN.1 type");
|
||||
return 0;
|
||||
}
|
||||
len = asn_decode(temp_buf,1,&asn_buf);
|
||||
len = get_tlv("0",temp_data,&asn_buf); // MAP_OPEN info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_OPEN;
|
||||
map_open = (MapDlgOpen_struct *) &dlg_ptr->map_dlg.map_open;
|
||||
map_open->param_flag = 0;
|
||||
len = get_tlv("0.0",temp_data,&asn_buf); // local reference
|
||||
if (len != -1)
|
||||
{
|
||||
map_open->param_flag |= 0x02;
|
||||
map_open->local_ref[0] = len;
|
||||
memcpy(map_open->local_ref+1,temp_data,len);
|
||||
}
|
||||
len = get_tlv("0.1",temp_data,&asn_buf); // peer reference
|
||||
if (len != -1)
|
||||
{
|
||||
map_open->param_flag |= 0x01;
|
||||
map_open->peer_ref[0] = len;
|
||||
memcpy(map_open->peer_ref+1,temp_data,len);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
len = get_tlv("1",temp_data,&asn_buf); // MAP_ACCEPT info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_ACCEPT;
|
||||
return 1;
|
||||
}
|
||||
len = get_tlv("2",temp_data,&asn_buf); // MAP_CLOSE info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_CLOSE;
|
||||
return 1;
|
||||
}
|
||||
len = get_tlv("3",temp_data,&asn_buf); // MAP_REFUSE info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_REFUSE;
|
||||
len = get_tlv("3.10",temp_data,&asn_buf);
|
||||
if (len != 1)
|
||||
{
|
||||
xap_send_error("MAPP extract user info refuse lack reason");
|
||||
return 0;
|
||||
}
|
||||
dlg_ptr->map_dlg.map_refuse.param_flag = 0x01;
|
||||
dlg_ptr->map_dlg.map_refuse.reason = temp_data[0];
|
||||
return 1;
|
||||
}
|
||||
len = get_tlv("4",temp_data,&asn_buf); // MAP_UABORT info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_UABORT;
|
||||
map_uabort = (MapDlgUAbort_struct *) &dlg_ptr->map_dlg.map_uabort;
|
||||
len = get_tlv("4.0",temp_data,&asn_buf); // user specific reason
|
||||
if (len != -1)
|
||||
map_uabort->choice_flag = 0;
|
||||
len = get_tlv("4.1",temp_data,&asn_buf); // user resource limitation
|
||||
if (len != -1)
|
||||
map_uabort->choice_flag = 1;
|
||||
len = get_tlv("4.2",temp_data,&asn_buf); // resource unabailable
|
||||
if (len != -1)
|
||||
{
|
||||
map_uabort->choice_flag = 2;
|
||||
len = get_tlv("4.2.10",temp_data,&asn_buf);
|
||||
if (len == -1)
|
||||
return 0;
|
||||
map_uabort->choice.resunavi = temp_data[0];
|
||||
}
|
||||
len = get_tlv("4.3",temp_data,&asn_buf); // APC
|
||||
if (len != -1)
|
||||
{
|
||||
map_uabort->choice_flag = 3;
|
||||
len = get_tlv("4.3.10",temp_data,&asn_buf);
|
||||
if (len == -1)
|
||||
return 0;
|
||||
map_uabort->choice.appproccancel = temp_data[0];
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
len = get_tlv("5",temp_data,&asn_buf); // MAP_PAOBRT info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_PABORT;
|
||||
len = get_tlv("5.10",temp_data,&asn_buf);
|
||||
if (len != 1)
|
||||
return 0;
|
||||
dlg_ptr->map_dlg.map_pabort.param_flag = 0x01;
|
||||
dlg_ptr->map_dlg.map_pabort.reason = temp_data[0];
|
||||
return 1;
|
||||
}
|
||||
xap_send_error("MAPP extract user info unknown type");
|
||||
return 0;
|
||||
}
|
||||
5305
plat/xapp/src/mapp/map_code_ms.c
Normal file
5305
plat/xapp/src/mapp/map_code_ms.c
Normal file
File diff suppressed because it is too large
Load Diff
231
plat/xapp/src/mapp/map_code_om.c
Normal file
231
plat/xapp/src/mapp/map_code_om.c
Normal file
@@ -0,0 +1,231 @@
|
||||
/* map coding operation & maintenance c file */
|
||||
/* written by Liu Zhiguo 2003-03-04 */
|
||||
/* Version 2.0 */
|
||||
/* ----------------------------------------- */
|
||||
|
||||
#include "map_includes.h"
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding activate trace mode argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_acttrcmodearg(struct MapATM_Arg *atm_ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
if (atm_ptr->param_flag & 0x01) // imsi
|
||||
buf_len = add_tlv("0",IMSI_LEN,atm_ptr->imsi,0x80,&asn_buf);
|
||||
if (atm_ptr->param_flag & 0x02) // trace reference
|
||||
buf_len = add_tlv("1",2,atm_ptr->trace_ref,0x80,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
if (atm_ptr->param_flag & 0x04) // trace type
|
||||
buf_len = add_int("2",atm_ptr->trace_type,0x80,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
if (atm_ptr->param_flag & 0x08) // omc id
|
||||
buf_len = add_tlv("3",atm_ptr->omc_id[0],atm_ptr->omc_id+1,0x80,&asn_buf);
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_acttrcmodearg(struct MapATM_Arg *atm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
|
||||
atm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_activate trace mode buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf);
|
||||
if (len==IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0) //get imsi
|
||||
{
|
||||
atm_ptr->param_flag |= 0x01;
|
||||
memcpy(atm_ptr->imsi,temp_buf,IMSI_LEN);
|
||||
}
|
||||
if (get_tlv("1",temp_buf,&asn_buf) == 2)
|
||||
{
|
||||
atm_ptr->param_flag |= 0x02;
|
||||
memcpy(atm_ptr->trace_ref,temp_buf,2);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
if (get_tlv("2",temp_buf,&asn_buf) == 1)
|
||||
{
|
||||
atm_ptr->param_flag |= 0x04;
|
||||
atm_ptr->trace_type = temp_buf[0];
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
len = get_tlv("3",temp_buf,&asn_buf);
|
||||
if (len > 0 && len <= ISDN_LEN)
|
||||
{
|
||||
atm_ptr->param_flag |= 0x08;
|
||||
atm_ptr->omc_id[0] = len;
|
||||
memcpy(atm_ptr->omc_id+1,temp_buf,len);
|
||||
}
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding activate trace mode response */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_acttrcmoderes(struct MapATM_Res *atm_ptr,u8 *buf)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int extract_acttrcmoderes(struct MapATM_Res *atm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding deactivate trace mode argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_deacttrcmodearg(struct MapDTM_Arg *dtm_ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
if (dtm_ptr->param_flag & 0x01) // imsi
|
||||
buf_len = add_tlv("0",IMSI_LEN,dtm_ptr->imsi,0x80,&asn_buf);
|
||||
if (dtm_ptr->param_flag & 0x02) // trace reference
|
||||
buf_len = add_tlv("1",2,dtm_ptr->trace_ref,0x80,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_deacttrcmodearg(struct MapDTM_Arg *dtm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
|
||||
dtm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_deactivate trace mode buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf);
|
||||
if (len==IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0) //get imsi
|
||||
{
|
||||
dtm_ptr->param_flag |= 0x01;
|
||||
memcpy(dtm_ptr->imsi,temp_buf,IMSI_LEN);
|
||||
}
|
||||
if (get_tlv("1",temp_buf,&asn_buf) == 2)
|
||||
{
|
||||
dtm_ptr->param_flag |= 0x02;
|
||||
memcpy(dtm_ptr->trace_ref,temp_buf,2);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding deactivate trace mode response */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_deacttrcmoderes(struct MapDTM_Res *dtm_ptr,u8 *buf)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int extract_deacttrcmoderes(struct MapDTM_Res *dtm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding send IMSI argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_sndimsiarg(struct MapSIMSI_Arg *sim_ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
if (sim_ptr->param_flag & 0x01) // msisdn
|
||||
buf_len = add_tlv("4",sim_ptr->msisdn[0],sim_ptr->msisdn+1,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_sndimsiarg(struct MapSIMSI_Arg *sim_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
|
||||
sim_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_send imsi buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("4",temp_buf,&asn_buf);
|
||||
if (len > 0 && len <= ISDN_LEN)
|
||||
{
|
||||
sim_ptr->param_flag |= 0x01;
|
||||
sim_ptr->msisdn[0] = len;
|
||||
memcpy(sim_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding send IMSI response */
|
||||
/* ++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_sndimsires(struct MapSIMSI_Res *sim_ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
if (sim_ptr->param_flag & 0x01) // imsi
|
||||
buf_len = add_tlv("4",IMSI_LEN,sim_ptr->imsi,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_sndimsires(struct MapSIMSI_Res *sim_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
|
||||
sim_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_send imsi buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("4",temp_buf,&asn_buf);
|
||||
if (len == IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0)
|
||||
{
|
||||
sim_ptr->param_flag |= 0x01;
|
||||
memcpy(sim_ptr->imsi,temp_buf,IMSI_LEN);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
return ROK;
|
||||
}
|
||||
1322
plat/xapp/src/mapp/map_code_sms.c
Normal file
1322
plat/xapp/src/mapp/map_code_sms.c
Normal file
File diff suppressed because it is too large
Load Diff
1647
plat/xapp/src/mapp/map_code_ss.c
Normal file
1647
plat/xapp/src/mapp/map_code_ss.c
Normal file
File diff suppressed because it is too large
Load Diff
2345
plat/xapp/src/mapp/map_coding.c
Normal file
2345
plat/xapp/src/mapp/map_coding.c
Normal file
File diff suppressed because it is too large
Load Diff
546
plat/xapp/src/mapp/map_coding.h
Normal file
546
plat/xapp/src/mapp/map_coding.h
Normal file
@@ -0,0 +1,546 @@
|
||||
/* MAP coding head file */
|
||||
/* written by Liu Zhiguo 2003-03-04 */
|
||||
/* version 2.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#ifndef _MAP_CODING
|
||||
#define _MAP_CODING
|
||||
|
||||
/* define in map_code_ms.c */
|
||||
int assign_uplocarg(struct MapUL_Arg *ul_ptr,u8 *buf,u8 ver);
|
||||
int extract_uplocarg(struct MapUL_Arg *ul_ptr,u32 buf_len,u8 *buf ,u8 ver);
|
||||
int assign_uplocres(struct MapUL_Res *ul_ptr,u8 *buf);
|
||||
int extract_uplocres(struct MapUL_Res *ul_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
|
||||
/* ------------------------>>>>>>>>>>>>>>>> MAP v1 <<<<<<<<<<<<<<<<<<<<<<<<<----------------*/
|
||||
|
||||
//int assign_sendParameterres(struct MapSP_Res *sp_ptr,u8 *buf);
|
||||
//int extract_sendParameterArg(struct MapSP_Arg *sp_ptr,u32 buf_len,u8 *buf,u32 dialogue_id);
|
||||
|
||||
int assign_SendParaArg(struct MapSP_Arg *sendpara_ptr,u8 *buf);
|
||||
int extract_SendParaArg(struct MapSP_Arg *sendpara_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_SendParaRes(struct MapSP_Res *sp_ptr,u8 *buf);
|
||||
int extract_SendParaRes(struct MapSP_Res *sp_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_NotPresentArg(struct MapNP_Arg *np_ptr, u8 *buf);
|
||||
int extract_NotPresentArg( struct MapNP_Arg *np_ptr,u32 buf_len,u8 *buf) ;
|
||||
|
||||
int assign_ProcessUSSDArg(struct MapPUSSD_Arg *ussd_ptr, u8 *buf);
|
||||
int extract_ProcessUSSDArg( struct MapPUSSD_Arg *ussd_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_ProcessUSSDRes(struct MapPUSSD_Res *ussd_ptr, u8 *buf) ;
|
||||
int extract_ProcessUSSDRes( struct MapPUSSD_Res *ussd_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_SAArg(struct MapSA_Arg *sa_ptr, u8 *buf) ;
|
||||
int extract_SAArg( struct MapSA_Arg *sa_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_HOArg(struct MapHO_Arg *ho_ptr, u8 *buf) ;
|
||||
int extract_HOArg( struct MapHO_Arg *ho_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_HORes(struct MapHO_Res *ho_ptr, u8 *buf) ;
|
||||
int extract_HORes( struct MapHO_Res *ho_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_PFSHOArg(struct MapPFSHO_Arg *psho_ptr, u8 *buf);
|
||||
int extract_PFSHOArg( struct MapPFSHO_Arg *psho_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_PFSHORes(struct MapPFSHO_Res *psho_ptr,u8 *buf);
|
||||
int extract_PFSHORes(struct MapPFSHO_Res *psho_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_NIHOArg(struct MapNIHO_Arg *niho_ptr, u8 *buf) ;
|
||||
int extract_NIHOArg( struct MapNIHO_Arg *niho_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_TSAArg(struct MapTSA_Arg *tsa_ptr, u8 *buf);
|
||||
int extract_TSAArg( struct MapTSA_Arg *TSA_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_BSAArg(struct MapBSA_Arg *bsa_ptr, u8 *buf);
|
||||
int extract_BSAArg( struct MapBSA_Arg *bsa_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
|
||||
int assign_routinfoforsm_v1_arg(struct MapRIFSMV1_Arg *rif_ptr,u8 *buf);
|
||||
int extract_routinfoforsm_v1_arg(struct MapRIFSMV1_Arg *rif_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_routinfoforsm_v1_res(struct MapRIFSMV1_Res *rif_ptr,u8 *buf);
|
||||
int extract_routinfoforsm_v1_res(struct MapRIFSMV1_Res *rif_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
|
||||
int assign_fwdsmarg(struct MapFSM_Arg *ptr,u8 *buf);
|
||||
int extract_fwdsmarg(struct MapFSM_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_cancellocarg(struct MapCL_Arg *cl_ptr,u8 *buf,u8 ver);
|
||||
int extract_cancellocarg(struct MapCL_Arg *cl_ptr,u32 buf_len,u8 *buf,u8 ver);
|
||||
int assign_cancellocres(struct MapCL_Res *cl_ptr,u8 *buf);
|
||||
int extract_cancellocres(struct MapCL_Res *cl_ptr,u32 buf_len,u8 *buf);
|
||||
/* ------------------------>>>>>>>>>>>>>>>> MAP v1 <<<<<<<<<<<<<<<<<<<<<<<<<----------------*/
|
||||
|
||||
int assign_purgemsarg(struct MapPMS_Arg *pms_ptr,u8 *buf,u8 version);
|
||||
int extract_purgemsarg(struct MapPMS_Arg *pms_ptr,u32 buf_len,u8 *buf,u8 version);
|
||||
int assign_purgemsres(struct MapPMS_Res *pms_ptr,u8 *buf);
|
||||
int extract_purgemsres(struct MapPMS_Res *pms_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_sndidentarg(struct MapSI_Arg *ptr,u8 *buf);
|
||||
int extract_sndidentarg(struct MapSI_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
int assign_sndidentres(struct MapSI_Res *ptr,u8 *buf);
|
||||
int extract_sndidentres(struct MapSI_Res *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_upgprslocarg(struct MapUGL_Arg *ugl_ptr,u8 *buf);
|
||||
int extract_upgprslocarg(struct MapUGL_Arg *ugl_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_upgprslocres(struct MapUGL_Res *ugl_ptr,u8 *buf);
|
||||
int extract_upgprslocres(struct MapUGL_Res *ugl_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_prvsubinfoarg(struct MapPSI_Arg *psi_ptr,u8 *buf);
|
||||
int extract_prvsubinfoarg(struct MapPSI_Arg *psi_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_prvsubinfores(struct MapPSI_Res *psi_ptr,u8 *buf);
|
||||
int extract_prvsubinfores(struct MapPSI_Res *psi_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_anytimeintarg(struct MapATI_Arg *ati_ptr,u8 *buf);
|
||||
int extract_anytimeintarg(struct MapATI_Arg *ati_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_anytimeintres(struct MapATI_Res *ati_ptr,u8 *buf);
|
||||
int extract_anytimeintres(struct MapATI_Res *ati_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_anytimesubintarg(struct MapATSI_Arg *atsi_ptr,u8 *buf);
|
||||
int extract_anytimesubintarg(struct MapATSI_Arg *atsi_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_anytimesubintres(struct MapATSI_Res *atsi_ptr,u8 *buf);
|
||||
int extract_anytimesubintres(struct MapATSI_Res *atsi_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_authfailreportarg(MapAuthFailReport_Arg *fail_ptr, u8 *buf);
|
||||
int extract_authfailreportarg(MapAuthFailReport_Arg *fail_ptr, u32 buf_len, u8 *buf);
|
||||
|
||||
int assign_prehoarg(struct MapPHO_Arg *pho_ptr,u8 *buf);
|
||||
int extract_prehoarg(struct MapPHO_Arg *pho_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_prehores(struct MapPHO_Res *pho_ptr,u8 *buf);
|
||||
int extract_prehores(struct MapPHO_Res *pho_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_sndendsigarg(struct MapSES_Arg *ses_ptr,u8 *buf);
|
||||
int extract_sndendsigarg(struct MapSES_Arg *ses_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_prcaccsigarg(struct MapPAS_Arg *pas_ptr,u8 *buf);
|
||||
int extract_prcaccsigarg(struct MapPAS_Arg *pas_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_fwdaccsigarg(struct MapFAS_Arg *fas_ptr,u8 *buf);
|
||||
int extract_fwdaccsigarg(struct MapFAS_Arg *fas_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_presubshoarg(struct MapPSHO_Arg *psho_ptr,u8 *buf);
|
||||
int extract_presubshoarg(struct MapPSHO_Arg *psho_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_presubshores(struct MapPSHO_Res *psho_ptr,u8 *buf);
|
||||
int extract_presubshores(struct MapPSHO_Res *psho_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_sndauthinfoarg(struct MapSAI_Arg *sai_ptr,u8 *buf, u8 version); //modify by gxchen
|
||||
int assign_sndauthinfores(struct MapSAI_Res *sai_ptr,u8 *buf, u8 version);
|
||||
int extract_sndauthinfoarg(struct MapSAI_Arg *sai_ptr,u32 buf_len,u8 *buf, u8 version);
|
||||
int extract_sndauthinfores(struct MapSAI_Res *sai_ptr,u32 buf_len,u8 *buf, u8 version);
|
||||
|
||||
int assign_chkimeiarg(struct MapCIMEI_Arg *ptr,u8 *buf);
|
||||
int extract_chkimeiarg(struct MapCIMEI_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
int assign_chkimeires(struct MapCIMEI_Res *ptr,u8 *buf);
|
||||
int extract_chkimeires(struct MapCIMEI_Res *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_inssubdataarg(struct MapISD_Arg *isd_ptr,u8 *buf,u8 version);
|
||||
int assign_inssubdatares(struct MapISD_Res *isd_ptr,u8 *buf);
|
||||
int extract_inssubdataarg(struct MapISD_Arg *isd_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_inssubdatares(struct MapISD_Res *isd_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_delsubdataarg(struct MapDSD_Arg *dsd_ptr,u8 *buf);
|
||||
int extract_delsubdataarg(struct MapDSD_Arg *dsd_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_delsubdatares(struct MapDSD_Res *dsdr_ptr,u8 *buf);
|
||||
int extract_delsubdatares(struct MapDSD_Res *dsdr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_resetarg(struct MapReset_Arg *rs_ptr,u8 *buf);
|
||||
int extract_resetarg(struct MapReset_Arg *rs_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_restdataarg(struct MapRD_Arg *rsd_ptr,u8 *buf);
|
||||
int extract_restdataarg(struct MapRD_Arg *rsd_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_restdatares(struct MapRD_Res *rsd_ptr,u8 *buf);
|
||||
int extract_restdatares(struct MapRD_Res *rsd_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_sndroutinfogprsarg(struct MapSRIFG_Arg *sfg_ptr,u8 *buf);
|
||||
int extract_sndroutinfogprsarg(struct MapSRIFG_Arg *sfg_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_sndroutinfogprsres(struct MapSRIFG_Res *sfg_ptr,u8 *buf);
|
||||
int extract_sndroutinfogprsres(struct MapSRIFG_Res *sfg_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_failreportarg(struct MapFR_Arg *fr_ptr,u8 *buf);
|
||||
int extract_failreportarg(struct MapFR_Arg *fr_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_failreportres(struct MapFR_Res *fr_ptr,u8 *buf);
|
||||
int extract_failreportres(struct MapFR_Res *fr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_notemspregprsarg(struct MapNMPFG_Arg *npg_ptr,u8 *buf);
|
||||
int extract_notemspregprsarg(struct MapNMPFG_Arg *npg_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_notemspregprsres(struct MapNMPFG_Res *npg_ptr,u8 *buf);
|
||||
int extract_notemspregprsres(struct MapNMPFG_Res *npg_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* define in map_code_om.c */
|
||||
int assign_acttrcmodearg(struct MapATM_Arg *atm_ptr,u8 *buf);
|
||||
int extract_acttrcmodearg(struct MapATM_Arg *atm_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_acttrcmoderes(struct MapATM_Res *atm_ptr,u8 *buf);
|
||||
int extract_acttrcmoderes(struct MapATM_Res *atm_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_deacttrcmodearg(struct MapDTM_Arg *dtm_ptr,u8 *buf);
|
||||
int extract_deacttrcmodearg(struct MapDTM_Arg *dtm_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_deacttrcmoderes(struct MapDTM_Res *dtm_ptr,u8 *buf);
|
||||
int extract_deacttrcmoderes(struct MapDTM_Res *dtm_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_sndimsiarg(struct MapSIMSI_Arg *sim_ptr,u8 *buf);
|
||||
int extract_sndimsiarg(struct MapSIMSI_Arg *sim_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_sndimsires(struct MapSIMSI_Res *sim_ptr,u8 *buf);
|
||||
int extract_sndimsires(struct MapSIMSI_Res *sim_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* define in map_code_ch.c */
|
||||
int assign_sndroutinfoarg(struct MapSRI_Arg *sri_ptr,u8 *buf,u8 ver);
|
||||
int assign_sndroutinfores(struct MapSRI_Res *sri_ptr,u8 *buf,u8 version);
|
||||
int extract_sndroutinfoarg(struct MapSRI_Arg *sri_ptr,u32 buf_len,u8 *buf,u8 ver);
|
||||
int extract_sndroutinfores(struct MapSRI_Res *sri_ptr,u32 buf_len,u8 *buf,u8 version);
|
||||
|
||||
int assign_provroamnumarg(struct MapPRN_Arg *prn_ptr, u8 *buf);
|
||||
int assign_provroamnumres(struct MapPRN_Res *prn_ptr, u8 *buf);
|
||||
int extract_provroamnumarg(struct MapPRN_Arg *prn_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_provroamnumres(struct MapPRN_Res *prn_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_rescallhandarg(struct MapRCH_Arg *rch_ptr,u8 *buf);
|
||||
int extract_rescallhandarg(struct MapRCH_Arg *rch_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_rescallhandres(struct MapRCH_Res *rch_ptr,u8 *buf);
|
||||
int extract_rescallhandres(struct MapRCH_Res *rch_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_prvsiwfsnumarg(struct MapPSN_Arg *psn_ptr,u8 *buf);
|
||||
int extract_prvsiwfsnumarg(struct MapPSN_Arg *psn_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_prvsiwfsnumres(struct MapPSN_Res *psn_ptr,u8 *buf);
|
||||
int extract_prvsiwfsnumres(struct MapPSN_Res *psn_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_siwfssigmodarg(struct MapSSM_Arg *ssm_ptr,u8 *buf);
|
||||
int extract_siwfssigmodarg(struct MapSSM_Arg *ssm_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_siwfssigmodres(struct MapSSM_Res *ssm_ptr,u8 *buf);
|
||||
int extract_siwfssigmodres(struct MapSSM_Res *ssm_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_setrepstatearg(struct MapSRS_Arg *srs_ptr,u8 *buf);
|
||||
int extract_setrepstatearg(struct MapSRS_Arg *srs_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_setrepstateres(struct MapSRS_Res *srs_ptr,u8 *buf);
|
||||
int extract_setrepstateres(struct MapSRS_Res *srs_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_statreparg(struct MapSR_Arg *sr_ptr,u8 *buf);
|
||||
int extract_statreparg(struct MapSR_Arg *sr_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_statrepres(struct MapSR_Res *sr_ptr,u8 *buf);
|
||||
int extract_statrepres(struct MapSR_Res *sr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_rmtuserfreearg(struct MapRUF_Arg *ruf_ptr,u8 *buf);
|
||||
int extract_rmtuserfreearg(struct MapRUF_Arg *ruf_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_rmtuserfreeres(struct MapRUF_Res *ruf_ptr,u8 *buf);
|
||||
int extract_rmtuserfreeres(struct MapRUF_Res *ruf_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_istalertarg(struct MapISTAlert_Arg *ista_ptr, u8 *buf);
|
||||
int extract_istalertarg(struct MapISTAlert_Arg *ista_ptr, u32 buf_len, u8 *buf);
|
||||
int assign_istalertres(struct MapISTAlert_Res *ista_ptr, u8 *buf);
|
||||
int extract_istalertres(struct MapISTAlert_Res *ista_ptr, u32 buf_len, u8 *buf);
|
||||
|
||||
int assign_istcmdarg(struct MapISTCmd_Arg *istc_ptr, u8 *buf);
|
||||
int extract_istcmdarg(struct MapISTCmd_Arg *istc_ptr, u32 buf_len, u8 *buf);
|
||||
//int assign_istcmdres(struct MapISTCmd_Res *istc_ptr,u8 *buf);
|
||||
//int extract_istcmdres(struct MapISTCmd_Res *istc_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* define in map_code_ss.c */
|
||||
int assign_regssarg(struct MapRSS_Arg *rss_ptr, u8 *buf);
|
||||
int extract_regssarg(struct MapRSS_Arg *rss_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_regssres(struct MapRSS_Res *rss_ptr, u8 *buf);
|
||||
int extract_regssres(struct MapRSS_Res *rss_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_erassarg(struct MapESS_Arg *ess_ptr, u8 *buf);
|
||||
int extract_erassarg(struct MapESS_Arg *ess_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_erassres(struct MapESS_Res *essr_ptr, u8 *buf);
|
||||
int extract_erassres(struct MapESS_Res *essr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_actssarg(struct MapASS_Arg *ass_ptr, u8 *buf);
|
||||
int extract_actssarg(struct MapASS_Arg *ass_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_actssres(struct MapASS_Res *assr_ptr, u8 *buf);
|
||||
int extract_actssres(struct MapASS_Res *assr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_deactssarg(struct MapDASS_Arg *dss_ptr, u8 *buf);
|
||||
int extract_deactssarg(struct MapDASS_Arg *dss_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_deactssres(struct MapDASS_Res *dssr_ptr, u8 *buf);
|
||||
int extract_deactssres(struct MapDASS_Res *dssr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_intrssarg(struct MapINTSS_Arg *intrss_ptr, u8 *buf);
|
||||
int extract_intrssarg(struct MapINTSS_Arg *intr_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_intrssres(struct MapINTSS_Res *intrss_ptr, u8 *buf);
|
||||
int extract_intrssres(struct MapINTSS_Res *intrss_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_prcunssreqarg(struct MapPUSSR_Arg *psr_ptr,u8 *buf);
|
||||
int extract_prcunssreqarg(struct MapPUSSR_Arg *psr_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_prcunssreqres(struct MapPUSSR_Res *psr_ptr,u8 *buf);
|
||||
int extract_prcunssreqres(struct MapPUSSR_Res *psr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_unssreqarg(struct MapUSSR_Arg *usr_ptr,u8 *buf);
|
||||
int extract_unssreqarg(struct MapUSSR_Arg *usr_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_unssreqres(struct MapUSSR_Res *usr_ptr,u8 *buf);
|
||||
int extract_unssreqres(struct MapUSSR_Res *usr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_unssnotarg(struct MapUSSN_Arg *usn_ptr,u8 *buf);
|
||||
int extract_unssnotarg(struct MapUSSN_Arg *usn_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_unssnotres(struct MapUSSN_Res *usn_ptr,u8 *buf);
|
||||
int extract_unssnotres(struct MapUSSN_Res *usn_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_regpswdarg(struct MapRPSS_Arg *rpw_ptr,u8 *buf);
|
||||
int extract_regpswdarg(struct MapRPSS_Arg *rpw_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_regpswdres(struct MapRPSS_Res *rpwr_ptr,u8 *buf);
|
||||
int extract_regpswdres(struct MapRPSS_Res *rpwr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_getpswdarg(struct MapGPSS_Arg *gpw_ptr,u8 *buf);
|
||||
int extract_getpswdarg(struct MapGPSS_Arg *gpw_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_getpswdres(struct MapGPSS_Res *rpwr_ptr,u8 *buf);
|
||||
int extract_getpswdres(struct MapGPSS_Res *rpwr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_ssinvnotarg(struct MapSSIN_Arg *sin_ptr,u8 *buf);
|
||||
int extract_ssinvnotarg(struct MapSSIN_Arg *sin_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_ssinvnotres(struct MapSSIN_Res *sin_ptr,u8 *buf);
|
||||
int extract_ssinvnotres(struct MapSSIN_Res *sin_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_regccentarg(struct MapRCCE_Arg *rce_ptr,u8 *buf);
|
||||
int extract_regccentarg(struct MapRCCE_Arg *rce_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_regccentres(struct MapRCCE_Res *rce_ptr,u8 *buf);
|
||||
int extract_regccentres(struct MapRCCE_Res *rce_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_eraseccentarg(struct MapECCE_Arg *ece_ptr,u8 *buf);
|
||||
int extract_eraseccentarg(struct MapECCE_Arg *ece_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_eraseccentres(struct MapECCE_Res *ece_ptr,u8 *buf);
|
||||
int extract_eraseccentres(struct MapECCE_Res *ece_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* define in map_code_sms.c */
|
||||
int assign_routinfoforsmarg(struct MapRIFSM_Arg *rif_ptr,u8 *buf);
|
||||
int extract_routinfoforsmarg(struct MapRIFSM_Arg *rif_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_routinfoforsmres(struct MapRIFSM_Res *rif_ptr,u8 *buf);
|
||||
int extract_routinfoforsmres();
|
||||
|
||||
int assign_mofwdsmarg(struct MapMOFSM_Arg *ptr,u8 *buf,u8 version);
|
||||
int extract_mofwdsmarg(struct MapMOFSM_Arg *ptr,u32 buf_len,u8 *buf,u8 version);
|
||||
int assign_mofwdsmres(struct MapMOFSM_Res *ptr,u8 *buf,u8 version);
|
||||
int extract_mofwdsmres(struct MapMOFSM_Res *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_mtfwdsmarg(struct MapMTFSM_Arg *ptr,u8 *buf,u8 MAPVer);
|
||||
int extract_mtfwdsmarg(struct MapMTFSM_Arg *ptr,u32 buf_len,u8 *buf,u8 MAPVer);
|
||||
int assign_mtfwdsmres(struct MapMTFSM_Res *ptr,u8 *buf,u8 MAPVer);
|
||||
int extract_mtfwdsmres(struct MapMTFSM_Res *ptr,u32 buf_len,u8 *buf,u8 MAPVer);
|
||||
|
||||
int assign_repsmdelstatarg(struct MapRSMDS_Arg *ptr,u8 *buf);
|
||||
int extract_repsmdelstatarg(struct MapRSMDS_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
int assign_repsmdelstatres(struct MapRSMDS_Res *ptr,u8 *buf);
|
||||
int extract_repsmdelstatres(struct MapRSMDS_Res *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_infsrvcentarg(struct MapISC_Arg *ptr,u8 *buf);
|
||||
int extract_infsrvcentarg(struct MapISC_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_altsrvcentarg(struct MapASC_Arg *ptr,u8 *buf);
|
||||
int extract_altsrvcentarg(struct MapASC_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_rdyforsmarg(struct MapRFSM_Arg *ptr,u8 *buf);
|
||||
int extract_rdyforsmarg(struct MapRFSM_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
int assign_rdyforsmres(struct MapRFSM_Res *ptr,u8 *buf);
|
||||
int extract_rdyforsmres(struct MapRFSM_Res *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* +++++++++++++++++++++++++++++ */
|
||||
/* MAP-H (with AUC) structure */
|
||||
/* +++++++++++++++++++++++++++++ */
|
||||
int assign_securityTriplets_arg(struct MapST_Arg *ptr,u8 *buf, u8 version);
|
||||
int extract_securityTriplets_arg(struct MapST_Arg *ptr,u32 buf_len,u8 *buf, u8 version);
|
||||
int assign_securityTriplets_res();
|
||||
int extract_securityTriplets_res();
|
||||
|
||||
int assign_interrogateSubscriber_arg();
|
||||
int extract_interrogateSubscriber_arg();
|
||||
|
||||
int assign_createSubscriber_arg();
|
||||
int extract_createSubscriber_arg();
|
||||
|
||||
int assign_deleteSubscriber_arg();
|
||||
int extract_deleteSubscriber_arg();
|
||||
|
||||
/* ++++++++++++ */
|
||||
/* Common types */
|
||||
/* ++++++++++++ */
|
||||
int assign_authset(struct AuthSet_struct *auth_ptr,u8 *buf);
|
||||
int extract_authset(struct AuthSet_struct *auth_ptr,u32 buf_len,u8 *buf);
|
||||
//add by gxchen start
|
||||
int assign_triplet(Triplet_st *auth_ptr,u8 *buf);
|
||||
int extract_triplet(Triplet_st *auth_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_quintuplet(Quintuplet_st *auth_ptr,u8 *buf);
|
||||
int extract_quintuplet(Quintuplet_st *auth_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_gsmSecCon(GsmSecCon_st *con_ptr,u8 *buf);
|
||||
int extract_gsmSecCon(GsmSecCon_st *con_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_umtsSecCon(UmtsSecCon_st *con_ptr,u8 *buf);
|
||||
int extract_umtsSecCon(UmtsSecCon_st *con_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_authReSynInfo(AuthReSynInfo_st *resyn_ptr,u8 *buf);
|
||||
int extract_authReSynInfo(AuthReSynInfo_st *resyn_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_sgsnCapability(struct SgsnCap_s *cap_ptr, u8 *buf);
|
||||
int extract_sgsnCapability(struct SgsnCap_s *cap_ptr, u32 buf_len, u8 *buf);
|
||||
//add by gxchen end
|
||||
|
||||
int assign_extsiginfo(struct ExtSigInfo_struct *sig_ptr,u8 *buf);
|
||||
int extract_extsiginfo(struct ExtSigInfo_struct *sig_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_bscode(struct BSCode_struct *bs_ptr,u8 *buf,u8 flag);
|
||||
int extract_bscode(struct BSCode_struct *bs_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_subinfo(struct SubInfo_struct *info_ptr,u8 *buf);
|
||||
int extract_subinfo(struct SubInfo_struct *info_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_ocsi(struct OCsi_struct *ocsi_ptr,u8 *buf);
|
||||
int extract_ocsi(struct OCsi_struct *ocsi_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_tdpcritlist(struct OBCritLst_struct *list_ptr,u8 *buf);
|
||||
int extract_tdpcritlist(struct OBCritLst_struct *list_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_ccbsfeat(struct CcbsFeat_struct *cf_ptr,u8 *buf);
|
||||
int extract_ccbsfeat(struct CcbsFeat_struct *cf_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* is41 */
|
||||
int assign_is41AuthenticationDirective_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationDirective_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int extract_is41AuthenticationDirective_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationDirective_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int assign_is41AuthenticationDirectiveForward_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationFailureReport_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationFailureReport_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationRequest_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationRequest_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationStatusReport_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationStatusReport_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41BaseStationChallenge_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41BaseStationChallenge_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41CountRequest_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41CountRequest_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
|
||||
int extract_is41AuthenticationDirectiveForward_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationFailureReport_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationFailureReport_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationRequest_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationRequest_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationStatusReport_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationStatusReport_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41BaseStationChallenge_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41BaseStationChallenge_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41CountRequest_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41CountRequest_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
|
||||
int assign_Is41SmsDeliveryBackward_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsDeliveryBackward_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsDeliveryForward_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsDeliveryForward_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsDeliveryPointToPoint_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsDeliveryPointToPoint_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsNotification_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsNotification_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsRequest_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsRequest_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
|
||||
int extract_Is41SmsDeliveryBackward_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsDeliveryBackward_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsDeliveryForward_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsDeliveryForward_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsDeliveryPointToPoint_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsDeliveryPointToPoint_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsNotification_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsNotification_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsRequest_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsRequest_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_is41RegistrationNotification_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RegistrationNotification_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RegistrationCancellation_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RegistrationCancellation_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41LocationRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41LocationRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RoutingRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RoutingRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41MSInactive_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41MSInactive_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41FeatureRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41FeatureRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41QualificationDirective_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41QualificationDirective_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41TransferToNumberRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41TransferToNumberRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RedirectionRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RedirectionRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41OriginationRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41OriginationRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41AnalyzedInformation_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41AnalyzedInformation_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41OAnswer_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41ODisconnect_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41ODisconnect_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41TAnswer_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41TDisconnect_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41TDisconnect_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41CallControlDirective_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41CallControlDirective_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41SeizeResource_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41SeizeResource_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41ConnectResource_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41SRFDirective_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41SRFDirective_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41ShortMessageAnalyzed_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41ShortMessageAnalyzed_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
|
||||
int extract_is41RegistrationNotification_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RegistrationNotification_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RegistrationCancellation_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RegistrationCancellation_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41LocationRequest_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41LocationRequest_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RoutingRequest_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RoutingRequest_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41MSInactive_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41MSInactive_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41FeatureRequest_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41FeatureRequest_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41QualificationDirective_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41QualificationDirective_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41TransferToNumberRequest_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41TransferToNumberRequest_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RedirectionRequest_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RedirectionRequest_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41OriginationRequest_arg(struct MapOprSrv_struct *opr_ptr, u32 buf_len, u8 *buf);
|
||||
int extract_is41OriginationRequest_rsp(struct MapOprSrv_struct *opr_ptr, u32 buf_len, u8 *buf);
|
||||
int extract_is41AnalyzedInformation_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AnalyzedInformation_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41OAnswer_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41ODisconnect_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41ODisconnect_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41TAnswer_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41TDisconnect_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41TDisconnect_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41CallControlDirective_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41CallControlDirective_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41SeizeResource_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41SeizeResource_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41ConnectResource_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41SRFDirective_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41SRFDirective_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41ShortMessageAnalyzed_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41ShortMessageAnalyzed_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
|
||||
/***************** LCS **************/
|
||||
int assign_ProvideSubscriberLocation_Res(ProvideSubscriberLocation_Res *ptr,u8 *buf, u8 ver);
|
||||
int assign_RoutingInfoForLCS_Res(RoutingInfoForLCS_Res *ptr,u8 *buf, u8 ver);
|
||||
int extract_ProvideSubscriberLocation_Arg(ProvideSubscriberLocation_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_RoutingInfoForLCS_Arg(RoutingInfoForLCS_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
/***************** LCS **************/
|
||||
|
||||
//show message
|
||||
int debug_show_REGNOT_ARG(struct IS41_REGNOT_ARG *ptr,char *buf);
|
||||
int debug_show_REGNOT_RSP(struct IS41_REGNOT_RSP *ptr,char *buf);
|
||||
int debug_show_LOCREQ_ARG(struct IS41_LOCREQ_ARG *ptr,char *buf);
|
||||
int debug_show_LOCREQ_RSP(struct IS41_LOCREQ_RSP *ptr,char *buf);
|
||||
int debug_show_ROUTREQ_ARG(struct IS41_ROUTREQ_ARG *ptr,char *buf);
|
||||
int debug_show_ROUTREQ_RSP(struct IS41_ROUTREQ_RSP *ptr,char *buf);
|
||||
int debug_show_TRANUMREQ_ARG(struct IS41_TRANUMREQ_ARG *ptr,char *buf);
|
||||
int debug_show_TRANUMREQ_RSP(struct IS41_TRANUMREQ_RSP *ptr,char *buf);
|
||||
int debug_show_SMSREQ_ARG(struct IS41_SMSREQ_ARG *ptr,char *buf);
|
||||
int debug_show_SMSREQ_RSP(struct IS41_SMSREQ_RSP *ptr,char *buf);
|
||||
int debug_show_MSINACT_ARG(struct IS41_MSINACT_ARG *ptr,char *buf);
|
||||
int debug_show_MSINACT_RSP(struct IS41_MSINACT_RSP *ptr,char *buf);
|
||||
int debug_show_FEATREQ_ARG(struct IS41_FEATREQ_ARG *ptr,char *buf);
|
||||
int debug_show_FEATREQ_RSP(struct IS41_FEATREQ_RSP *ptr,char *buf);
|
||||
|
||||
int debug_show_AUTHREQ_ARG(IS41_AUTHREQ_ARG *AUTHREQ,char *charOpr);
|
||||
int debug_show_authreq_rsp(IS41_AUTHREQ_RSP *authreq,char *charOpr);
|
||||
int debug_show_ASREPORT_ARG(IS41_ASREPORT_ARG *ASREPORT,char *charOpr);
|
||||
int debug_show_asreport_rsp(IS41_ASREPORT_RSP *asreport,char *charOpr);
|
||||
int debug_show_BSCHALL_ARG(IS41_BSCHALL_ARG *BSCHALL,char *charOpr);
|
||||
int debug_show_bschall_rsp(IS41_BSCHALL_RSP *bschall,char *charOpr);
|
||||
int debug_show_AFREPORT_ARG(IS41_AFREPORT_ARG *AFREPORT,char *charOpr);
|
||||
int debug_show_afreport_rsp(IS41_AFREPORT_RSP *afreport,char *charOpr);
|
||||
int auc_debug_show_COUNTREQ_ARG(IS41_COUNTREQ_ARG *COUNTREQ,char *charOpr);
|
||||
int auc_debug_show_countreq_rsp(IS41_COUNTREQ_RSP *countreq,char *charOpr);
|
||||
int auc_debug_show_AUTHDIR_ARG(IS41_AUTHDIR_ARG *AUTHDIR,char *charOpr);
|
||||
int auc_debug_show_authdir_rsp(IS41_AUTHDIR_RSP *authdir,char *charOpr);
|
||||
#endif
|
||||
1353
plat/xapp/src/mapp/map_const.h
Normal file
1353
plat/xapp/src/mapp/map_const.h
Normal file
File diff suppressed because it is too large
Load Diff
104
plat/xapp/src/mapp/map_dlgpdu.h
Normal file
104
plat/xapp/src/mapp/map_dlgpdu.h
Normal file
@@ -0,0 +1,104 @@
|
||||
/* MAP dialogue PDU head file */
|
||||
/* written by Liu zhiguo 2002-01-14 */
|
||||
/* Version 1.0 (according GSM 09.02 17.4) */
|
||||
/* ------------------------------------- */
|
||||
#ifndef _MAP_DLGPDU
|
||||
#define _MAP_DLGPDU
|
||||
|
||||
#define MAPDLG_OPEN 0x00
|
||||
#define MAPDLG_ACCEPT 0x01
|
||||
#define MAPDLG_CLOSE 0x02
|
||||
#define MAPDLG_REFUSE 0x03
|
||||
#define MAPDLG_UABORT 0x04 // user abort
|
||||
#define MAPDLG_PABORT 0x05 // provider abort
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP-Openinfo */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
typedef struct MapDlgOpen_struct
|
||||
{
|
||||
u8 param_flag;
|
||||
u8 peer_ref[ISDN_LEN+1]; // peer reference
|
||||
u8 local_ref[ISDN_LEN+1]; // local reference
|
||||
} MapDlgOpen_struct;
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP-Refuseinfo */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
typedef enum MapDlgReason_enum
|
||||
{
|
||||
noReasonGiven = 0,
|
||||
invalidDstRef = 1, // invalid destination reference
|
||||
invalidOrgRef = 2 // invalid original reference
|
||||
} MapDlgReason_enum;
|
||||
|
||||
typedef struct MapDlgRefuse_struct
|
||||
{
|
||||
u8 param_flag;
|
||||
enum MapDlgReason_enum reason;
|
||||
} MapDlgRefuse_struct;
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP-UserAbortinfo */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
typedef enum MapDlgRUReason_enum // resource unavailable reason
|
||||
{
|
||||
shortTRLimit = 0, // short term resource limitation
|
||||
longTRLimit = 1 // long term resource limitation
|
||||
} MapDlgRUReason_enum;
|
||||
|
||||
typedef enum MapDlgPCReason_enum // procedure cancellation reason
|
||||
{
|
||||
handoverCancel = 0, // hand over cancellation
|
||||
radioChanRelease = 1, // radio channel release
|
||||
netPathRelease = 2, // network path release
|
||||
callRelease = 3, // call release
|
||||
assProFailure = 4, // associated procedure failure
|
||||
randomDialRelease = 5, // random dialogue release
|
||||
remOperFailure = 6 // remote operation failure
|
||||
} MapDlgPCReason_enum;
|
||||
|
||||
typedef struct MapDlgUAbort_struct
|
||||
{
|
||||
u8 choice_flag; // user abort choice
|
||||
union
|
||||
{
|
||||
enum MapDlgRUReason_enum resunavi; // resource unavailable, choice_flag = 2
|
||||
enum MapDlgPCReason_enum appproccancel; // application procedure cancellation, choice_flag = 3
|
||||
} choice;
|
||||
} MapDlgUAbort_struct;
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP-UserAbortinfo */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
typedef enum MapDlgPAbortReason_enum
|
||||
{
|
||||
abnormaldial = 0, // abnormal dialogue
|
||||
invalidPDU = 1
|
||||
} MapDlgPAbortReason_enum;
|
||||
|
||||
typedef struct MapDlgPAbort_struct // MAP provider abort info
|
||||
{
|
||||
u8 param_flag;
|
||||
enum MapDlgPAbortReason_enum reason;
|
||||
} MapDlgPAbort_struct;
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP-DialoguePDU */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
typedef struct MapDlg_struct
|
||||
{
|
||||
u8 dlg_type;
|
||||
union
|
||||
{
|
||||
struct MapDlgOpen_struct map_open;
|
||||
struct MapDlgRefuse_struct map_refuse;
|
||||
struct MapDlgUAbort_struct map_uabort;
|
||||
struct MapDlgPAbort_struct map_pabort;
|
||||
} map_dlg;
|
||||
} MapDlg_struct;
|
||||
|
||||
u8 build_mapdlg(struct MapDlg_struct *dlg_ptr,u8 *data_buf);
|
||||
u8 extract_mapdlg(struct MapDlg_struct *dlg_ptr,struct dlgport_struct *port_ptr);
|
||||
|
||||
#endif
|
||||
24
plat/xapp/src/mapp/map_includes.h
Normal file
24
plat/xapp/src/mapp/map_includes.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//////////////////////////////////////////////////
|
||||
//Title : map_includes.c
|
||||
//Auhtor : Liu Wei
|
||||
//Desc : map include headers
|
||||
//Created : 2007-05-18
|
||||
//Revision :
|
||||
//
|
||||
//Revision :
|
||||
//
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _MAP_INCLUDES_H_
|
||||
#define _MAP_INCLUDES_H_
|
||||
|
||||
|
||||
#include "../../../public/src/include/pub_include.h"
|
||||
#include "../../../sccp/src/include/sccp.h"
|
||||
#include "map_const.h"
|
||||
#include "map_struct.h"
|
||||
#include "map_coding.h"
|
||||
#include "map_public.h"
|
||||
|
||||
#endif
|
||||
34
plat/xapp/src/mapp/map_opr_func.h
Normal file
34
plat/xapp/src/mapp/map_opr_func.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/* MAP extension operation */
|
||||
/* ------------------------------------- */
|
||||
#ifndef _MAP_OPR_FUNC
|
||||
#define _MAP_OPR_FUNC
|
||||
|
||||
#include "map_includes.h"
|
||||
#include "../xap_interfunc.h"
|
||||
#include "map_code.h"
|
||||
|
||||
extern int assign_MapDetermineOprUserArg(struct MapDetermineOprUser_Arg *dou_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapDetermineOprUserArg(struct MapDetermineOprUser_Arg *dou_ptr,u32 buf_len,u8 *buf);
|
||||
extern int assign_MapDetermineOprUserRes(struct MapDetermineOprUser_Res *dou_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapDetermineOprUserRes(struct MapDetermineOprUser_Res *dou_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
extern int assign_MapVlrUpdateLocationArg(struct MapVlrUpdateLocation_Arg *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapVlrUpdateLocationArg(struct MapVlrUpdateLocation_Arg *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
extern int assign_MapVlrUpdateLocationRes(struct MapVlrUpdateLocation_Res *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapVlrUpdateLocationRes(struct MapVlrUpdateLocation_Res *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
extern int assign_MapCreateUserWithMsisdnImsiArg(struct MapCreateUserWithMsisdnImsi_Arg *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapCreateUserWithMsisdnImsiArg(struct MapCreateUserWithMsisdnImsi_Arg *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
extern int assign_MapCreateUserWithMsisdnImsiRes(struct MapCreateUserWithMsisdnImsi_Res *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapCreateUserWithMsisdnImsiRes(struct MapCreateUserWithMsisdnImsi_Res *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
extern int assign_MapDeleteOprUserArg(struct MapDeleteOprUser_Arg *dou_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapDeleteOprUserArg(struct MapDeleteOprUser_Arg *dou_ptr,u32 buf_len,u8 *buf);
|
||||
extern int assign_MapDeleteOprUserRes(struct MapDeleteOprUser_Res *dou_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapDeleteOprUserRes(struct MapDeleteOprUser_Res *dou_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
extern int assign_MapVlrEnquiryIMDM_Arg(struct MapVlrEnquiryIMDM_Arg *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapVlrEnquiryIMDM_Arg(struct MapVlrEnquiryIMDM_Arg *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
extern int assign_MapVlrEnquiryIMDM_Res(struct MapVlrEnquiryIMDM_Res *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapVlrEnquiryIMDM_Res(struct MapVlrEnquiryIMDM_Res *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
#endif
|
||||
1112
plat/xapp/src/mapp/map_public.c
Normal file
1112
plat/xapp/src/mapp/map_public.c
Normal file
File diff suppressed because it is too large
Load Diff
26
plat/xapp/src/mapp/map_public.h
Normal file
26
plat/xapp/src/mapp/map_public.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/* MAP public head file */
|
||||
/* written by Liu Zhiguo 2002-03-27 */
|
||||
/* version 1.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#ifndef _MAP_PUBLIC
|
||||
#define _MAP_PUBLIC
|
||||
|
||||
void mapp_log_debug(const char *fmt, ...);
|
||||
|
||||
u8 bytestrtobitstr(u8 *bit_str,u8 *byte_str,u8 bit_len);
|
||||
u8 bitstrtobytestr(u8 *byte_str,u8 *bit_str,u8 bit_len);
|
||||
u8 tele_bittostr(u16 tele_data,u8 *tele_str,u8 ss_flag);
|
||||
u16 tele_strtobit(u8 *tele_str,u8 tele_len);
|
||||
u8 bearer_bittostr(u32 bearer_data, u8 *bearer_str,u8 ss_flag);
|
||||
u32 bearer_strtobit(u8 *bearer_str,u8 bearer_len);
|
||||
void get_sccpadd(struct SCCP_ADDRESS *add_ptr,u8 *data);
|
||||
void set_sccpadd(struct SCCP_ADDRESS *add_ptr,u8 *data);
|
||||
u8 map_com_ftos(struct MapComSrv_struct *map_com,u8 *data_flow);
|
||||
void map_com_stof(struct MapComSrv_struct *com_ptr,u8 *data_flow,u8 delimiter_flag);
|
||||
u8 map_opr_ftos(struct MapOprData_struct *opr_ptr,u8 *data_flow);
|
||||
void map_opr_stof(struct MapOprData_struct *opr_ptr,u8 *data_flow,u8 delimiter_flag);
|
||||
|
||||
char *is41_sequenceTag(char *tag,int sequence);
|
||||
|
||||
#endif
|
||||
4585
plat/xapp/src/mapp/map_struct.h
Normal file
4585
plat/xapp/src/mapp/map_struct.h
Normal file
File diff suppressed because it is too large
Load Diff
477
plat/xapp/src/mapp/win_struct.h
Normal file
477
plat/xapp/src/mapp/win_struct.h
Normal file
@@ -0,0 +1,477 @@
|
||||
/***************************/
|
||||
/****** WIN Parameter ******/
|
||||
/***************************/
|
||||
//N.S0009: 6.5.2.bv
|
||||
typedef struct IS41_PAR_MSID {
|
||||
u8 choice_flag; //0:min; 1:imsi
|
||||
u8 min[MIN_LEN];
|
||||
u8 imsi[IMSI_LEN];
|
||||
} IS41_PAR_MSID;
|
||||
|
||||
//N.S0013: 6.5.2.cl
|
||||
typedef struct IS41_PAR_EXESCR {
|
||||
u8 param_flag;
|
||||
u8 scrnameLen;
|
||||
u8 scrname[32];
|
||||
//optional
|
||||
u8 scrargLen;
|
||||
u8 scrarg[96];
|
||||
} IS41_PAR_EXESCR;
|
||||
|
||||
/***************************/
|
||||
/****** WIN Operation ******/
|
||||
/***************************/
|
||||
//N.S0018: 6.4.2.30 OriginationRequest INVOKE
|
||||
typedef struct IS41_ORREQ_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16
|
||||
u8 digitsLen;
|
||||
u8 digits[32];//Digits (Dialed) M 6.5.2.58
|
||||
u8 esn[4];//ElectronicSerialNumber M 6.5.2.63
|
||||
u8 mscid[3];//MSCID (Originating MSC) M 6.5.2.82
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv k
|
||||
u8 origtrigLen;
|
||||
u8 origtrig[32];//OriginationTriggers M 6.5.2.90
|
||||
u8 transcapLen;
|
||||
u8 transcap[32];//TransactionCapability M 6.5.2.160
|
||||
//optional
|
||||
u8 cpnameLen;
|
||||
u8 cpname[32];//CallingPartyName O 6.5.2.bw g, i
|
||||
u8 cpndgts1Len;
|
||||
u8 cpndgts1[32];//CallingPartyNumberDigits1 O 6.5.2.21 a
|
||||
u8 cpndgts2Len;
|
||||
u8 cpndgts2[32];//CallingPartyNumberDigits2 O 6.5.2.22 a
|
||||
u8 cpsubLen;
|
||||
u8 cpsub[32];//CallingPartySubaddress O 6.5.2.25 a
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 a, l
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 b
|
||||
u8 featindLen;
|
||||
u8 featind[32];//FeatureIndicator O 6.5.2.ej m
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 c
|
||||
u8 otfiLen;
|
||||
u8 otfi[32];//OneTimeFeatureIndicator O 6.5.2.88 d
|
||||
u8 pc_ssn[5];//PC_SSN (Originating MSC) O 6.5.2.93 e
|
||||
u8 plind;//PreferredLanguageIndicator O 6.5.2.96 j
|
||||
u8 senderinLen;
|
||||
u8 senderin[32];//SenderIdentificationNumber O 6.5.2.116 f
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 a, n
|
||||
u8 triggertype;//TriggerType O 6.5.2.dh h
|
||||
IS41_PAR_WIN_CAP wincap;//WINCapability O 6.5.2.di o
|
||||
} IS41_ORREQ_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.30 OriginationRequest RETURN RESULT
|
||||
typedef struct IS41_ORREQ_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 accden;//AccessDeniedReason O 6.5.2.1 a
|
||||
u8 actcodeLen;
|
||||
u8 actcode[32];//ActionCode O 6.5.2.2 b
|
||||
u8 annlistLen;
|
||||
u8 annlist[32];//AnnouncementList O 6.5.2.6 c
|
||||
u8 cpnstrg1Len;
|
||||
u8 cpnstrg1[32];//CallingPartyNumberString1 O 6.5.2.23 d, e
|
||||
u8 cpnstrg2Len;
|
||||
u8 cpnstrg2[32];//CallingPartyNumberString2 O 6.5.2.24 d, e
|
||||
u8 cpsubLen;
|
||||
u8 cpsub[32];//CallingPartySubaddress O 6.5.2.25 d, e, f
|
||||
u8 cardgtsLen;
|
||||
u8 cardgts[32];//CarrierDigits O 6.5.2.28 g
|
||||
u8 digitsLen;
|
||||
u8 digits[32];//Digits (Dialed) O 6.5.2.58 h
|
||||
u8 disptextLen;
|
||||
u8 disptext[32];//DisplayText O 6.5.2.bx d, e, r
|
||||
u8 acdgtsLen;
|
||||
u8 acdgts[32];//DMH_AccountCodeDigits O 6.5.2.59 i
|
||||
u8 abdgtsLen;
|
||||
u8 abdgts[32];//DMH_AlternateBillingDigits O 6.5.2.60 i
|
||||
u8 billdgtsLen;
|
||||
u8 billdgts[32];//DMH_BillingDigits O 6.5.2.61 i
|
||||
u8 redindLen;
|
||||
u8 redind[32];//DMH_RedirectionIndicator O 6.5.2.62 i, j
|
||||
u8 dmh_svcidLen;
|
||||
u8 dmh_svcid[32];//DMH_ServiceID O 6.5.2.ei s
|
||||
u8 grpinfoLen;
|
||||
u8 grpinfo[32];//GroupInformation O 6.5.2.69 k
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 i
|
||||
u8 natimeLen;
|
||||
u8 natime[32];//NoAnswerTime O 6.5.2.87 l
|
||||
u8 otfiLen;
|
||||
u8 otfi[32];//OneTimeFeatureIndicator O 6.5.2.88 m
|
||||
u8 pilotLen;
|
||||
u8 pilot[32];//PilotNumber O 6.5.2.95 k
|
||||
u8 rndgtsLen;
|
||||
u8 rndgts[32];//RedirectingNumberDigits O 6.5.2.107 f
|
||||
u8 rnstringLen;
|
||||
u8 rnstring[32];//RedirectingNumberString O 6.5.2.108 d
|
||||
u8 rsubLen;
|
||||
u8 rsub[32];//RedirectingSubaddress O 6.5.2.109 d, e
|
||||
u8 resumepic;//ResumePIC O 6.5.2.cu p
|
||||
u8 routdgtsLen;
|
||||
u8 routdgts[32];//RoutingDigits O 6.5.2.114 g
|
||||
IS41_PAR_TERMLIST termlist;//TerminationList O 6.5.2.156 n
|
||||
u8 termtrigLen;
|
||||
u8 termtrig[32];//TerminationTriggers O 6.5.2.57 o //should be 6.5.2.159
|
||||
u8 triggerlistnum;
|
||||
IS41_PAR_TRIGGER_LIST triggerlist[MAX_IS41_TRIG_LIST_NUM];//TriggerAddressList O 6.5.2.de q
|
||||
} IS41_ORREQ_RSP;
|
||||
|
||||
//N.S0018: 6.4.2.i AnalyzedInformation INVOKE
|
||||
typedef struct IS41_ANLYZD_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16 a
|
||||
u8 digitsLen;
|
||||
u8 digits[32];//Digits (Dialed) M 6.5.2.58
|
||||
u8 mscid[3];//MSCID (Originating) M 6.5.2.82 b
|
||||
u8 transcapLen;
|
||||
u8 transcap[32];//TransactionCapability M 6.5.2.160
|
||||
u8 triggertype;//TriggerType M 6.5.2.dh c
|
||||
IS41_PAR_WIN_CAP wincap;//WINCapability M 6.5.2.di d
|
||||
//optional
|
||||
u8 cpnameLen;
|
||||
u8 cpname[32];//CallingPartyName O 6.5.2.bw e, m
|
||||
u8 cpndgts1Len;
|
||||
u8 cpndgts1[32];//CallingPartyNumberDigits1 O 6.5.2.21 e
|
||||
u8 cpndgts2Len;
|
||||
u8 cpndgts2[32];//CallingPartyNumberDigits2 O 6.5.2.22 e
|
||||
u8 cpsubLen;
|
||||
u8 cpsub[32];//CallingPartySubaddress O 6.5.2.25 e
|
||||
u8 cardgtsLen;
|
||||
u8 cardgts[32];//CarrierDigits O 6.5.2.28 n, o
|
||||
u8 cciLen;
|
||||
u8 cci[32];//ConferenceCallingIndicator O 6.5.2.49 f
|
||||
u8 destdgtsLen;
|
||||
u8 destdgts[32];//DestinationDigits O 6.5.2.56 n, p
|
||||
u8 redindLen;
|
||||
u8 redind[32];//DMH_RedirectionIndicator O 6.5.2.62 q
|
||||
u8 esn[4];//ElectronicSerialNumber O 6.5.2.63 g, r
|
||||
u8 featindLen;
|
||||
u8 featind[32];//FeatureIndicator O 6.5.2.ej s
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 h, t
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 i
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 j
|
||||
IS41_PAR_MSID msid;//MSID O 6.5.2.bv g, r
|
||||
u8 otfiLen;
|
||||
u8 otfi[32];//OneTimeFeatureIndicator O 6.5.2.88 k
|
||||
u8 plind;//PreferredLanguageIndicator O 6.5.2.96
|
||||
u8 rndgtsLen;
|
||||
u8 rndgts[32];//RedirectingNumberDigits O 6.5.2.107 e
|
||||
u8 rdnameLen;
|
||||
u8 rdname[32];//RedirectingPartyName O 6.5.2.by b, m
|
||||
u8 rsubLen;
|
||||
u8 rsub[32];//RedirectingSubaddress O 6.5.2.109 e
|
||||
u8 routdgtsLen;
|
||||
u8 routdgts[32];//RoutingDigits O 6.5.2.114 n, u
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 h, v
|
||||
u8 mytyp;//SystemMyTypeCode O 6.5.2.147
|
||||
u8 tat;//TerminationAccessType O 6.5.2.155 l
|
||||
u8 tdo[2];//TimeDateOffset O 6.5.2.dd w
|
||||
u8 tod[3];//TimeOfDay O 6.5.2.em x
|
||||
} IS41_ANLYZD_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.i AnalyzedInformation RETURN RESULT
|
||||
typedef struct IS41_ANLYZD_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 accden;//AccessDeniedReason O 6.5.2.1 a
|
||||
u8 actcodeLen;
|
||||
u8 actcode[32];//ActionCode O 6.5.2.2 b
|
||||
u8 annlistLen;
|
||||
u8 annlist[32];//AnnouncementList O 6.5.2.6 c
|
||||
u8 cardgtsLen;
|
||||
u8 cardgts[32];//CarrierDigits O 6.5.2.28 d
|
||||
u8 cciLen;
|
||||
u8 cci[32];//ConferenceCallingIndicator O 6.5.2.49 e
|
||||
u8 digitsLen;
|
||||
u8 digits[32];//Digits (Dialed) O 6.5.2.58 f
|
||||
u8 disptextLen;
|
||||
u8 disptext[32];//DisplayText O 6.5.2.bx d, m
|
||||
u8 acdgtsLen;
|
||||
u8 acdgts[32];//DMH_AccountCodeDigits O 6.5.2.59 g
|
||||
u8 abdgtsLen;
|
||||
u8 abdgts[32];//DMH_AlternateBillingDigits O 6.5.2.60 g
|
||||
u8 billdgtsLen;
|
||||
u8 billdgts[32];//DMH_BillingDigits O 6.5.2.61 g
|
||||
u8 redindLen;
|
||||
u8 redind[32];//DMH_RedirectionIndicator O 6.5.2.62 g, h
|
||||
u8 dmh_svcidLen;
|
||||
u8 dmh_svcid[32];//DMH_ServiceID O 6.5.2.ei n
|
||||
u8 natimeLen;
|
||||
u8 natime[32];//NoAnswerTime O 6.5.2.87 i
|
||||
u8 otfiLen;
|
||||
u8 otfi[32];//OneTimeFeatureIndicator O 6.5.2.88 j
|
||||
u8 rndgtsLen;
|
||||
u8 rndgts[32];//RedirectingNumberDigits O 6.5.2.107 d
|
||||
u8 resumepic;//ResumePIC O 6.5.2.cu k
|
||||
u8 routdgtsLen;
|
||||
u8 routdgts[32];//RoutingDigits O 6.5.2.114 d
|
||||
IS41_PAR_TERMLIST termlist;//TerminationList O 6.5.2.156 l
|
||||
u8 termtrigLen;
|
||||
u8 termtrig[32];//TerminationTriggers O 6.5.2.159 d
|
||||
u8 triggerlistnum;
|
||||
IS41_PAR_TRIGGER_LIST triggerlist[MAX_IS41_TRIG_LIST_NUM];//TriggerAddressList O 6.5.2.de d, o
|
||||
} IS41_ANLYZD_RSP;
|
||||
|
||||
//N.S0018: 6.4.2.aa OAnswer INVOKE
|
||||
typedef struct IS41_OANSWER_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16 a
|
||||
u8 esn[4];//ElectronicSerialNumber M 6.5.2.63 b
|
||||
u8 mscid[3];//MSCID (Originating) M 6.5.2.82 c
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv d
|
||||
u8 tdo[2];//TimeDateOffset M 6.5.2.dd e
|
||||
u8 tod[3];//TimeOfDay M 6.5.2.em f
|
||||
u8 triggertype;//TriggerType M 6.5.2.dh g
|
||||
//optional
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 h, i
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 j
|
||||
u8 featindLen;
|
||||
u8 featind[32];//FeatureIndicator O 6.5.2.ej k
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 l
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 h, m
|
||||
u8 mytyp;//SystemMyTypeCode O 6.5.2.147
|
||||
} IS41_OANSWER_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.ab ODisconnect INVOKE
|
||||
typedef struct IS41_ODISCONNECT_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16 a
|
||||
u8 esn[4];//ElectronicSerialNumber M 6.5.2.63 b
|
||||
u8 mscid[3];//MSCID (Originating) M 6.5.2.82 c
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv d
|
||||
u8 relcause;//ReleaseCause M 6.5.2.el e
|
||||
u8 tdo[2];//TimeDateOffset M 6.5.2.dd f
|
||||
u8 tod[3];//TimeOfDay M 6.5.2.em g
|
||||
u8 transcapLen;
|
||||
u8 transcap[32];//TransactionCapability M 6.5.2.160
|
||||
IS41_PAR_WIN_CAP wincap;//WINCapability M 6.5.2.di
|
||||
u8 triggertype;//TriggerType M 6.5.2.dh h
|
||||
//optional
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 i, j
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 k
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 l
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 i, m
|
||||
u8 mytyp;//SystemMyTypeCode O 6.5.2.147
|
||||
} IS41_ODISCONNECT_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.ab ODisconnect RETURN RESULT
|
||||
typedef struct IS41_ODISCONNECT_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 annlistLen;
|
||||
u8 annlist[32];//AnnouncementList O 6.5.2.6 a
|
||||
u8 dmh_svcidLen;
|
||||
u8 dmh_svcid[32];//DMH_ServiceID O 6.5.2.ei b
|
||||
} IS41_ODISCONNECT_RSP;
|
||||
|
||||
//N.S0018: 6.4.2.ad TAnswer INVOKE
|
||||
typedef struct IS41_TANSWER_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16 a
|
||||
u8 esn[4];//ElectronicSerialNumber M 6.5.2.63 b
|
||||
u8 mscid[3];//MSCID M 6.5.2.82 c
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv b
|
||||
u8 tdo[2];//TimeDateOffset M 6.5.2.dd d
|
||||
u8 tod[3];//TimeOfDay M 6.5.2.em e
|
||||
u8 transcapLen;
|
||||
u8 transcap[32];//TransactionCapability M 6.5.2.160
|
||||
u8 triggertype;//TriggerType M 6.5.2.dh f
|
||||
IS41_PAR_WIN_CAP wincap;//WINCapability M 6.5.2.di
|
||||
//optional
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 g, h
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 i
|
||||
u8 featindLen;
|
||||
u8 featind[32];//FeatureIndicator O 6.5.2.ej j
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 k
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 g, l
|
||||
u8 mytyp;//SystemMyTypeCode O 6.5.2.147
|
||||
u8 tat;//TerminationAccessType O 6.5.2.155 m
|
||||
} IS41_TANSWER_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.ae TDisconnect INVOKE
|
||||
typedef struct IS41_TDISCONNECT_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16 a
|
||||
u8 esn[4];//ElectronicSerialNumber M 6.5.2.63 b
|
||||
u8 mscid[3];//MSCID M 6.5.2.82 c
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv d
|
||||
u8 tdo[2];//TimeDateOffset M 6.5.2.dd e
|
||||
u8 tod[3];//TimeOfDay M 6.5.2.em f
|
||||
u8 triggertype;//TriggerType M 6.5.2.dh g
|
||||
//optional
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 h, i
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 j
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 k
|
||||
u8 relcause;//ReleaseCause O 6.5.2.el l
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 h, m
|
||||
u8 mytyp;//SystemMyTypeCode O 6.5.2.147
|
||||
} IS41_TDISCONNECT_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.ae TDisconnect RETURN RESULT
|
||||
typedef struct IS41_TDISCONNECT_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 dmh_svcidLen;
|
||||
u8 dmh_svcid[32];//DMH_ServiceID O 6.5.2.ei a
|
||||
} IS41_TDISCONNECT_RSP;
|
||||
|
||||
//N.S0018: 6.4.2.z CallControlDirective INVOKE
|
||||
typedef struct IS41_CCDIR_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID M 6.5.2.16 a
|
||||
u8 mscid[3];//MSCID M 6.5.2.82 b
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv c
|
||||
//optional
|
||||
u8 actcodeLen;
|
||||
u8 actcode[32];//ActionCode O 6.5.2.2 d
|
||||
u8 annlistLen;
|
||||
u8 annlist[32];//AnnouncementList O 6.5.2.6 e
|
||||
u8 disptextLen;
|
||||
u8 disptext[32];//DisplayText O 6.5.2.bx f
|
||||
u8 acdgtsLen;
|
||||
u8 acdgts[32];//DMH_AccountCodeDigits O 6.5.2.59 g
|
||||
u8 abdgtsLen;
|
||||
u8 abdgts[32];//DMH_AlternateBillingDigits O 6.5.2.60 g
|
||||
u8 billdgtsLen;
|
||||
u8 billdgts[32];//DMH_BillingDigits O 6.5.2.61 g
|
||||
u8 redindLen;
|
||||
u8 redind[32];//DMH_RedirectionIndicator O 6.5.2.62 g, h
|
||||
u8 esn[4];//ElectronicSerialNumber O 6.5.2.63 i, j
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 k
|
||||
u8 plind;//PreferredLanguageIndicator O 6.5.2.96 l, m
|
||||
IS41_PAR_TERMLIST termlist;//TerminationList O 6.5.2.156 n
|
||||
u8 triggerlistnum;
|
||||
IS41_PAR_TRIGGER_LIST triggerlist[MAX_IS41_TRIG_LIST_NUM];//TriggerAddressList O 6.5.2.de h
|
||||
} IS41_CCDIR_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.z CallControlDirective RETURN RESULT
|
||||
typedef struct IS41_CCDIR_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 callstatusLen;
|
||||
u8 callstatus[32];//CallStatus O 6.5.2.en a
|
||||
} IS41_CCDIR_RSP;
|
||||
|
||||
//N.S0013: 6.4.2.r SeizeResource INVOKE
|
||||
typedef struct IS41_SEIZERES_ARG {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 plind;//PreferredLanguageIndicator O 6.5.2.96
|
||||
u8 psrLen;
|
||||
u8 psr[32];//PrivateSpecializedResource O 6.5.2.u a //should be 6.5.2.ct
|
||||
u8 srLen;
|
||||
u8 sr[32];//SpecializedResource O 6.5.2.dc a
|
||||
} IS41_SEIZERES_ARG;
|
||||
|
||||
//N.S0013: 6.4.2.r SeizeResource RETURN RESULT
|
||||
typedef struct IS41_SEIZERES_RSP {
|
||||
u32 param_flag;
|
||||
u8 destdgtsLen;
|
||||
u8 destdgts[32];//DestinationDigits M 6.5.2.56 a
|
||||
} IS41_SEIZERES_RSP;
|
||||
|
||||
//N.S0013: 6.4.2.k ConnectResource INVOKE
|
||||
typedef struct IS41_CONNRES_ARG {
|
||||
u32 param_flag;
|
||||
u8 destdgtsLen;
|
||||
u8 destdgts[32];//DestinationDigits M 6.5.2.56
|
||||
//optional
|
||||
u8 cardgtsLen;
|
||||
u8 cardgts[32];//CarrierDigits O 6.5.2.28 a
|
||||
u8 routdgtsLen;
|
||||
u8 routdgts[32];//RoutingDigits O 6.5.2.114 a
|
||||
} IS41_CONNRES_ARG;
|
||||
|
||||
//N.S0013: 6.4.2.n InstructionRequest INVOKE & RETURN RESULT
|
||||
typedef struct IS41_INSTREQ_ARG {
|
||||
u32 param_flag; //no parameter
|
||||
} IS41_INSTREQ_ARG;
|
||||
|
||||
typedef struct IS41_INSTREQ_RSP {
|
||||
u32 param_flag; //no parameter
|
||||
} IS41_INSTREQ_RSP;
|
||||
|
||||
//N.S0018: 6.4.2.s SRFDirective INVOKE
|
||||
typedef struct IS41_SRFDIR_ARG {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 annlistLen;
|
||||
u8 annlist[32];//AnnouncementList O 6.5.2.6 a, d
|
||||
u8 dgtccLen;
|
||||
u8 dgtcc[32];//DigitCollectionControl O 6.5.2.57 b
|
||||
IS41_PAR_EXESCR exescr;//ExecuteScript O 6.5.2.cl c, d
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 e
|
||||
} IS41_SRFDIR_ARG;
|
||||
|
||||
//N.S0013: 6.4.2.s SRFDirective RETURN RESULT
|
||||
typedef struct IS41_SRFDIR_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 digitsLen;
|
||||
u8 digits[32];//Digits (Dialed) O 6.5.2.58 a, b
|
||||
u8 scrresultLen;
|
||||
u8 scrresult[96];//ScriptResult O 6.5.2.cx c
|
||||
} IS41_SRFDIR_RSP;
|
||||
|
||||
//X.S0010: 6.4.2.ax ShortMessageAnalyzed INVOKE
|
||||
typedef struct IS41_SM_ANLYZD_ARG {
|
||||
u32 param_flag;
|
||||
u8 sms_brlen[2];//SMS_BearerLength M 6.5.2.hn a
|
||||
u8 sms_billidLen;
|
||||
u8 sms_billid[32];//SMS_BillingID M 6.5.2.ho b
|
||||
u8 sms_event;//SMS_Event M 6.5.2.hp c
|
||||
u8 smstidLen;
|
||||
u8 smstid[MAX_IS41_VARPAR_LEN];//SMS_TeleserviceIdentifier M 6.5.2.137 d
|
||||
//optional
|
||||
u8 esn[4];//ElectronicSerialNumber O 6.5.2.63 e, f
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 e, f, g
|
||||
IS41_PAR_MSID msid;//MSID O 6.5.2.bv e, f, g
|
||||
u8 smscidLen;
|
||||
u8 smscid[MAX_IS41_VARPAR_LEN];//SMS_ChargeIndicator O 6.5.2.126 h
|
||||
u8 smsdaLen;
|
||||
u8 smsda[MAX_IS41_VARPAR_LEN];//SMS_DestinationAddress O 6.5.2.127 i
|
||||
u8 sms_pmcnt[4];//SMS_PendingMessageCount O 6.5.2.hr j
|
||||
u8 smsodaLen;
|
||||
u8 smsoda[MAX_IS41_VARPAR_LEN];//SMS_OriginalDestinationAddress O 6.5.2.131 k
|
||||
u8 smsodsLen;
|
||||
u8 smsods[MAX_IS41_VARPAR_LEN];//SMS_OriginalDestinationSubaddress O 6.5.2.132 l
|
||||
u8 smsooaLen;
|
||||
u8 smsooa[MAX_IS41_VARPAR_LEN];//SMS_OriginalOriginatingAddress O 6.5.2.133 m
|
||||
u8 smsoosLen;
|
||||
u8 smsoos[MAX_IS41_VARPAR_LEN];//SMS_OriginalOriginatingSubaddress O 6.5.2.134 l
|
||||
u8 smsoaLen;
|
||||
u8 smsoa[MAX_IS41_VARPAR_LEN];//SMS_OriginatingAddress O 6.5.2.135 n
|
||||
u8 tdo[2];//TimeDateOffset O 6.5.2.dd o
|
||||
u8 tod[3];//TimeOfDay O 6.5.2.em p
|
||||
} IS41_SM_ANLYZD_ARG;
|
||||
|
||||
//X.S0010: 6.4.2.ax ShortMessageAnalyzed RETURN RESULT
|
||||
typedef struct IS41_SM_ANLYZD_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 dmh_svcidLen;
|
||||
u8 dmh_svcid[32];//DMH_ServiceID O 6.5.2.ei a
|
||||
u8 smsbdLen;
|
||||
u8 smsbd[256];//SMS_BearerData O 6.5.2.124 b
|
||||
u8 smscauseLen;
|
||||
u8 smscause[32];//SMS_CauseCode O 6.5.2.125 c
|
||||
u8 sms_eventnotLen;
|
||||
u8 sms_eventnot[32];//SMS_EventNotification O 6.5.2.hq d
|
||||
} IS41_SM_ANLYZD_RSP;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user