51学通信技术论坛

 找回密码
 立即注册
搜索
搜索

tag 标签: 结构

相关日志

分享 RANAP数据结构构参考
热度 2 蓉城喜鹊 2013-3-20 11:28
/* 类型定义 */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long long uint64_t; /* 过程码定义 */ #define MSG_RAB_ASSIGNMENT_REQUEST 0x0000 #define MSG_IU_RELEASE_COMMAND 0x0100 #define MSG_IU_RELEASE_COMPLETE 0x0140 #define MSG_RELOCATION_COMMAND 0x0240 #define MSG_RELOCATION_PREPARTION_FAILURE 0x0280 #define MSG_RELOCATION_REQUEST 0x0300 #define MSG_RELOCATION_CANCEL ACKNOWLEDGE 0x0440 #define MSG_SECURITY_MODE_COMMAND 0x0600 #define MSG_SECURITY_MODE_REJECT 0x0680 #define MSG_DATA_VOLUME_REPORT_REQUEST 0x0700 #define MSG_DATA_VOLUME_REPORT 0x0740 #define MSG_RESET 0x0900 #define MSG_RESET_ACKNOWLEDGEMENT 0x0940 #define MSG_IU_RELEASE_REQUEST 0x0B00 #define MSG_RELOCATION_DETECT 0x0C00 #define MSG_RELOCATION_COMPLETE 0x0D00 #define MSG_PAGING 0x0E00 #define MSG_COMMON_ID 0x0F00 #define MSG_CN_INVOKE_TRACE 0x1000 #define MSG_LOCATION_REPORT_CONTROL 0x1100 #define MSG_LOCATION_REPORT 0x1200 #define MSG_INITIAL_UE_MESSAGE 0x1300 #define MSG_DIRECT_TRANSFER 0x1400 #define MSG_OVERLOAD 0x1500 #define MSG_ERROR_INDICATION 0x1600 #define MSG_FORWARD_SRNS_CONTEXT 0x1800 #define MSG_CN_DEACTIVATE_TRACE 0x1A00 #define MSG_RESET_RESOURCE 0x1B00 #define MSG_RESET_RESOURCE_ACKNOWLEDGEMENT 0x1B40 #define MSG_LOCATION_RELATED_DATA_REQUEST 0x1E00 #define MSG_INFORMATION_TRANSFER_INDICATION 0x1F00 #define MSG_INFORMATION_TRANSFER_COMFIRMATION 0x1F40 #define MSG_UE_SPECIFIC_INFORMATION 0x2000 /* IE-ID 定义 */ #define ID_AREAIDENTITY 0x0000 #define ID_CN_DOMAININDICATOR 0x0300 #define ID_CAUSE 0x0400 #define ID_CHOSENENCRYPTIONALGORITHM 0x0500 #define ID_CHOSENINTEGRITYPROTECTIONALGORITHM 0x0600 #define ID_CRITICALITYDIAGNOSTICS 0x0900 #define ID_ENCRYPTIONINFORMATION 0x0B00 #define ID_INTEGRITYPROTECTIONINFORMATION 0x0C00 #define ID_IUTRANSPORTASSOCIATION 0x0D00 #define ID_L3_INFORMATION 0x0E00 #define ID_LAI 0x0F00 #define ID_NAS_PDU 0x1000 #define ID_NONSEARCHINGINDICATION 0x1100 #define ID_OMC_ID 0x1300 #define ID_PAGINGAREAID 0x1500 #define ID_PAGINGCAUSE 0x1600 #define ID_PERMANENTNAS_UE_ID 0x1700 #define ID_RAB_CONTEXTS_LIST 0x1900 #define ID_RAB_DATAVOLUMEREPORT_ITEM 0x1E00 #define ID_RAB_DATAVOLUMEREPORT_LIST 0X1F00 #define ID_RAB_DATAVOLUMEREPORTREQUEST_ITEM 0X2000 #define ID_RAB_FAILED_ITEM 0x2200 #define ID_RAB_FAILED_LIST 0x2300 #define ID_RAB_ID 0x2400 #define ID_RAB_RELEASEFAILEDLIST 0x2700 #define ID_RAB_RELEASEITEM 0x2800 #define ID_RAB_RELEASELIST 0x2900 #define ID_RAB_RELEASEDITEM 0x2A00 #define ID_RAB_RELEASEDLIST 0x2B00 #define ID_RAB_RELEASEDLIST_IURELCOMP 0x2C00 #define ID_RAB_RELOCATIONRELEASEITEM 0x2D00 #define ID_RAB_RELOCARIONRELEASELIST 0x2E00 #define ID_RAB_SETUPITEM_RELOCREQ 0x2F00 #define ID_RAB_SETUPITEM_RELOCREQACK 0x3000 #define ID_RAB_SETUPLIST_RELOCREQ 0x3100 #define ID_RAB_SETUPLIST_RELOCREQQACK 0x3200 #define ID_RAB_SETUPORMODIFIEDITEM 0x3300 #define ID_RAB_SETUPORMODIFIEDLIST 0x3400 #define ID_RAB_SETUPORMODIFYITEM 0x3500 #define ID_RAB_SETUPORMODIFYLIST 0x3600 #define ID_RAC 0x3700 #define ID_RELOCATIONTYPE 0x3800 #define ID_REQUESTTYPE 0x3900 #define ID_SAI 0x3A00 #define ID_SAPI 0x3B00 #define ID_SOURCEID 0x3C00 #define ID_SOURCERNC_TOTARGETRNC_TRANSPARENTCONTAINER 0x3D00 #define ID_TARGETID 0x3E00 #define ID_TARGETRNC_TOSOURCERNC_TRANSPARENTCONTAINE 0x3F00 #define ID_TEMPORARYUE_ID 0x4000 #define ID_TRACEREFERENCE 0x4100 #define ID_TRACETYPE 0x4200 #define ID_TRANSPORTLAYERADDRESS 0x4300 #define ID_TRIGGERID 0x4400 #define ID_UE_ID 0x4500 #define ID_KEYSTATUS 0x4b00 #define ID_DRX_CYCLELENGTHCOEFFFICIENT 0x4C00 #define ID_IUSIGCONIDLIST 0x4D00 #define ID_IUSIGCONIDITEM 0x4E00 #define ID_IUSIGCONID 0x4F00 #define ID_GLOBALRNC_ID 0x5600 #define ID_RAB_RELEASEDITEM_IURELCOMP 0x5700 #define ID_TYPEOFERROR 0x5D00 #define ID_LOCATIONRELATEDDATAREQUESTTYPE 0x5F00 #define ID_GLOBAL_CN_ID 0x6000 #define ID_SRB_TRCH_MAPPING 0x6200 #define ID_ SOURCE_RNC-PDCP-CONTEXT_INFO 0x6700 #define ID_SNA_ACCESS_INFORMATION 0x6900 #define ID_VERTICALACCURACYCODE 0x6F00 #define ID_RESPONSETIME 0x7000 #define ID_POSITIONINGPRIORITY 0x7100 #define ID_CLIENTTYPE 0x7200 #define ID_UESBI_IU 0x7600 /* 原语类型码定义 */ #define RANAP _SECURITY_MODE_IND 0xD1 #define RANAP _PAGING_IND 0xD2 #define RANAP _IUSETUP_IND 0xD3 #define RANAP _IURELEASE_IND 0xD4 #define RANAP_ NAS-PDU_SEND 0xD5 #define RANAP_ RESET_IND 0xD6 #define RANAP_ RESET_RESOURCE_IND 0xD7 #define RANAP_ RELOCATION_IND 0xD8 #define RANAP_ RELOCATION_FAIL_IND 0xD9 #define RANAP_ PDP_IND 0xDA #define GMM_ NAS-PDU_SEND 0xC1 #define GMM_IURELEASE_REQ 0xC2 #define GMM_RELOCATION_REQ 0xC3 #define GMM_IMSITOFLAG_RESP 0xC4 #define GMM_RELOCATION_CON 0xC5 #define SCCP_RANAP_CONNECT_CONFIRM 0xC6 #define SCCP_RANAP_DISCONNECT_INDICATION 0xC7 #define SCCP_RANAP_DATA_INDICATION 0xC8 #define SCCP_RANAP_UNITDATA_INDICATION 0xC9 #define SCCP_RANAP_CONNECT_INDICATION 0xCA #define RANAP_SCCP_CONNECT_REQUEST 0xDB #define RANAP_SCCP_DATA_REQUEST 0xDC #define RANAP_SCCP_UNITDATA_REQUEST 0xDD #define RANAP_SCCP_DISCONNECT_REQUEST 0xDE #define RANAP_SCCP_CONNECT_RESPONSE 0xDF #define RANAP_GTPU_TEID_INFO 0xF1 #define RANAP_GTPU_UPDATE_TEID_REQ 0xF2 #define RANAP_GTPU_DELETE_TEID_REQ 0xF3 /* 定时器码定义 */ #define Timer_TRafC 0x0000 #define Timer_TRELOCprep 0x0001 #define Timer_TRELOCoverall 0x0002 /* 常量定义 */ #define USER_DATA_LEN 500 /* 发给 SCCP 的消息长度 */ #define MAX_RELOC 10 /* 临时数组长度 */ #define MAX_IE_NUMBER 10 /* 最多可能出现的 IE 数目 */ #define INFO_TRANS_ID_LEN 6 /* 信息传递标识的长度 */ #define PLMN_ID_LEN 3 /* plmn-id 长度 */ #define MAX_NAS_PDU_LEN 500 /* NAS-PDU 的最大长度 */ #define ISCI_LEN 3 /* iu 信令连接指示符长度 */ #define LATITUDE_LEN 3 /* 全球 RNC 标识的长度 */ #define LONGTITUDE_LEN 3 /* 全球 RNC 标识的长度 */ #define IGNORE 0x40 /* 重要性 ignore */ #define REJECT 0x00 /* 重要性 reject */ /* 全局变量 */ uint8_t ie_num_com; /* 非扩展 IE 的个数 */ uint8_t ie_num_ext; /* 扩展 IE 的个数 */ uint8_t *ie_member_com ; /* 存放指向非扩展 IE id 指针的数组 */ uint8_t *ie_member_ext ; /* 存放指向扩展 IE id 指针的数组 */ /* 终端数据结构定义 */ struct ue_struct ue ; /* 为终端状态定义的枚举结构 */ enum ue_status { IU_UNCONNECT, IU_ UNCONNECT_CONNECT_WAIT, IU_CONNECT, IU_CONNECT_RELOCATION_PRE, IU_CONNECT_RELOCATION_IND_WAIT }; /* 为每个终端定义的数据结构 */ struct rnc_structure { uint8_t uesbi-iu ; /* UE Specific Behaviour Information */ uint8_t trace_type; /* 信元长度不确定 */ uint8_t trigger_id; /* 信元长度不确定 */ uint16_t trace_reference; /* 信元长度不确定 */ uint32_t iu_signaling_connection_identifier; /* Iu 信令连接标识符 */ uint8_t rab_id; /* RAB ID */ uint8_t pdp_type; /* PDP 地址类型 */ uint32_t ul_teid; /* 上行数据传输 TEID */ uint32_t dl_teid; /* 下行数据传输 TEID */ uint8_t timer_flag; /* 定时器标识 */ uint8_t timer_state_identifier; /* 定时器状态标识符 */ enum ue_status ue_state_identifier; /* 终端状态标志符 */ }; struct rnc_structure rnc_ue /* RNC 数据结构定义 */ struct globe_rnc_str { uint16_t lac; /* 位置区码 */ uint8_t rac; /* 路由区码 */ uint16_t sac; /* 服务区码 */ uint8_t plmn_id; /* 公众陆地移动通信网标识符 */ uint16_t rnc_id:12; /* RNC ID */ uint16_t cn_id:12; /* CN ID */ uint8_t cn_domain_indicator; /* CN 域标识 */ uint8_t information_transfer_id /*Information Transfer ID */ uint8_t reset_identifier; /* 复位标识位 */ uint8_t timer_flag; /* 定时器标识符 */ uint8_t reset_num; /* 复位次数标识 */ uint8_t timer_state_identifier; /* 定时器状态标志位 */ int fd_sccp_ranap; /* 接收 sccp 原语 socket 描述符 */ int fd_gmm_ranap; /* 接收 GMM 原语 socket 描述符 */ int fd_ranap_gmm; /* 给 GMM 发送原语 socket 描述符 */ int fd_timer_ranap; /* 与定时器端口 socket 描述符 */ int fd_ranap_gtp; /* 给 gtp-u 发送原语 socket 描述符 */ uint8_t *ip_addr_loc; /* 本地 IP 地址 */ uint8_t *ip_addr_rout; /* 远端 IP 地址 */ };
个人分类: RANAP|916 次阅读|1 个评论

站长邮箱|Archiver|51学通信 ( 粤ICP备11025688 )

GMT+8, 2024-11-25 21:50 , Processed in 0.026205 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部