Commit 422f3008 authored by Rohit Gupta's avatar Rohit Gupta
Browse files

Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into bugfix-51-mscgen

parents 28b73955 3d0ad079
...@@ -158,6 +158,7 @@ remove_node_entry (node_struct * node, node_list * node_vector) ...@@ -158,6 +158,7 @@ remove_node_entry (node_struct * node, node_list * node_vector)
if (list->next->node->id == node->id) { if (list->next->node->id == node->id) {
toremove = tmp; // TODO delete the entry toremove = tmp; // TODO delete the entry
(void)toremove; /* avoid gcc warning "set but not used" */
tmp = list->next->next; tmp = list->next->next;
if (tmp != NULL) { if (tmp != NULL) {
...@@ -259,13 +260,11 @@ node_list * ...@@ -259,13 +260,11 @@ node_list *
remove_node (node_list * list, int nid, int node_type) remove_node (node_list * list, int nid, int node_type)
{ {
int found;
node_list *current = NULL, *previous = NULL; node_list *current = NULL, *previous = NULL;
//int cond=0; //int cond=0;
//int i=0; //int i=0;
if (list == NULL) { if (list == NULL) {
found = 1; //false
return NULL; return NULL;
} else { } else {
//start search //start search
...@@ -280,12 +279,10 @@ remove_node (node_list * list, int nid, int node_type) ...@@ -280,12 +279,10 @@ remove_node (node_list * list, int nid, int node_type)
//holds: current = NULL or type != node_type or.., but not both //holds: current = NULL or type != node_type or.., but not both
if (current == NULL) { if (current == NULL) {
found = 1;
LOG_E (OMG, " Element to remove is not found\n "); LOG_E (OMG, " Element to remove is not found\n ");
return NULL; return NULL;
} //value not found } //value not found
else { else {
found = 0; // true value found
if (current == list) { if (current == list) {
list = current->next; list = current->next;
...@@ -322,7 +319,6 @@ node_struct * ...@@ -322,7 +319,6 @@ node_struct *
find_node (node_list * list, int nid, int node_type) find_node (node_list * list, int nid, int node_type)
{ {
int found;
node_list *current; node_list *current;
if (list == NULL) { if (list == NULL) {
...@@ -340,7 +336,6 @@ find_node (node_list * list, int nid, int node_type) ...@@ -340,7 +336,6 @@ find_node (node_list * list, int nid, int node_type)
//holds: current = NULL or type != node_type or.., but not both //holds: current = NULL or type != node_type or.., but not both
if (current == NULL) { if (current == NULL) {
found = 1;
LOG_D (OMG, LOG_D (OMG,
" Element to find in Node_Vector with ID: %d could not be found\n ", " Element to find in Node_Vector with ID: %d could not be found\n ",
nid); nid);
...@@ -380,7 +375,7 @@ node_list * ...@@ -380,7 +375,7 @@ node_list *
reset_node_list (node_list * list) reset_node_list (node_list * list)
{ {
node_list *tmp; node_list *tmp;
node_list *last = list; //node_list *last = list;
if (list == NULL) { if (list == NULL) {
//printf("Node_list is NULL\n"); //printf("Node_list is NULL\n");
......
...@@ -301,7 +301,7 @@ set_new_mob_type (int id, int node_t, int mob_t, double cur_time) ...@@ -301,7 +301,7 @@ set_new_mob_type (int id, int node_t, int mob_t, double cur_time)
int prev_mob; int prev_mob;
node_list *tmp; node_list *tmp;
job_list *tmp2, *prev_job; //job_list *tmp2, *prev_job;
pair_struct *pair; pair_struct *pair;
double pause_p; double pause_p;
......
...@@ -173,7 +173,7 @@ place_steadystaterwp_node (node_struct * node) ...@@ -173,7 +173,7 @@ place_steadystaterwp_node (node_struct * node)
void void
sleep_steadystaterwp_node (pair_struct * pair, double cur_time) sleep_steadystaterwp_node (pair_struct * pair, double cur_time)
{ {
static int initial = 1; //static int initial = 1;
node_struct *node; node_struct *node;
node = pair->b; node = pair->b;
node->mobile = 0; node->mobile = 0;
...@@ -209,10 +209,10 @@ sleep_steadystaterwp_node (pair_struct * pair, double cur_time) ...@@ -209,10 +209,10 @@ sleep_steadystaterwp_node (pair_struct * pair, double cur_time)
void void
move_steadystaterwp_node (pair_struct * pair, double cur_time) move_steadystaterwp_node (pair_struct * pair, double cur_time)
{ {
static int initial = 1; //static int initial = 1;
double distance, journeytime_next, max_distance; double distance, journeytime_next, max_distance;
double temp_x, temp_y, u1, u2; double temp_x, temp_y, u1, u2;
int loc_num; //int loc_num;
double pr, block_xmin, block_ymin; double pr, block_xmin, block_ymin;
//LOG_D (OMG, "[STEADY_RWP] move node: %d\n", node->ID); //LOG_D (OMG, "[STEADY_RWP] move node: %d\n", node->ID);
......
...@@ -70,7 +70,7 @@ start_sumo_generator (omg_global_param omg_param_list) ...@@ -70,7 +70,7 @@ start_sumo_generator (omg_global_param omg_param_list)
if ((pid = fork ()) == 0) { if ((pid = fork ()) == 0) {
// Start SUMO in the child process // Start SUMO in the child process
system (sumo_line); if (system (sumo_line)) ; /* this if for no gcc warnings */
//childs addresss space //childs addresss space
} }
......
...@@ -55,7 +55,7 @@ int ...@@ -55,7 +55,7 @@ int
start_trace_generator (omg_global_param omg_param_list) start_trace_generator (omg_global_param omg_param_list)
{ {
double cur_time = 0.0; double cur_time = 0.0;
int immobile = 0; //int immobile = 0;
int node_number; int node_number;
node_struct *node = NULL; node_struct *node = NULL;
mobility_struct *mobility = NULL; mobility_struct *mobility = NULL;
...@@ -235,7 +235,7 @@ schedule_trace_node (pair_struct * pair, node_data * n_data, double cur_time) ...@@ -235,7 +235,7 @@ schedule_trace_node (pair_struct * pair, node_data * n_data, double cur_time)
void void
sleep_trace_node (pair_struct * pair, node_data * n_data, double cur_time) sleep_trace_node (pair_struct * pair, node_data * n_data, double cur_time)
{ {
double journeytime, distance; //double journeytime, distance;
node_struct *node = pair->b; node_struct *node = pair->b;
node->mobile = 0; node->mobile = 0;
node->mob->speed = 0.0; node->mob->speed = 0.0;
......
...@@ -58,8 +58,6 @@ hash_table_t **table; ...@@ -58,8 +58,6 @@ hash_table_t **table;
void void
create_new_table (int node_type) create_new_table (int node_type)
{ {
int i;
if(table==NULL) if(table==NULL)
table = (hash_table_t **) calloc (MAX_NUM_NODE_TYPES, sizeof (hash_table_t*)); table = (hash_table_t **) calloc (MAX_NUM_NODE_TYPES, sizeof (hash_table_t*));
......
...@@ -44,7 +44,9 @@ ...@@ -44,7 +44,9 @@
#define Maxneighbor 64 #define Maxneighbor 64
#define NUMBER_OF_UE_MAX 64 #define NUMBER_OF_UE_MAX 64
#define NUMBER_OF_eNB_MAX 3 #define NUMBER_OF_eNB_MAX 3
#define NB_ANTENNAS_RX 4 #ifndef NB_ANTENNAS_RX
# define NB_ANTENNAS_RX 4
#endif
#endif #endif
// //
......
...@@ -78,7 +78,6 @@ int stream_encrypt_eea1(stream_cipher_t *stream_cipher, uint8_t **out) ...@@ -78,7 +78,6 @@ int stream_encrypt_eea1(stream_cipher_t *stream_cipher, uint8_t **out)
int n ; int n ;
int i = 0; int i = 0;
uint32_t zero_bit = 0; uint32_t zero_bit = 0;
uint32_t byte_length;
uint32_t *KS; uint32_t *KS;
uint32_t K[4],IV[4]; uint32_t K[4],IV[4];
...@@ -89,7 +88,6 @@ int stream_encrypt_eea1(stream_cipher_t *stream_cipher, uint8_t **out) ...@@ -89,7 +88,6 @@ int stream_encrypt_eea1(stream_cipher_t *stream_cipher, uint8_t **out)
n = ( stream_cipher->blength + 31 ) / 32; n = ( stream_cipher->blength + 31 ) / 32;
zero_bit = stream_cipher->blength & 0x7; zero_bit = stream_cipher->blength & 0x7;
byte_length = stream_cipher->blength >> 3;
memset(&snow_3g_context, 0, sizeof(snow_3g_context)); memset(&snow_3g_context, 0, sizeof(snow_3g_context));
/*Initialisation*/ /*Initialisation*/
......
...@@ -61,7 +61,7 @@ void tx_throughput(int src, int dst, int application) ...@@ -61,7 +61,7 @@ void tx_throughput(int src, int dst, int application)
else if (g_otg->flow_start[src][dst][application] < get_ctime() ) else if (g_otg->flow_start[src][dst][application] < get_ctime() )
otg_info->tx_throughput[src][dst][application]=((double)otg_info->tx_num_bytes[src][dst][application] *1000*8)/ ((get_ctime() - g_otg->flow_start[src][dst][application])*1024); otg_info->tx_throughput[src][dst][application]=((double)otg_info->tx_num_bytes[src][dst][application] *1000*8)/ ((get_ctime() - g_otg->flow_start[src][dst][application])*1024);
else else
LOG_W("[src %d][dst %d][app %d] flow start time less than the simu time (start %d, duration %d, ctime %d)\n", LOG_W(OTG, "[src %d][dst %d][app %d] flow start time less than the simu time (start %d, duration %d, ctime %d)\n",
src, dst, application, src, dst, application,
g_otg->flow_start[src][dst][application], g_otg->flow_start[src][dst][application],
g_otg->flow_duration[src][dst][application], g_otg->flow_duration[src][dst][application],
...@@ -94,7 +94,7 @@ if ((g_otg->flow_start[src][dst][application]+g_otg->flow_duration[src][dst][app ...@@ -94,7 +94,7 @@ if ((g_otg->flow_start[src][dst][application]+g_otg->flow_duration[src][dst][app
else if (g_otg->flow_start[src][dst][application] < get_ctime() ) else if (g_otg->flow_start[src][dst][application] < get_ctime() )
otg_info->rx_goodput[src][dst][application]=((double)otg_info->rx_num_bytes[src][dst][application] *1000*8)/ ((get_ctime() - g_otg->flow_start[src][dst][application])*1024); otg_info->rx_goodput[src][dst][application]=((double)otg_info->rx_num_bytes[src][dst][application] *1000*8)/ ((get_ctime() - g_otg->flow_start[src][dst][application])*1024);
else else
LOG_W("[src %d][dst %d][app %d] flow start time less than the simu time (start %d, duration %d, ctime %d)\n", LOG_W(OTG, "[src %d][dst %d][app %d] flow start time less than the simu time (start %d, duration %d, ctime %d)\n",
src, dst, application, src, dst, application,
g_otg->flow_start[src][dst][application], g_otg->flow_start[src][dst][application],
g_otg->flow_duration[src][dst][application], g_otg->flow_duration[src][dst][application],
......
...@@ -113,7 +113,7 @@ int otg_rx_pkt(const int dst_instanceP, const int ctime, const char * const buff ...@@ -113,7 +113,7 @@ int otg_rx_pkt(const int dst_instanceP, const int ctime, const char * const buff
dst_instance = otg_hdr_rx->dst_instance; dst_instance = otg_hdr_rx->dst_instance;
if (dst_instance != dst_instanceP) { if (dst_instance != dst_instanceP) {
#warning "LG: TODO think about multicast traffic" //#warning "LG: TODO think about multicast traffic"
LOG_W(OTG,"[SRC %d][DST %d] [FLOW_idx %d][APP TYPE %d] RX INFO pkt at time %d: flag 0x %x, seq number %d, tx time %d, size (hdr %d, pdcp %d) not for dest instance %u\n", LOG_W(OTG,"[SRC %d][DST %d] [FLOW_idx %d][APP TYPE %d] RX INFO pkt at time %d: flag 0x %x, seq number %d, tx time %d, size (hdr %d, pdcp %d) not for dest instance %u\n",
dst_instanceP); dst_instanceP);
} }
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
# define GTPU_ERROR(x, args...) fprintf(stderr, "[GTPU][E]"x, ##args) # define GTPU_ERROR(x, args...) fprintf(stderr, "[GTPU][E]"x, ##args)
#endif #endif
#warning "TO BE REFINED" //#warning "TO BE REFINED"
# define GTPU_HEADER_OVERHEAD_MAX 64 # define GTPU_HEADER_OVERHEAD_MAX 64
uint32_t gtpv1u_new_teid(void); uint32_t gtpv1u_new_teid(void);
......
...@@ -333,7 +333,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( ...@@ -333,7 +333,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
gtpv1u_teid_data_p->eps_bearer_id); gtpv1u_teid_data_p->eps_bearer_id);
#endif #endif
#warning "LG eps bearer mapping to DRB id to do (offset -4)" //#warning "LG eps bearer mapping to DRB id to do (offset -4)"
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gtpv1u_teid_data_p->enb_id, ENB_FLAG_YES, gtpv1u_teid_data_p->ue_id, 0, 0,gtpv1u_teid_data_p->enb_id); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gtpv1u_teid_data_p->enb_id, ENB_FLAG_YES, gtpv1u_teid_data_p->ue_id, 0, 0,gtpv1u_teid_data_p->enb_id);
MSC_LOG_TX_MESSAGE( MSC_LOG_TX_MESSAGE(
...@@ -611,7 +611,7 @@ gtpv1u_new_data_req( ...@@ -611,7 +611,7 @@ gtpv1u_new_data_req(
if (bearer_p->state != BEARER_UP) { if (bearer_p->state != BEARER_UP) {
LOG_W(GTPU, "Trying to send data over bearer with state(%u) != BEARER_UP\n", LOG_W(GTPU, "Trying to send data over bearer with state(%u) != BEARER_UP\n",
bearer_p->state); bearer_p->state);
#warning LG: HACK WHILE WAITING FOR NAS, normally return -1 //#warning LG: HACK WHILE WAITING FOR NAS, normally return -1
if (bearer_p->state != BEARER_IN_CONFIG) if (bearer_p->state != BEARER_IN_CONFIG)
return -1; return -1;
...@@ -673,7 +673,7 @@ gtpv1u_create_s1u_tunnel( ...@@ -673,7 +673,7 @@ gtpv1u_create_s1u_tunnel(
teid_t s1u_teid = 0; teid_t s1u_teid = 0;
gtpv1u_teid_data_t *gtpv1u_teid_data_p = NULL; gtpv1u_teid_data_t *gtpv1u_teid_data_p = NULL;
gtpv1u_ue_data_t *gtpv1u_ue_data_p = NULL; gtpv1u_ue_data_t *gtpv1u_ue_data_p = NULL;
MessageDef *message_p = NULL; //MessageDef *message_p = NULL;
hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS;
int i; int i;
ebi_t eps_bearer_id = 0; ebi_t eps_bearer_id = 0;
...@@ -996,7 +996,7 @@ void *gtpv1u_eNB_task(void *args) ...@@ -996,7 +996,7 @@ void *gtpv1u_eNB_task(void *args)
{ {
int rc = 0; int rc = 0;
instance_t instance; instance_t instance;
const char *msg_name_p; //const char *msg_name_p;
rc = gtpv1u_eNB_init(); rc = gtpv1u_eNB_init();
AssertFatal(rc == 0, "gtpv1u_eNB_init Failed"); AssertFatal(rc == 0, "gtpv1u_eNB_init Failed");
...@@ -1014,7 +1014,7 @@ void *gtpv1u_eNB_task(void *args) ...@@ -1014,7 +1014,7 @@ void *gtpv1u_eNB_task(void *args)
DevAssert(received_message_p != NULL); DevAssert(received_message_p != NULL);
instance = ITTI_MSG_INSTANCE(received_message_p); instance = ITTI_MSG_INSTANCE(received_message_p);
msg_name_p = ITTI_MSG_NAME(received_message_p); //msg_name_p = ITTI_MSG_NAME(received_message_p);
switch (ITTI_MSG_ID(received_message_p)) { switch (ITTI_MSG_ID(received_message_p)) {
...@@ -1081,6 +1081,7 @@ void *gtpv1u_eNB_task(void *args) ...@@ -1081,6 +1081,7 @@ void *gtpv1u_eNB_task(void *args)
LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc); LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u", MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
enb_s1u_teid,sgw_s1u_teid,data_req_p->length); enb_s1u_teid,sgw_s1u_teid,data_req_p->length);
(void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
} else { } else {
rc = nwGtpv1uProcessUlpReq(gtpv1u_data_g.gtpv1u_stack, &stack_req); rc = nwGtpv1uProcessUlpReq(gtpv1u_data_g.gtpv1u_stack, &stack_req);
......
...@@ -630,7 +630,7 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz, ...@@ -630,7 +630,7 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
bufLen = sizeof(NwGtpv1uIeTv1T)+ ((NwGtpv1uMsgT*)hMsg)->msgLen; bufLen = sizeof(NwGtpv1uIeTv1T)+ ((NwGtpv1uMsgT*)hMsg)->msgLen;
#warning CROUX DIRTY +16, TO BE FIXED!!! //#warning CROUX DIRTY +16, TO BE FIXED!!!
/* the +16 is there because by analyzing memory allocation with some external /* the +16 is there because by analyzing memory allocation with some external
* tool, I saw that there were 6 bytes accessed after bufLen in nwGtpv1uCreateAndSendMsg * tool, I saw that there were 6 bytes accessed after bufLen in nwGtpv1uCreateAndSendMsg
* the value "16" has been chosen arbitrarily, just bigger than 6 * the value "16" has been chosen arbitrarily, just bigger than 6
...@@ -694,7 +694,7 @@ nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, uint32_t st ...@@ -694,7 +694,7 @@ nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, uint32_t st
if(thiz) { if(thiz) {
thiz->id = (NwPtrT)thiz; thiz->id = (NwPtrT)thiz;
thiz->stackType = stackType; thiz->stackType = stackType;
thiz->seq = (uint16_t) ((uint32_t)thiz) ; // FIXME interesting casts... don't know what this is good for... thiz->seq = (uint16_t) ((uintptr_t)thiz) ; // FIXME interesting casts... don't know what this is good for...
RB_INIT(&(thiz->outstandingTxSeqNumMap)); RB_INIT(&(thiz->outstandingTxSeqNumMap));
RB_INIT(&(thiz->outstandingRxSeqNumMap)); RB_INIT(&(thiz->outstandingRxSeqNumMap));
RB_INIT(&(thiz->sessionMap)); RB_INIT(&(thiz->sessionMap));
......
...@@ -323,7 +323,7 @@ int nas_message_decrypt( ...@@ -323,7 +323,7 @@ int nas_message_decrypt(
#if defined(NAS_MME) #if defined(NAS_MME)
LOG_FUNC_RETURN (TLV_DECODE_MAC_MISMATCH); LOG_FUNC_RETURN (TLV_DECODE_MAC_MISMATCH);
#else #else
#warning "added test on integrity algorithm because of SECURITY_MODE_COMMAND not correctly handled in UE (check integrity)" //#warning "added test on integrity algorithm because of SECURITY_MODE_COMMAND not correctly handled in UE (check integrity)"
if (emm_security_context->selected_algorithms.integrity != if (emm_security_context->selected_algorithms.integrity !=
NAS_SECURITY_ALGORITHMS_EIA0) { NAS_SECURITY_ALGORITHMS_EIA0) {
...@@ -1016,10 +1016,10 @@ static int _nas_message_decrypt( ...@@ -1016,10 +1016,10 @@ static int _nas_message_decrypt(
stream_cipher.count = count; stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1 stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction; stream_cipher.direction = direction;
stream_cipher.message = src; stream_cipher.message = (unsigned char *)src;
/* length in bits */ /* length in bits */
stream_cipher.blength = length << 3; stream_cipher.blength = length << 3;
nas_stream_encrypt_eea1(&stream_cipher, dest); nas_stream_encrypt_eea1(&stream_cipher, (unsigned char *)dest);
/* Decode the first octet (security header type or EPS bearer identity, /* Decode the first octet (security header type or EPS bearer identity,
* and protocol discriminator) */ * and protocol discriminator) */
DECODE_U8(dest, *(uint8_t*)(&header), size); DECODE_U8(dest, *(uint8_t*)(&header), size);
...@@ -1050,10 +1050,10 @@ static int _nas_message_decrypt( ...@@ -1050,10 +1050,10 @@ static int _nas_message_decrypt(
stream_cipher.count = count; stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1 stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction; stream_cipher.direction = direction;
stream_cipher.message = src; stream_cipher.message = (unsigned char *)src;
/* length in bits */ /* length in bits */
stream_cipher.blength = length << 3; stream_cipher.blength = length << 3;
nas_stream_encrypt_eea1(&stream_cipher, dest); nas_stream_encrypt_eea1(&stream_cipher, (unsigned char *)dest);
/* Decode the first octet (security header type or EPS bearer identity, /* Decode the first octet (security header type or EPS bearer identity,
* and protocol discriminator) */ * and protocol discriminator) */
DECODE_U8(dest, *(uint8_t*)(&header), size); DECODE_U8(dest, *(uint8_t*)(&header), size);
...@@ -1178,10 +1178,10 @@ static int _nas_message_encrypt( ...@@ -1178,10 +1178,10 @@ static int _nas_message_encrypt(
stream_cipher.count = count; stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1 stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction; stream_cipher.direction = direction;
stream_cipher.message = src; stream_cipher.message = (unsigned char *)src;
/* length in bits */ /* length in bits */
stream_cipher.blength = length << 3; stream_cipher.blength = length << 3;
nas_stream_encrypt_eea1(&stream_cipher, dest); nas_stream_encrypt_eea1(&stream_cipher, (unsigned char *)dest);
LOG_FUNC_RETURN (length); LOG_FUNC_RETURN (length);
...@@ -1209,10 +1209,10 @@ static int _nas_message_encrypt( ...@@ -1209,10 +1209,10 @@ static int _nas_message_encrypt(
stream_cipher.count = count; stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1 stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction; stream_cipher.direction = direction;
stream_cipher.message = src; stream_cipher.message = (unsigned char *)src;
/* length in bits */ /* length in bits */
stream_cipher.blength = length << 3; stream_cipher.blength = length << 3;
nas_stream_encrypt_eea2(&stream_cipher, dest); nas_stream_encrypt_eea2(&stream_cipher, (unsigned char *)dest);
LOG_FUNC_RETURN (length); LOG_FUNC_RETURN (length);
...@@ -1344,7 +1344,7 @@ static uint32_t _nas_message_get_mac( ...@@ -1344,7 +1344,7 @@ static uint32_t _nas_message_get_mac(
stream_cipher.count = count; stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1 stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction; stream_cipher.direction = direction;
stream_cipher.message = buffer; stream_cipher.message = (unsigned char *)buffer;
/* length in bits */ /* length in bits */
stream_cipher.blength = length << 3; stream_cipher.blength = length << 3;
...@@ -1390,7 +1390,7 @@ static uint32_t _nas_message_get_mac( ...@@ -1390,7 +1390,7 @@ static uint32_t _nas_message_get_mac(
stream_cipher.count = count; stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1 stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction; stream_cipher.direction = direction;
stream_cipher.message = buffer; stream_cipher.message = (unsigned char *)buffer;
/* length in bits */ /* length in bits */
stream_cipher.blength = length << 3; stream_cipher.blength = length << 3;
......
...@@ -214,7 +214,7 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -214,7 +214,7 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
*(buffer + encoded) = (encode_u8_eps_attach_result(&attach_accept->epsattachresult) & 0x0f); *(buffer + encoded) = (encode_u8_eps_attach_result(&attach_accept->epsattachresult) & 0x0f);
encoded++; encoded++;
#warning "LG TEST override t3412value" //#warning "LG TEST override t3412value"
attach_accept->t3412value.unit = GPRS_TIMER_UNIT_360S; attach_accept->t3412value.unit = GPRS_TIMER_UNIT_360S;
attach_accept->t3412value.timervalue = 10; attach_accept->t3412value.timervalue = 10;
...@@ -288,7 +288,7 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -288,7 +288,7 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
encoded += encode_result; encoded += encode_result;
} }
#warning "LG TEST override t3402value" //#warning "LG TEST override t3402value"
attach_accept->presencemask |= ATTACH_ACCEPT_T3402_VALUE_PRESENT; attach_accept->presencemask |= ATTACH_ACCEPT_T3402_VALUE_PRESENT;
attach_accept->t3402value.unit = GPRS_TIMER_UNIT_60S; attach_accept->t3402value.unit = GPRS_TIMER_UNIT_60S;
attach_accept->t3402value.timervalue = 12; attach_accept->t3402value.timervalue = 12;
......
...@@ -54,9 +54,9 @@ int decode_ms_network_feature_support(MsNetworkFeatureSupport *msnetworkfeatures ...@@ -54,9 +54,9 @@ int decode_ms_network_feature_support(MsNetworkFeatureSupport *msnetworkfeatures
} }
int encode_ms_network_feature_support(MsNetworkFeatureSupport *msnetworkfeaturesupport, uint8_t iei, uint8_t *buffer, uint32_t len) int encode_ms_network_feature_support(MsNetworkFeatureSupport *msnetworkfeaturesupport, uint8_t iei, uint8_t *buffer, uint32_t len)
{ {
uint8_t *lenPtr; //uint8_t *lenPtr;
uint32_t encoded = 0; uint32_t encoded = 0;
int encode_result; //int encode_result;
/* Checking IEI and pointer */ /* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, MS_NETWORK_FEATURE_SUPPORT_MINIMUM_LENGTH, len); CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, MS_NETWORK_FEATURE_SUPPORT_MINIMUM_LENGTH, len);
#if defined (NAS_DEBUG) #if defined (NAS_DEBUG)
......
...@@ -81,7 +81,7 @@ int decode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8 ...@@ -81,7 +81,7 @@ int decode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8
LOG_TRACE(INFO, "uenetworkcapability decoded GPRS\n"); LOG_TRACE(INFO, "uenetworkcapability decoded GPRS\n");
} }
#warning "Force GPRS present if UMTS present" //#warning "Force GPRS present if UMTS present"
uenetworkcapability->gprs_present =1; uenetworkcapability->gprs_present =1;
} }
} }
...@@ -131,7 +131,7 @@ int encode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8 ...@@ -131,7 +131,7 @@ int encode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8
} }
if (uenetworkcapability->gprs_present) { if (uenetworkcapability->gprs_present) {
#warning "Force gea to 0x60" //#warning "Force gea to 0x60"
*(buffer + encoded) = 0x00 | 0x60; *(buffer + encoded) = 0x00 | 0x60;
////((uenetworkcapability->spare & 0x7) << 5) | // spare coded as zero ////((uenetworkcapability->spare & 0x7) << 5) | // spare coded as zero
//((uenetworkcapability->csfb & 0x1) << 4) | //((uenetworkcapability->csfb & 0x1) << 4) |
......
...@@ -481,7 +481,7 @@ static void _display_emm_data(const emm_nvdata_t* data) ...@@ -481,7 +481,7 @@ static void _display_emm_data(const emm_nvdata_t* data)
data->imsi.u.num.digit13, data->imsi.u.num.digit13,
data->imsi.u.num.digit14); data->imsi.u.num.digit14);
} else {