Changed uX, uX_t sX, sX_t to uinX_t
Cleaned some PDCP/driver code types parameters and vars Please see openair2/COMMON/platform_types.h for simple coding rules. please declare prototypes of functions in .h and include .h files in where the function is used and where it is implemented. git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5096 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -70,11 +70,11 @@ public_lteralenb_main(char* g_conf_enb_mihf_id;)
|
||||
* Radio Bearer data
|
||||
*/
|
||||
typedef struct ral_lte_channel {
|
||||
u32 cnx_id;
|
||||
u8 multicast;
|
||||
uint32_t cnx_id;
|
||||
uint8_t multicast;
|
||||
// MIHF parameters ix=0 UPLINK, ix=1 DOWNLINK
|
||||
u16 flowId[2];
|
||||
u16 classId[2];
|
||||
uint16_t flowId[2];
|
||||
uint16_t classId[2];
|
||||
float resBitrate[2];
|
||||
float meanBitrate[2];
|
||||
float bktDepth[2];
|
||||
@@ -83,12 +83,12 @@ typedef struct ral_lte_channel {
|
||||
|
||||
// #if ! defined(ENABLE_USE_MME)
|
||||
//IP driver parameters
|
||||
u16 rbId;
|
||||
u16 RadioQoSclass;
|
||||
u16 dscpUL;
|
||||
u16 dscpDL;
|
||||
u16 nas_state;
|
||||
u16 status;
|
||||
uint16_t rbId;
|
||||
uint16_t RadioQoSclass;
|
||||
uint16_t dscpUL;
|
||||
uint16_t dscpDL;
|
||||
uint16_t nas_state;
|
||||
uint16_t status;
|
||||
// #endif
|
||||
}ral_lte_channel_t;
|
||||
|
||||
@@ -98,9 +98,9 @@ typedef struct ral_lte_channel {
|
||||
typedef struct ral_lte_mt_s {
|
||||
/* The identifier of the link that is associated with a PoA */
|
||||
MIH_C_LINK_TUPLE_ID_T ltid;
|
||||
u8 ipv6_addr[16];
|
||||
u32 ipv6_l2id[2];
|
||||
u32 ue_id;
|
||||
uint8_t ipv6_addr[16];
|
||||
uint32_t ipv6_l2id[2];
|
||||
uint32_t ue_id;
|
||||
struct ral_lte_channel radio_channel[RAL_MAX_RB];
|
||||
int num_rbs;
|
||||
int num_class;
|
||||
@@ -116,7 +116,7 @@ typedef struct ral_lte_mcast_s {
|
||||
/* The identifier of the multicast link that is associated with a PoA */
|
||||
MIH_C_LINK_TUPLE_ID_T ltid;
|
||||
struct ral_lte_channel radio_channel;
|
||||
u8 mc_group_addr[16];
|
||||
uint8_t mc_group_addr[16];
|
||||
}ral_lte_mcast_t;
|
||||
|
||||
/*
|
||||
@@ -144,12 +144,12 @@ typedef struct lte_ral_enb_object {
|
||||
|
||||
int num_connected_mts;
|
||||
|
||||
u8 pending_req_flag;
|
||||
u8 pending_req_mt_ix;
|
||||
u8 pending_req_ch_ix;
|
||||
u8 pending_req_multicast;
|
||||
// u16 pending_req_transaction_id;
|
||||
// u8 pending_req_status;
|
||||
uint8_t pending_req_flag;
|
||||
uint8_t pending_req_mt_ix;
|
||||
uint8_t pending_req_ch_ix;
|
||||
uint8_t pending_req_multicast;
|
||||
// uint16_t pending_req_transaction_id;
|
||||
// uint8_t pending_req_status;
|
||||
MIH_C_FLOW_ID_T pending_req_fid;
|
||||
|
||||
ral_lte_mt_t pending_mt;
|
||||
@@ -164,11 +164,11 @@ typedef struct lte_ral_enb_object {
|
||||
// periodic reports. Valid Range: 0..65535
|
||||
//long measurement_timer_id;
|
||||
|
||||
//u16 num_UEs;
|
||||
//u32 rlcBufferOccupancy[RAL_MAX_MT];
|
||||
//u32 scheduledPRB[RAL_MAX_MT];
|
||||
//u32 totalDataVolume[RAL_MAX_MT];
|
||||
//u32 totalNumPRBs;
|
||||
//uint16_t num_UEs;
|
||||
//uint32_t rlcBufferOccupancy[RAL_MAX_MT];
|
||||
//uint32_t scheduledPRB[RAL_MAX_MT];
|
||||
//uint32_t totalDataVolume[RAL_MAX_MT];
|
||||
//uint32_t totalNumPRBs;
|
||||
|
||||
|
||||
//int congestion_flag;
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
#define __RRC_DTYPES_H__
|
||||
|
||||
# error "Remove inclusion"
|
||||
//typedef unsigned char u8;
|
||||
//typedef unsigned short u16;
|
||||
//typedef unsigned int u32;
|
||||
//typedef unsigned char uint8_t;
|
||||
//typedef unsigned short uint16_t;
|
||||
//typedef unsigned int uint32_t;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -66,7 +66,7 @@ extern int s_mgr; //socket with QoS Mgr
|
||||
extern int init_flag;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
void print_state(u8 state){
|
||||
void print_state(uint8_t state){
|
||||
//---------------------------------------------------------------------------
|
||||
switch(state){
|
||||
case NAS_IDLE:printf("NAS_IDLE\n");return;
|
||||
@@ -86,7 +86,7 @@ void print_state(u8 state){
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
void RAL_NASinitMTlist(u8 *msgrep, int num_mts){
|
||||
void RAL_NASinitMTlist(uint8_t *msgrep, int num_mts){
|
||||
//---------------------------------------------------------------------------
|
||||
int mt_ix, ch_ix;
|
||||
struct nas_msg_cx_list_reply *list;
|
||||
@@ -122,7 +122,7 @@ void RAL_NASinitMTlist(u8 *msgrep, int num_mts){
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
void RAL_NASupdatetMTlist(u8 *msgrep, int num_mts){
|
||||
void RAL_NASupdatetMTlist(uint8_t *msgrep, int num_mts){
|
||||
//---------------------------------------------------------------------------
|
||||
int mt_ix, ch_ix;
|
||||
struct nas_msg_cx_list_reply *list;
|
||||
@@ -322,17 +322,17 @@ int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int mt_ix, int ch_ix){
|
||||
case IO_CMD_LIST:
|
||||
{
|
||||
// printf("Usage: gioctl cx list\n");
|
||||
u8 *msgrep;
|
||||
u8 i;
|
||||
uint8_t *msgrep;
|
||||
uint8_t i;
|
||||
struct nas_msg_cx_list_reply *list;
|
||||
u8 lcr;
|
||||
uint8_t lcr;
|
||||
short int num_mts;
|
||||
|
||||
gifr.type=NAS_MSG_CX_LIST_REQUEST;
|
||||
//gifr.msg=(char *)malloc(NAS_LIST_CX_MAX*sizeof(struct nas_msg_cx_list_reply)+1);
|
||||
memset (g_enb_ral_obj[instanceP].buffer,0,800);
|
||||
gifr.msg= &(g_enb_ral_obj[instanceP].buffer[0]);
|
||||
msgrep=(u8 *)(gifr.msg);
|
||||
msgrep=(uint8_t *)(gifr.msg);
|
||||
//
|
||||
DEBUG("--\n");
|
||||
DEBUG("Connexion list requested\n");
|
||||
@@ -348,7 +348,7 @@ int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int mt_ix, int ch_ix){
|
||||
for(lcr=0; lcr<num_mts; ++lcr){
|
||||
DEBUG("%u\t\t%u\t%u\t", list[lcr].lcr, list[lcr].cellid, list[lcr].iid4);
|
||||
for (i=0;i<8;++i)
|
||||
DEBUG("%02x", *((u8 *)list[lcr].iid6+i));
|
||||
DEBUG("%02x", *((uint8_t *)list[lcr].iid6+i));
|
||||
DEBUG("\t%u\t%u\t", list[lcr].num_rb, list[lcr].nsclassifier);
|
||||
print_state(list[lcr].state);
|
||||
}
|
||||
@@ -505,16 +505,16 @@ int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int mt_ix, int ch_ix){
|
||||
case IO_CMD_LIST:
|
||||
{
|
||||
// printf("Usage: gioctl rb list <lcr>\n");
|
||||
u8 *msgrep;
|
||||
u8 rbi, i;
|
||||
u8 num_rbs;
|
||||
uint8_t *msgrep;
|
||||
uint8_t rbi, i;
|
||||
uint8_t num_rbs;
|
||||
struct nas_msg_rb_list_reply *list;
|
||||
struct nas_msg_rb_list_request *msgreq;
|
||||
gifr.type=NAS_MSG_RB_LIST_REQUEST;
|
||||
memset (g_enb_ral_obj[instanceP].buffer,0,800);
|
||||
gifr.msg= &(g_enb_ral_obj[instanceP].buffer[0]);
|
||||
msgreq=(struct nas_msg_rb_list_request *)(gifr.msg);
|
||||
msgrep=(u8 *)(gifr.msg);
|
||||
msgrep=(uint8_t *)(gifr.msg);
|
||||
if (mt_ix < RAL_MAX_MT){
|
||||
msgreq->lcr = g_enb_ral_obj[instanceP].mt[mt_ix].ue_id;
|
||||
}else{
|
||||
|
||||
@@ -196,7 +196,7 @@ int eRAL_process_cmp_mt_addr(const char* mt_addr, const char* l2id)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if ((u8)l2id[i] != (u8)mt_addr[i+8]) {
|
||||
if ((uint8_t)l2id[i] != (uint8_t)mt_addr[i+8]) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -227,7 +227,7 @@ int eRAL_process_find_mt_by_addr(ral_enb_instance_t instanceP, const char* mt_ad
|
||||
const char* l2id = (const char*)(&g_enb_ral_obj[instanceP].mt[mt_ix].ipv6_l2id[0]);
|
||||
int i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if ((u8)l2id[i] != (u8)mt_addr[i+8]) {
|
||||
if ((uint8_t)l2id[i] != (uint8_t)mt_addr[i+8]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define LTE_RAL_ENB_RRC_MSG_C
|
||||
#include "lteRALenb.h"
|
||||
|
||||
static int ueid2eui48(u8 *euiP, u8* ue_idP)
|
||||
static int ueid2eui48(uint8_t *euiP, uint8_t* ue_idP)
|
||||
{
|
||||
// inspired by linux-source-3.2.0/net/ipv6/addrconf.c
|
||||
memcpy(euiP, ue_idP, 3);
|
||||
|
||||
@@ -99,42 +99,42 @@ typedef struct lte_ral_ue_object_s {
|
||||
|
||||
|
||||
// only to call ralu_verifyPendingConnection
|
||||
u8 pending_req_flag;
|
||||
uint8_t pending_req_flag;
|
||||
|
||||
|
||||
// network parameters
|
||||
u16 cell_id;
|
||||
uint16_t cell_id;
|
||||
plmn_t plmn_id;
|
||||
//u16 nas_state;
|
||||
//uint16_t nas_state;
|
||||
int state;
|
||||
//u32 curr_signal_level;
|
||||
u32 ipv6_l2id[2];
|
||||
//uint32_t curr_signal_level;
|
||||
uint32_t ipv6_l2id[2];
|
||||
//measures
|
||||
u8 req_num_bs;
|
||||
u16 req_cell_id[MAX_NUMBER_BS];
|
||||
u32 req_prov_id[MAX_NUMBER_BS];
|
||||
u16 req_order_index[MAX_NUMBER_BS];
|
||||
uint8_t req_num_bs;
|
||||
uint16_t req_cell_id[MAX_NUMBER_BS];
|
||||
uint32_t req_prov_id[MAX_NUMBER_BS];
|
||||
uint16_t req_order_index[MAX_NUMBER_BS];
|
||||
int num_measures;
|
||||
u16 meas_cell_id[MAX_NUMBER_BS];
|
||||
u32 last_meas_level[MAX_NUMBER_BS];
|
||||
u32 integrated_meas_level[MAX_NUMBER_BS];
|
||||
u32 prev_integrated_meas_level[MAX_NUMBER_BS];
|
||||
u32 provider_id[MAX_NUMBER_BS];
|
||||
uint16_t meas_cell_id[MAX_NUMBER_BS];
|
||||
uint32_t last_meas_level[MAX_NUMBER_BS];
|
||||
uint32_t integrated_meas_level[MAX_NUMBER_BS];
|
||||
uint32_t prev_integrated_meas_level[MAX_NUMBER_BS];
|
||||
uint32_t provider_id[MAX_NUMBER_BS];
|
||||
//Radio Bearers
|
||||
u16 num_rb;
|
||||
uint16_t num_rb;
|
||||
int num_class;
|
||||
u16 rbId[RAL_MAX_RB];
|
||||
u16 QoSclass[RAL_MAX_RB];
|
||||
u16 dscp[RAL_MAX_RB];
|
||||
uint16_t rbId[RAL_MAX_RB];
|
||||
uint16_t QoSclass[RAL_MAX_RB];
|
||||
uint16_t dscp[RAL_MAX_RB];
|
||||
// statistics
|
||||
//u32 rx_packets;
|
||||
//u32 tx_packets;
|
||||
//u32 rx_bytes;
|
||||
//u32 tx_bytes;
|
||||
//u32 rx_errors;
|
||||
//u32 tx_errors;
|
||||
//u32 rx_dropped;
|
||||
//u32 tx_dropped;
|
||||
//uint32_t rx_packets;
|
||||
//uint32_t tx_packets;
|
||||
//uint32_t rx_bytes;
|
||||
//uint32_t tx_bytes;
|
||||
//uint32_t rx_errors;
|
||||
//uint32_t tx_errors;
|
||||
//uint32_t rx_dropped;
|
||||
//uint32_t tx_dropped;
|
||||
//char buffer[800]; // For ioctl with NAS driver
|
||||
|
||||
// MIH-INTERFACE data
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
#ifndef __RRC_DTYPES_H__
|
||||
#define __RRC_DTYPES_H__
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
extern struct nas_ioctl gifr;
|
||||
extern int fd;
|
||||
// 0335060080149150
|
||||
u8 NAS_DEFAULT_IMEI[16]={0x00, 0x03, 0x03, 0x05, 0x00 ,0x06, 0x00, 0x00, 0x08, 0x00, 0x01 ,0x04, 0x09, 0x01, 0x05, 0x00};
|
||||
uint8_t NAS_DEFAULT_IMEI[16]={0x00, 0x03, 0x03, 0x05, 0x00 ,0x06, 0x00, 0x00, 0x08, 0x00, 0x01 ,0x04, 0x09, 0x01, 0x05, 0x00};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
void print_state(u8 state){
|
||||
void print_state(uint8_t state){
|
||||
//---------------------------------------------------------------------------
|
||||
switch(state){
|
||||
case NAS_IDLE:DEBUG("NAS_IDLE\n");return;
|
||||
@@ -78,7 +78,7 @@ void print_state(u8 state){
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Convert the IMEI to iid
|
||||
void RAL_imei2iid(u8 *imei, u8 *iid){
|
||||
void RAL_imei2iid(uint8_t *imei, uint8_t *iid){
|
||||
//---------------------------------------------------------------------------
|
||||
// Start debug information
|
||||
if (!imei ||! iid ){
|
||||
@@ -220,15 +220,15 @@ int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int ioctl_cellid){
|
||||
case IO_CMD_LIST:
|
||||
{
|
||||
//printf("Usage: gioctl cx list\n");
|
||||
u8 *msgrep;
|
||||
u8 i;
|
||||
uint8_t *msgrep;
|
||||
uint8_t i;
|
||||
struct nas_msg_cx_list_reply *list;
|
||||
u8 lcr;
|
||||
uint8_t lcr;
|
||||
gifr.type=NAS_MSG_CX_LIST_REQUEST;
|
||||
//gifr.msg=(char *)malloc(NAS_LIST_CX_MAX*sizeof(struct nas_msg_cx_list_reply)+1);
|
||||
memset (ralpriv->buffer,0,800);
|
||||
gifr.msg= &(ralpriv->buffer[0]);
|
||||
msgrep=(u8 *)(gifr.msg);
|
||||
msgrep=(uint8_t *)(gifr.msg);
|
||||
//
|
||||
NOTICE("[MSC_MSG][%s][%s][--- ioctl : NAS_MSG_CX_LIST_REQUEST --->][nas]\n", getTimeStamp4Log(), g_link_id);
|
||||
err=ioctl(fd, NASMT_IOCTL_RAL, &gifr);
|
||||
@@ -242,7 +242,7 @@ int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int ioctl_cellid){
|
||||
lcr=0;
|
||||
DEBUG("%u\t\t%u\t%u\t", list[lcr].lcr, list[lcr].cellid, list[lcr].iid4);
|
||||
for (i=0;i<8;++i)
|
||||
DEBUG("%02x", *((u8 *)list[lcr].iid6+i));
|
||||
DEBUG("%02x", *((uint8_t *)list[lcr].iid6+i));
|
||||
DEBUG("\t%u\t%u\t", list[lcr].num_rb, list[lcr].nsclassifier);
|
||||
print_state(list[lcr].state);
|
||||
|
||||
@@ -269,8 +269,8 @@ int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int ioctl_cellid){
|
||||
case IO_CMD_LIST:
|
||||
{
|
||||
//printf("Usage: gioctl rb list <lcr>\n");
|
||||
u8 *msgrep;
|
||||
u8 rbi;
|
||||
uint8_t *msgrep;
|
||||
uint8_t rbi;
|
||||
struct nas_msg_rb_list_reply *list;
|
||||
struct nas_msg_rb_list_request *msgreq;
|
||||
gifr.type=NAS_MSG_RB_LIST_REQUEST;
|
||||
@@ -278,7 +278,7 @@ int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int ioctl_cellid){
|
||||
memset (ralpriv->buffer,0,800);
|
||||
gifr.msg= &(ralpriv->buffer[0]);
|
||||
msgreq=(struct nas_msg_rb_list_request *)(gifr.msg);
|
||||
msgrep=(u8 *)(gifr.msg);
|
||||
msgrep=(uint8_t *)(gifr.msg);
|
||||
msgreq->lcr=0; //Temp <lcr> - MT
|
||||
//
|
||||
NOTICE("[MSC_MSG][%s][%s][--- ioctl : NAS_MSG_RB_LIST_REQUEST --->][nas]\n", getTimeStamp4Log(), g_link_id);
|
||||
@@ -315,7 +315,7 @@ int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int ioctl_cellid){
|
||||
case IO_OBJ_MEAS:
|
||||
//
|
||||
{
|
||||
u8 i;
|
||||
uint8_t i;
|
||||
struct nas_msg_measure_request *msgreq;
|
||||
struct nas_msg_measure_reply *msgrep;
|
||||
gifr.type=NAS_MSG_MEAS_REQUEST;
|
||||
@@ -367,7 +367,7 @@ int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int ioctl_cellid){
|
||||
ERR("IOCTL error, err=%d\n",err);
|
||||
rc = -1;
|
||||
// default IMEI address : NAS_DEFAULT_IMEI
|
||||
RAL_imei2iid(NAS_DEFAULT_IMEI, (u8 *)&(ralpriv->ipv6_l2id[0]));
|
||||
RAL_imei2iid(NAS_DEFAULT_IMEI, (uint8_t *)&(ralpriv->ipv6_l2id[0]));
|
||||
} else {
|
||||
NOTICE("[MSC_MSG][%s][nas][--- NAS_MSG_IMEI_REPLY --->][%s]\n", getTimeStamp4Log(), g_link_id);
|
||||
DEBUG("IMEI value received= %d %d\n", msgrep->l2id[0], msgrep->l2id[1]);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
static int ueid2eui48(u8 *euiP, u8* ue_idP)
|
||||
static int ueid2eui48(uint8_t *euiP, uint8_t* ue_idP)
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
{
|
||||
// inspired by linux-source-3.2.0/net/ipv6/addrconf.c
|
||||
|
||||
@@ -139,23 +139,23 @@ TYPEDEF_BITMAP8(MIH_C_LINK_AC_TYPE_LIST)
|
||||
* Radio Bearer data
|
||||
*/
|
||||
struct ral_lte_channel {
|
||||
u32 cnx_id;
|
||||
u8 multicast;
|
||||
uint32_t cnx_id;
|
||||
uint8_t multicast;
|
||||
// MIHF parameters ix=0 UPLINK, ix=1 DOWNLINK
|
||||
u16 flowId[2];
|
||||
u16 classId[2];
|
||||
uint16_t flowId[2];
|
||||
uint16_t classId[2];
|
||||
float resBitrate[2];
|
||||
float meanBitrate[2];
|
||||
float bktDepth[2];
|
||||
float pkBitrate[2];
|
||||
float MTU[2];
|
||||
//NAS driver parameters
|
||||
u16 rbId;
|
||||
u16 RadioQoSclass;
|
||||
u16 dscpUL;
|
||||
u16 dscpDL;
|
||||
u16 nas_state;
|
||||
u16 status;
|
||||
uint16_t rbId;
|
||||
uint16_t RadioQoSclass;
|
||||
uint16_t dscpUL;
|
||||
uint16_t dscpDL;
|
||||
uint16_t nas_state;
|
||||
uint16_t status;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -164,9 +164,9 @@ struct ral_lte_channel {
|
||||
struct ral_lte_mt {
|
||||
/* The identifier of the link that is associated with a PoA */
|
||||
MIH_C_LINK_TUPLE_ID_T ltid;
|
||||
u8 ipv6_addr[16];
|
||||
u32 ipv6_l2id[2];
|
||||
u32 ue_id;
|
||||
uint8_t ipv6_addr[16];
|
||||
uint32_t ipv6_l2id[2];
|
||||
uint32_t ue_id;
|
||||
struct ral_lte_channel radio_channel[RAL_MAX_RB];
|
||||
int num_rbs;
|
||||
int num_class;
|
||||
@@ -181,7 +181,7 @@ struct ral_lte_mcast {
|
||||
/* The identifier of the multicast link that is associated with a PoA */
|
||||
MIH_C_LINK_TUPLE_ID_T ltid;
|
||||
struct ral_lte_channel radio_channel;
|
||||
u8 mc_group_addr[16];
|
||||
uint8_t mc_group_addr[16];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -189,13 +189,13 @@ struct ral_lte_mcast {
|
||||
*/
|
||||
struct ral_lte_priv {
|
||||
|
||||
u8 plmn[3];
|
||||
uint8_t plmn[3];
|
||||
int curr_cellId;
|
||||
int num_connected_mts;
|
||||
|
||||
u8 pending_req_flag;
|
||||
u8 pending_req_mt_ix;
|
||||
u8 pending_req_ch_ix;
|
||||
uint8_t pending_req_flag;
|
||||
uint8_t pending_req_mt_ix;
|
||||
uint8_t pending_req_ch_ix;
|
||||
MIH_C_FLOW_ID_T pending_req_fid;
|
||||
|
||||
struct ral_lte_mt pending_mt;
|
||||
|
||||
@@ -50,38 +50,38 @@
|
||||
***************************************************************************/
|
||||
struct ral_lte_priv {
|
||||
// only to call ralu_verifyPendingConnection
|
||||
u8 pending_req_flag;
|
||||
uint8_t pending_req_flag;
|
||||
// network parameters
|
||||
u16 cell_id;
|
||||
u16 nas_state;
|
||||
uint16_t cell_id;
|
||||
uint16_t nas_state;
|
||||
int state;
|
||||
u32 curr_signal_level;
|
||||
u32 ipv6_l2id[2];
|
||||
uint32_t curr_signal_level;
|
||||
uint32_t ipv6_l2id[2];
|
||||
//measures
|
||||
u8 req_num_bs;
|
||||
u16 req_cell_id[MAX_NUMBER_BS];
|
||||
u32 req_prov_id[MAX_NUMBER_BS];
|
||||
u16 req_order_index[MAX_NUMBER_BS];
|
||||
uint8_t req_num_bs;
|
||||
uint16_t req_cell_id[MAX_NUMBER_BS];
|
||||
uint32_t req_prov_id[MAX_NUMBER_BS];
|
||||
uint16_t req_order_index[MAX_NUMBER_BS];
|
||||
int num_measures;
|
||||
u16 meas_cell_id[MAX_NUMBER_BS];
|
||||
u32 last_meas_level[MAX_NUMBER_BS];
|
||||
u32 integrated_meas_level[MAX_NUMBER_BS];
|
||||
u32 prev_integrated_meas_level[MAX_NUMBER_BS];
|
||||
u32 provider_id[MAX_NUMBER_BS];
|
||||
uint16_t meas_cell_id[MAX_NUMBER_BS];
|
||||
uint32_t last_meas_level[MAX_NUMBER_BS];
|
||||
uint32_t integrated_meas_level[MAX_NUMBER_BS];
|
||||
uint32_t prev_integrated_meas_level[MAX_NUMBER_BS];
|
||||
uint32_t provider_id[MAX_NUMBER_BS];
|
||||
//Radio Bearers
|
||||
u16 num_rb;
|
||||
u16 rbId[RAL_MAX_RB];
|
||||
u16 QoSclass[RAL_MAX_RB];
|
||||
u16 dscp[RAL_MAX_RB];
|
||||
uint16_t num_rb;
|
||||
uint16_t rbId[RAL_MAX_RB];
|
||||
uint16_t QoSclass[RAL_MAX_RB];
|
||||
uint16_t dscp[RAL_MAX_RB];
|
||||
// statistics
|
||||
u32 rx_packets;
|
||||
u32 tx_packets;
|
||||
u32 rx_bytes;
|
||||
u32 tx_bytes;
|
||||
u32 rx_errors;
|
||||
u32 tx_errors;
|
||||
u32 rx_dropped;
|
||||
u32 tx_dropped;
|
||||
uint32_t rx_packets;
|
||||
uint32_t tx_packets;
|
||||
uint32_t rx_bytes;
|
||||
uint32_t tx_bytes;
|
||||
uint32_t rx_errors;
|
||||
uint32_t tx_errors;
|
||||
uint32_t rx_dropped;
|
||||
uint32_t tx_dropped;
|
||||
char buffer[800]; // For ioctl with NAS driver
|
||||
|
||||
// MIH-INTERFACE data
|
||||
|
||||
@@ -55,34 +55,34 @@
|
||||
|
||||
// Parameter types
|
||||
//----------------------------------------------------------
|
||||
typedef u16 netlIPVersion_t;
|
||||
typedef uint16_t netlIPVersion_t;
|
||||
typedef struct netlIPAddr {
|
||||
netlIPVersion_t ip_version;
|
||||
struct in6_addr ip_address;
|
||||
} netlIPAddr_t;
|
||||
typedef u32 netlStatValue_t;
|
||||
typedef u32 netlProviderId_t;
|
||||
typedef u16 netlCellID_t; // ID of the cell for connection
|
||||
typedef u32 netlMobileId_t; // mobile identifier
|
||||
typedef u16 netlStatus_t; // establishment status
|
||||
typedef u32 netlCnxid_t;
|
||||
typedef u16 netlRadioBearerId_t;
|
||||
typedef u16 netlQoSTrafficClass_t; //QoS traffic class requested
|
||||
typedef u16 netlIPdscp_t; // DSCP code transported to service NAS
|
||||
typedef uint32_t netlStatValue_t;
|
||||
typedef uint32_t netlProviderId_t;
|
||||
typedef uint16_t netlCellID_t; // ID of the cell for connection
|
||||
typedef uint32_t netlMobileId_t; // mobile identifier
|
||||
typedef uint16_t netlStatus_t; // establishment status
|
||||
typedef uint32_t netlCnxid_t;
|
||||
typedef uint16_t netlRadioBearerId_t;
|
||||
typedef uint16_t netlQoSTrafficClass_t; //QoS traffic class requested
|
||||
typedef uint16_t netlIPdscp_t; // DSCP code transported to service NAS
|
||||
typedef struct netlRBDef {
|
||||
netlRadioBearerId_t rbId;
|
||||
netlQoSTrafficClass_t QoSclass;
|
||||
netlIPdscp_t dscp;
|
||||
} netlrbParms_t;
|
||||
typedef u16 netlNumRBsInList_t; // number of RBs defined in the list
|
||||
typedef u16 netlNumCellsMeas_t; // number of RGs that could be measured
|
||||
typedef u32 netlSigLevel_t; // Signal level measured
|
||||
typedef uint16_t netlNumRBsInList_t; // number of RBs defined in the list
|
||||
typedef uint16_t netlNumCellsMeas_t; // number of RGs that could be measured
|
||||
typedef uint32_t netlSigLevel_t; // Signal level measured
|
||||
typedef struct netlMeasures {
|
||||
netlCellID_t cell_id;
|
||||
netlSigLevel_t level;
|
||||
netlProviderId_t provider_id;
|
||||
} netlMeasures_t;
|
||||
typedef u16 netlMcast_t;
|
||||
typedef uint16_t netlMcast_t;
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ struct nas_rg_msg_cnx_status_request //FFS
|
||||
struct nas_rg_msg_cnx_status_reply //FFS
|
||||
{
|
||||
netlMobileId_t ue_id;
|
||||
u8 iid[8]; // interface identification - EUI64
|
||||
uint8_t iid[8]; // interface identification - EUI64
|
||||
netlIPAddr_t l3_addr;
|
||||
netlStatus_t status;
|
||||
netlNumRBsInList_t num_rb;
|
||||
@@ -194,14 +194,14 @@ struct nas_rg_msg_mt_mcast_leave_rep
|
||||
struct nas_rg_netl_hdr
|
||||
{
|
||||
char name[IFNAMSIZ];
|
||||
u16 type;
|
||||
u16 length;
|
||||
uint16_t type;
|
||||
uint16_t length;
|
||||
};
|
||||
struct nas_rg_netl_request
|
||||
{
|
||||
char name[IFNAMSIZ];
|
||||
u16 type;
|
||||
u16 length;
|
||||
uint16_t type;
|
||||
uint16_t length;
|
||||
union {
|
||||
struct nas_rg_msg_cnx_status_request cnx_stat_req;
|
||||
struct nas_rg_msg_rb_list_request rb_list_req;
|
||||
@@ -214,8 +214,8 @@ struct nas_rg_netl_request
|
||||
struct nas_rg_netl_reply
|
||||
{
|
||||
char name[IFNAMSIZ];
|
||||
u16 type;
|
||||
u16 length;
|
||||
uint16_t type;
|
||||
uint16_t length;
|
||||
union {
|
||||
struct nas_rg_msg_statistic_reply statistics_rep;
|
||||
struct nas_rg_msg_cnx_status_reply cnx_stat_rep;
|
||||
@@ -229,8 +229,8 @@ struct nas_rg_netl_reply
|
||||
struct nas_rg_netl_indication
|
||||
{
|
||||
char name[IFNAMSIZ];
|
||||
u16 type;
|
||||
u16 length;
|
||||
uint16_t type;
|
||||
uint16_t length;
|
||||
union {
|
||||
struct nas_rg_msg_signal_loss sign_loss;
|
||||
} tqalNASPrimitive;
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
//#define GRAAL_STATE_ESTABLISHMENT_FAILURE 3
|
||||
//#define GRAAL_STATE_RELEASE_FAILURE 4
|
||||
|
||||
//typedef unsigned char u8;
|
||||
//typedef unsigned short u16;
|
||||
//typedef unsigned int u32;
|
||||
//typedef unsigned char uint8_t;
|
||||
//typedef unsigned short uint16_t;
|
||||
//typedef unsigned int uint32_t;
|
||||
|
||||
// Temp constants = arguments gioctl
|
||||
//arg[0]
|
||||
|
||||
@@ -63,27 +63,27 @@
|
||||
|
||||
// Parameter types
|
||||
//----------------------------------------------------------
|
||||
typedef u16 netlIPVersion_t;
|
||||
typedef uint16_t netlIPVersion_t;
|
||||
typedef struct netlIPAddr {
|
||||
netlIPVersion_t ip_version;
|
||||
struct in6_addr ip_address;
|
||||
} netlIPAddr_t;
|
||||
typedef u32 netlStatValue_t;
|
||||
typedef u32 netlProviderId_t;
|
||||
typedef u16 netlCellID_t; // ID of the cell for connection
|
||||
typedef u16 netlConnectionStatus_t; // connection establishment status
|
||||
typedef u16 netlRadioBearerId_t;
|
||||
typedef u16 netlQoSTrafficClass_t; //QoS traffic class requested
|
||||
typedef u16 netlIPdscp_t; // DSCP code transported to service NAS
|
||||
typedef uint32_t netlStatValue_t;
|
||||
typedef uint32_t netlProviderId_t;
|
||||
typedef uint16_t netlCellID_t; // ID of the cell for connection
|
||||
typedef uint16_t netlConnectionStatus_t; // connection establishment status
|
||||
typedef uint16_t netlRadioBearerId_t;
|
||||
typedef uint16_t netlQoSTrafficClass_t; //QoS traffic class requested
|
||||
typedef uint16_t netlIPdscp_t; // DSCP code transported to service NAS
|
||||
typedef struct netlRBDef {
|
||||
netlRadioBearerId_t rbId;
|
||||
netlQoSTrafficClass_t QoSclass;
|
||||
netlIPdscp_t dscp;
|
||||
u8 state;
|
||||
uint8_t state;
|
||||
} netlrbParms_t;
|
||||
typedef u16 netlNumRBsInList_t; // number of RBs defined in the list
|
||||
typedef u16 netlNumCellsMeas_t; // number of RGs that could be measured
|
||||
typedef u32 netlSigLevel_t; // Signal level measured
|
||||
typedef uint16_t netlNumRBsInList_t; // number of RBs defined in the list
|
||||
typedef uint16_t netlNumCellsMeas_t; // number of RGs that could be measured
|
||||
typedef uint32_t netlSigLevel_t; // Signal level measured
|
||||
typedef struct netlMeasures {
|
||||
netlCellID_t cell_id;
|
||||
netlSigLevel_t level;
|
||||
@@ -109,7 +109,7 @@ struct nas_ue_msg_statistic_reply
|
||||
struct nas_ue_msg_cnx_status_reply
|
||||
{
|
||||
netlCellID_t cellid; // cell identification
|
||||
u8 iid[8]; // interface identification - EUI64
|
||||
uint8_t iid[8]; // interface identification - EUI64
|
||||
netlIPAddr_t ip_addr;
|
||||
netlConnectionStatus_t status;
|
||||
netlNumRBsInList_t num_rb;
|
||||
@@ -118,12 +118,12 @@ struct nas_ue_msg_cnx_status_reply
|
||||
|
||||
struct nas_ue_msg_cnx_list_reply
|
||||
{
|
||||
u8 state;
|
||||
u16 cellid; // cell identification
|
||||
u32 iid6[2]; // IPv6 interface identification
|
||||
u8 iid4; // IPv4 interface identification
|
||||
u16 num_rb;
|
||||
u16 nsclassifier;
|
||||
uint8_t state;
|
||||
uint16_t cellid; // cell identification
|
||||
uint32_t iid6[2]; // IPv6 interface identification
|
||||
uint8_t iid4; // IPv4 interface identification
|
||||
uint16_t num_rb;
|
||||
uint16_t nsclassifier;
|
||||
};
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ struct nas_ue_msg_cnx_establish_request
|
||||
struct nas_ue_msg_cnx_establish_reply
|
||||
{
|
||||
netlConnectionStatus_t status;
|
||||
// u8 iid6[8]; // IPv6 interface identification - EUI64
|
||||
// uint8_t iid6[8]; // IPv6 interface identification - EUI64
|
||||
};
|
||||
|
||||
struct nas_ue_msg_cnx_release_reply
|
||||
@@ -153,7 +153,7 @@ struct nas_ue_msg_measure_request
|
||||
{
|
||||
netlNumCellsMeas_t num_cells;
|
||||
netlCellID_t cellid[NAS_UE_NETL_MAX_MEASURE_NB]; // Cell identification
|
||||
u16 num_providers;
|
||||
uint16_t num_providers;
|
||||
netlProviderId_t provider_id[NAS_UE_NETL_MAX_MEASURE_NB]; // Provider identification
|
||||
};
|
||||
|
||||
@@ -161,7 +161,7 @@ struct nas_ue_msg_measure_reply
|
||||
{
|
||||
netlNumCellsMeas_t num_cells;
|
||||
netlMeasures_t measures[NAS_UE_NETL_MAX_MEASURE_NB];
|
||||
u16 signal_lost_flag;
|
||||
uint16_t signal_lost_flag;
|
||||
};
|
||||
|
||||
struct nas_ue_msg_measure_indicate
|
||||
@@ -176,7 +176,7 @@ struct nas_ue_msg_signal_loss
|
||||
|
||||
struct nas_ue_l2id_reply
|
||||
{
|
||||
u32 l2id [2];
|
||||
uint32_t l2id [2];
|
||||
};
|
||||
|
||||
///////////////////////////
|
||||
@@ -187,14 +187,14 @@ struct nas_ue_l2id_reply
|
||||
struct nas_ue_netl_hdr
|
||||
{
|
||||
char name[IFNAMSIZ];
|
||||
u16 type;
|
||||
u16 length;
|
||||
uint16_t type;
|
||||
uint16_t length;
|
||||
};
|
||||
struct nas_ue_netl_request
|
||||
{
|
||||
char name[IFNAMSIZ];
|
||||
u16 type;
|
||||
u16 length;
|
||||
uint16_t type;
|
||||
uint16_t length;
|
||||
union {
|
||||
struct nas_ue_msg_cnx_establish_request cnx_req;
|
||||
struct nas_ue_msg_measure_request meas_req;
|
||||
@@ -203,8 +203,8 @@ struct nas_ue_netl_request
|
||||
struct nas_ue_netl_reply
|
||||
{
|
||||
char name[IFNAMSIZ];
|
||||
u16 type;
|
||||
u16 length;
|
||||
uint16_t type;
|
||||
uint16_t length;
|
||||
union {
|
||||
struct nas_ue_msg_statistic_reply statistics_rep;
|
||||
struct nas_ue_msg_cnx_status_reply cnx_stat_rep;
|
||||
@@ -219,8 +219,8 @@ struct nas_ue_netl_reply
|
||||
struct nas_ue_netl_indication
|
||||
{
|
||||
char name[IFNAMSIZ];
|
||||
u16 type;
|
||||
u16 length;
|
||||
uint16_t type;
|
||||
uint16_t length;
|
||||
union {
|
||||
struct nas_ue_msg_measure_indicate meas_ind;
|
||||
struct nas_ue_msg_signal_loss sign_loss;
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
#ifndef __RRC_DTYPES_H__
|
||||
#define __RRC_DTYPES_H__
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -59,7 +59,7 @@ static int eRALlte_NAS_read_rb_release_reply(void);
|
||||
static int eRALlte_NAS_read_cnx_status_reply(void);
|
||||
static int eRALlte_NAS_read_rb_list_reply(void);
|
||||
|
||||
static void imei2l2id(const u8* imei, u32* l2id);
|
||||
static void imei2l2id(const uint8_t* imei, uint32_t* l2id);
|
||||
|
||||
static void _eRALlte_NAS_get_MTs_list(int n_mts, int n_rbs);
|
||||
static int _eRALlte_NAS_update_MTs_list(int mt_ix, int ch_ix);
|
||||
@@ -132,8 +132,8 @@ static void _eRALlte_NAS_get_MTs_list(int n_mts, int n_rbs)
|
||||
if (mt_ix < ADDR_MAX) {
|
||||
memcpy((char *) ralpriv->mt[mt_ix].ipv6_addr,
|
||||
(char *) DestIpv6Addr[mt_ix], 16);
|
||||
imei2l2id((u8*) &DestIpv6Addr[mt_ix][8],
|
||||
(u32*) &ralpriv->mt[mt_ix].ipv6_l2id[0]);
|
||||
imei2l2id((uint8_t*) &DestIpv6Addr[mt_ix][8],
|
||||
(uint32_t*) &ralpriv->mt[mt_ix].ipv6_l2id[0]);
|
||||
DEBUG(" MT%d initialized : address %d %d\n", mt_ix,
|
||||
ralpriv->mt[mt_ix].ipv6_l2id[0],
|
||||
ralpriv->mt[mt_ix].ipv6_l2id[1]);
|
||||
@@ -187,8 +187,8 @@ static int _eRALlte_NAS_update_MTs_list(int mt_ix, int ch_ix)
|
||||
|
||||
ralpriv->mt[mt_ix].ltid = ralpriv->pending_mt.ltid;
|
||||
|
||||
imei2l2id((u8*) &ralpriv->pending_mt.ipv6_addr[8],
|
||||
(u32*) &ralpriv->mt[mt_ix].ipv6_l2id[0]);
|
||||
imei2l2id((uint8_t*) &ralpriv->pending_mt.ipv6_addr[8],
|
||||
(uint32_t*) &ralpriv->mt[mt_ix].ipv6_l2id[0]);
|
||||
DEBUG (" MT%d initialized : address %d %d\n", mt_ix,
|
||||
ralpriv->mt[mt_ix].ipv6_l2id[0],
|
||||
ralpriv->mt[mt_ix].ipv6_l2id[1]);
|
||||
@@ -885,7 +885,7 @@ static int eRALlte_NAS_read_rb_list_reply(void)
|
||||
** Others: None **
|
||||
** **
|
||||
***************************************************************************/
|
||||
static void imei2l2id(const u8* imei, u32* l2id)
|
||||
static void imei2l2id(const uint8_t* imei, uint32_t* l2id)
|
||||
{
|
||||
if ( !(imei) || !(l2id) ) {
|
||||
ERR(" %s : input parameter is NULL\n", __FUNCTION__);
|
||||
|
||||
@@ -208,7 +208,7 @@ int eRALlte_process_cmp_mt_addr(const char* mt_addr, const char* l2id)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if ((u8)l2id[i] != (u8)mt_addr[i+8]) {
|
||||
if ((uint8_t)l2id[i] != (uint8_t)mt_addr[i+8]) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -239,7 +239,7 @@ int eRALlte_process_find_mt_by_addr(const char* mt_addr)
|
||||
const char* l2id = (const char*)(&ralpriv->mt[mt_ix].ipv6_l2id[0]);
|
||||
int i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if ((u8)l2id[i] != (u8)mt_addr[i+8]) {
|
||||
if ((uint8_t)l2id[i] != (uint8_t)mt_addr[i+8]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ static char msc_gen_buff[MSC_GEN_BUF_SIZE];
|
||||
Reception side
|
||||
***************************************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
void print_state(u8 state){
|
||||
void print_state(uint8_t state){
|
||||
//---------------------------------------------------------------------------
|
||||
switch(state){
|
||||
case NAS_DISCONNECTED:DEBUG("NAS_DISCONNECTED\n");return;
|
||||
@@ -123,7 +123,7 @@ int IAL_decode_NAS_message(void){
|
||||
|
||||
DEBUG(" %u\t%u\t", p->cellid, p->iid4);
|
||||
for (i=0;i<8;++i)
|
||||
DEBUG("%02x", *((u8 *)p->iid6+i));
|
||||
DEBUG("%02x", *((uint8_t *)p->iid6+i));
|
||||
DEBUG("\t%u\t%u\t", p->num_rb, p->nsclassifier);
|
||||
print_state(p->state);
|
||||
|
||||
@@ -373,7 +373,7 @@ int IAL_process_DNAS_message(int ioctl_obj, int ioctl_cmd, int ioctl_cellid){
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Convert the IMEI to iid
|
||||
void TQAL_NAS_imei2iid(u8 *imei, u8 *iid){
|
||||
void TQAL_NAS_imei2iid(uint8_t *imei, uint8_t *iid){
|
||||
//---------------------------------------------------------------------------
|
||||
// Start debug information
|
||||
|
||||
@@ -396,7 +396,7 @@ void TQAL_NAS_imei2iid(u8 *imei, u8 *iid){
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Convert the IMEI to iid
|
||||
void TQAL_NAS_imei2iid2(u8 *imei, u32 *iid){
|
||||
void TQAL_NAS_imei2iid2(uint8_t *imei, uint32_t *iid){
|
||||
//---------------------------------------------------------------------------
|
||||
// Start debug information
|
||||
|
||||
|
||||
Reference in New Issue
Block a user