/*	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
