Commit a6d1aa8d authored by Rohit Gupta's avatar Rohit Gupta
Browse files

Merge branch 'develop' into feature-34-test_framework

parents 8b849e5c 9eec54ae
......@@ -698,6 +698,10 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
char *log_start;
char *log_end;
/* for no gcc warnings */
(void)log_start;
(void)log_end;
c = &g_log->log_component[comp];
// do not apply filtering for LOG_F
......@@ -971,6 +975,10 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
*/
char log_buffer[MAX_LOG_TOTAL];
/* for no gcc warnings */
(void)log_start;
(void)log_end;
c = &g_log->log_component[comp];
// do not apply filtering for LOG_F
......
......@@ -158,6 +158,7 @@ remove_node_entry (node_struct * node, node_list * node_vector)
if (list->next->node->id == node->id) {
toremove = tmp; // TODO delete the entry
(void)toremove; /* avoid gcc warning "set but not used" */
tmp = list->next->next;
if (tmp != NULL) {
......@@ -259,13 +260,11 @@ node_list *
remove_node (node_list * list, int nid, int node_type)
{
int found;
node_list *current = NULL, *previous = NULL;
//int cond=0;
//int i=0;
if (list == NULL) {
found = 1; //false
return NULL;
} else {
//start search
......@@ -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
if (current == NULL) {
found = 1;
LOG_E (OMG, " Element to remove is not found\n ");
return NULL;
} //value not found
else {
found = 0; // true value found
if (current == list) {
list = current->next;
......@@ -322,7 +319,6 @@ node_struct *
find_node (node_list * list, int nid, int node_type)
{
int found;
node_list *current;
if (list == NULL) {
......@@ -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
if (current == NULL) {
found = 1;
LOG_D (OMG,
" Element to find in Node_Vector with ID: %d could not be found\n ",
nid);
......@@ -380,7 +375,7 @@ node_list *
reset_node_list (node_list * list)
{
node_list *tmp;
node_list *last = list;
//node_list *last = list;
if (list == NULL) {
//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)
int prev_mob;
node_list *tmp;
job_list *tmp2, *prev_job;
//job_list *tmp2, *prev_job;
pair_struct *pair;
double pause_p;
......
......@@ -173,7 +173,7 @@ place_steadystaterwp_node (node_struct * node)
void
sleep_steadystaterwp_node (pair_struct * pair, double cur_time)
{
static int initial = 1;
//static int initial = 1;
node_struct *node;
node = pair->b;
node->mobile = 0;
......@@ -209,10 +209,10 @@ sleep_steadystaterwp_node (pair_struct * pair, double cur_time)
void
move_steadystaterwp_node (pair_struct * pair, double cur_time)
{
static int initial = 1;
//static int initial = 1;
double distance, journeytime_next, max_distance;
double temp_x, temp_y, u1, u2;
int loc_num;
//int loc_num;
double pr, block_xmin, block_ymin;
//LOG_D (OMG, "[STEADY_RWP] move node: %d\n", node->ID);
......
......@@ -70,7 +70,7 @@ start_sumo_generator (omg_global_param omg_param_list)
if ((pid = fork ()) == 0) {
// Start SUMO in the child process
system (sumo_line);
if (system (sumo_line)) ; /* this if for no gcc warnings */
//childs addresss space
}
......
......@@ -55,7 +55,7 @@ int
start_trace_generator (omg_global_param omg_param_list)
{
double cur_time = 0.0;
int immobile = 0;
//int immobile = 0;
int node_number;
node_struct *node = NULL;
mobility_struct *mobility = NULL;
......@@ -235,7 +235,7 @@ schedule_trace_node (pair_struct * pair, node_data * n_data, double cur_time)
void
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->mobile = 0;
node->mob->speed = 0.0;
......
......@@ -58,8 +58,6 @@ hash_table_t **table;
void
create_new_table (int node_type)
{
int i;
if(table==NULL)
table = (hash_table_t **) calloc (MAX_NUM_NODE_TYPES, sizeof (hash_table_t*));
......
......@@ -44,7 +44,9 @@
#define Maxneighbor 64
#define NUMBER_OF_UE_MAX 64
#define NUMBER_OF_eNB_MAX 3
#define NB_ANTENNAS_RX 4
#ifndef NB_ANTENNAS_RX
# define NB_ANTENNAS_RX 4
#endif
#endif
//
......
......@@ -78,7 +78,6 @@ int stream_encrypt_eea1(stream_cipher_t *stream_cipher, uint8_t **out)
int n ;
int i = 0;
uint32_t zero_bit = 0;
uint32_t byte_length;
uint32_t *KS;
uint32_t K[4],IV[4];
......@@ -89,7 +88,6 @@ int stream_encrypt_eea1(stream_cipher_t *stream_cipher, uint8_t **out)
n = ( stream_cipher->blength + 31 ) / 32;
zero_bit = stream_cipher->blength & 0x7;
byte_length = stream_cipher->blength >> 3;
memset(&snow_3g_context, 0, sizeof(snow_3g_context));
/*Initialisation*/
......
......@@ -61,7 +61,7 @@ void tx_throughput(int src, int dst, int application)
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);
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,
g_otg->flow_start[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
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);
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,
g_otg->flow_start[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
dst_instance = otg_hdr_rx->dst_instance;
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",
dst_instanceP);
}
......
......@@ -54,7 +54,7 @@
# define GTPU_ERROR(x, args...) fprintf(stderr, "[GTPU][E]"x, ##args)
#endif
#warning "TO BE REFINED"
//#warning "TO BE REFINED"
# define GTPU_HEADER_OVERHEAD_MAX 64
uint32_t gtpv1u_new_teid(void);
......
......@@ -333,7 +333,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
gtpv1u_teid_data_p->eps_bearer_id);
#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);
MSC_LOG_TX_MESSAGE(
......@@ -611,7 +611,7 @@ gtpv1u_new_data_req(
if (bearer_p->state != BEARER_UP) {
LOG_W(GTPU, "Trying to send data over bearer with state(%u) != BEARER_UP\n",
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)
return -1;
......@@ -673,7 +673,7 @@ gtpv1u_create_s1u_tunnel(
teid_t s1u_teid = 0;
gtpv1u_teid_data_t *gtpv1u_teid_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;
int i;
ebi_t eps_bearer_id = 0;
......@@ -996,7 +996,7 @@ void *gtpv1u_eNB_task(void *args)
{
int rc = 0;
instance_t instance;
const char *msg_name_p;
//const char *msg_name_p;
rc = gtpv1u_eNB_init();
AssertFatal(rc == 0, "gtpv1u_eNB_init Failed");
......@@ -1014,7 +1014,7 @@ void *gtpv1u_eNB_task(void *args)
DevAssert(received_message_p != NULL);
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)) {
......@@ -1081,6 +1081,7 @@ void *gtpv1u_eNB_task(void *args)
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",
enb_s1u_teid,sgw_s1u_teid,data_req_p->length);
(void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
} else {
rc = nwGtpv1uProcessUlpReq(gtpv1u_data_g.gtpv1u_stack, &stack_req);
......
......@@ -630,7 +630,7 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
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
* tool, I saw that there were 6 bytes accessed after bufLen in nwGtpv1uCreateAndSendMsg
* the value "16" has been chosen arbitrarily, just bigger than 6
......@@ -694,7 +694,7 @@ nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, uint32_t st
if(thiz) {
thiz->id = (NwPtrT)thiz;
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->outstandingRxSeqNumMap));
RB_INIT(&(thiz->sessionMap));
......
......@@ -323,7 +323,7 @@ int nas_message_decrypt(
#if defined(NAS_MME)
LOG_FUNC_RETURN (TLV_DECODE_MAC_MISMATCH);
#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 !=
NAS_SECURITY_ALGORITHMS_EIA0) {
......@@ -1016,10 +1016,10 @@ static int _nas_message_decrypt(
stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction;
stream_cipher.message = src;
stream_cipher.message = (unsigned char *)src;
/* length in bits */
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,
* and protocol discriminator) */
DECODE_U8(dest, *(uint8_t*)(&header), size);
......@@ -1050,10 +1050,10 @@ static int _nas_message_decrypt(
stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction;
stream_cipher.message = src;
stream_cipher.message = (unsigned char *)src;
/* length in bits */
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,
* and protocol discriminator) */
DECODE_U8(dest, *(uint8_t*)(&header), size);
......@@ -1178,10 +1178,10 @@ static int _nas_message_encrypt(
stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction;
stream_cipher.message = src;
stream_cipher.message = (unsigned char *)src;
/* length in bits */
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);
......@@ -1209,10 +1209,10 @@ static int _nas_message_encrypt(
stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction;
stream_cipher.message = src;
stream_cipher.message = (unsigned char *)src;
/* length in bits */
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);
......@@ -1344,7 +1344,7 @@ static uint32_t _nas_message_get_mac(
stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction;
stream_cipher.message = buffer;
stream_cipher.message = (unsigned char *)buffer;
/* length in bits */
stream_cipher.blength = length << 3;
......@@ -1390,7 +1390,7 @@ static uint32_t _nas_message_get_mac(
stream_cipher.count = count;
stream_cipher.bearer = 0x00; //33.401 section 8.1.1
stream_cipher.direction = direction;
stream_cipher.message = buffer;
stream_cipher.message = (unsigned char *)buffer;
/* length in bits */
stream_cipher.blength = length << 3;
......
......@@ -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);
encoded++;
#warning "LG TEST override t3412value"
//#warning "LG TEST override t3412value"
attach_accept->t3412value.unit = GPRS_TIMER_UNIT_360S;
attach_accept->t3412value.timervalue = 10;
......@@ -288,7 +288,7 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
encoded += encode_result;
}
#warning "LG TEST override t3402value"
//#warning "LG TEST override t3402value"
attach_accept->presencemask |= ATTACH_ACCEPT_T3402_VALUE_PRESENT;
attach_accept->t3402value.unit = GPRS_TIMER_UNIT_60S;
attach_accept->t3402value.timervalue = 12;
......
......@@ -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)
{
uint8_t *lenPtr;
//uint8_t *lenPtr;
uint32_t encoded = 0;
int encode_result;
//int encode_result;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, MS_NETWORK_FEATURE_SUPPORT_MINIMUM_LENGTH, len);
#if defined (NAS_DEBUG)
......
......@@ -81,7 +81,7 @@ int decode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8
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;
}
}
......@@ -131,7 +131,7 @@ int encode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8
}
if (uenetworkcapability->gprs_present) {
#warning "Force gea to 0x60"
//#warning "Force gea to 0x60"
*(buffer + encoded) = 0x00 | 0x60;
////((uenetworkcapability->spare & 0x7) << 5) | // spare coded as zero
//((uenetworkcapability->csfb & 0x1) << 4) |
......
......@@ -481,7 +481,7 @@ static void _display_emm_data(const emm_nvdata_t* data)
data->imsi.u.num.digit13,
data->imsi.u.num.digit14);
} else {
printf("%u%u%u.%u%u%u.%u%u%u%u%u%u%u%u\n",
printf("%u%u%u.%u%u%u.%u%u%u%u%u%u%u%u%u\n",
data->imsi.u.num.digit1,
data->imsi.u.num.digit2,
data->imsi.u.num.digit3,
......
......@@ -289,9 +289,9 @@ int usim_api_authenticate(const OctetString* rand_pP, const OctetString* autn_pP
#define USIM_API_SQN_MS_SIZE 3
for (i = 0; i < USIM_API_SQN_MS_SIZE; i++) {
#warning "LG:BUG HERE TODO"
//#warning "LG:BUG HERE TODO"
sqn_ms[USIM_API_SQNMS_SIZE - i] =
((uint8_t*)(_usim_api_data.sqn_ms))[USIM_API_SQN_MS_SIZE - i];
((uint8_t*)(&_usim_api_data.sqn_ms))[USIM_API_SQN_MS_SIZE - i];
}
u8 sqnms[USIM_API_SQNMS_SIZE];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment