Commit 61f7b836 authored by Lionel Gauthier's avatar Lionel Gauthier

Updated for integration as tasks in oaisim executable.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4596 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e90b9e1f
......@@ -2,12 +2,10 @@
#define MIH_C_C
#include "MIH_C.h"
//-----------------------------------------------------------------------------
void MIH_C_init(int log_outputP) {
void MIH_C_init(void) {
//-----------------------------------------------------------------------------
MIH_C_log_init(log_outputP);
}
//-----------------------------------------------------------------------------
void MIH_C_exit(void) {
//-----------------------------------------------------------------------------
MIH_C_log_exit();
}
......@@ -9,12 +9,12 @@ unsigned int MIH_C_BITMAP82String(MIH_C_BITMAP8_T* dataP, char* bufP) {
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP8_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP8_T* dataP) {
DEBUG_ENCODE("%s: %02X\n", __FUNCTION__, *dataP);
printf("[MIH_C] %s: %02X\n", __FUNCTION__, *dataP);
BitBuffer_write8(bbP, *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP16_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP16_T* dataP) {
DEBUG_ENCODE("%s: %04X\n", __FUNCTION__, *dataP);
printf("[MIH_C] %s: %04X\n", __FUNCTION__, *dataP);
BitBuffer_write16(bbP, *dataP);
}
//-----------------------------------------------------------------------------
......@@ -25,7 +25,7 @@ unsigned int MIH_C_BITMAP162String(MIH_C_BITMAP16_T* dataP, char* bufP) {
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP24_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP24_T* dataP) {
//-----------------------------------------------------------------------------
DEBUG_ENCODE("%s: %02X%02X%02X\n", __FUNCTION__, dataP->val[0],dataP->val[1], dataP->val[2]);
printf("[MIH_C] %s: %02X%02X%02X\n", __FUNCTION__, dataP->val[0],dataP->val[1], dataP->val[2]);
MIH_C_BITMAP8_encode(bbP, &dataP->val[0]);
MIH_C_BITMAP8_encode(bbP, &dataP->val[1]);
MIH_C_BITMAP8_encode(bbP, &dataP->val[2]);
......@@ -37,27 +37,27 @@ unsigned int MIH_C_BITMAP242String(MIH_C_BITMAP24_T* dataP, char* bufP) {
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP32_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP32_T* dataP) {
DEBUG_ENCODE("%s: %08X\n", __FUNCTION__, *dataP);
printf("[MIH_C] %s: %08X\n", __FUNCTION__, *dataP);
BitBuffer_write32(bbP, *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP64_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP64_T* dataP) {
//-----------------------------------------------------------------------------
DEBUG_ENCODE("%s: %16X\n", __FUNCTION__, *dataP);
printf("[MIH_C] %s: %16X\n", __FUNCTION__, *dataP);
BitBuffer_write32(bbP, (MIH_C_UNSIGNED_INT4_T)(*dataP>>32));
BitBuffer_write32(bbP, (MIH_C_UNSIGNED_INT4_T)*dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP128_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP128_T* dataP) {
//-----------------------------------------------------------------------------
DEBUG_ENCODE("%s: %16X%16X\n", __FUNCTION__, dataP->val[0], dataP->val[1]);
printf("[MIH_C] %s: %16X%16X\n", __FUNCTION__, dataP->val[0], dataP->val[1]);
MIH_C_BITMAP64_encode(bbP, &dataP->val[0]);
MIH_C_BITMAP64_encode(bbP, &dataP->val[1]);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP256_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP256_T* dataP) {
//-----------------------------------------------------------------------------
DEBUG_ENCODE("%s: %16X%16X%16X%16X\n", __FUNCTION__, dataP->val[0], dataP->val[1], dataP->val[2], dataP->val[3]);
printf("[MIH_C] %s: %16X%16X%16X%16X\n", __FUNCTION__, dataP->val[0], dataP->val[1], dataP->val[2], dataP->val[3]);
MIH_C_BITMAP64_encode(bbP, &dataP->val[0]);
MIH_C_BITMAP64_encode(bbP, &dataP->val[1]);
MIH_C_BITMAP64_encode(bbP, &dataP->val[2]);
......@@ -98,7 +98,7 @@ inline void MIH_C_OCTET_encode(Bit_Buffer_t* bbP, MIH_C_F1_Generic_Octet_t *data
}
//-----------------------------------------------------------------------------
inline void MIH_C_UNSIGNED_INT1_encode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT1_T* dataP) {
DEBUG_ENCODE("%s: %02X\n", __FUNCTION__, *dataP);
printf("[MIH_C] %s: %02X\n", __FUNCTION__, *dataP);
BitBuffer_write8(bbP, *dataP);
}
//-----------------------------------------------------------------------------
......@@ -216,7 +216,7 @@ inline void MIH_C_LIST_LENGTH_encode(Bit_Buffer_t* bbP, u_int16_t lengthP) {
int length;
if (lengthP <= 128) {
#ifdef DEBUG_TRACE_DETAILS
DEBUG_ENCODE("%s: Length %02X\n", __FUNCTION__, lengthP);
printf("[MIH_C] %s: Length %02X\n", __FUNCTION__, lengthP);
#endif
BitBuffer_write8(bbP, (MIH_C_UNSIGNED_INT1_T)lengthP);
} else {
......@@ -224,7 +224,7 @@ inline void MIH_C_LIST_LENGTH_encode(Bit_Buffer_t* bbP, u_int16_t lengthP) {
if (((lengthP - 128) % 255) != 0) {
num_more_bytes += 1;
}
DEBUG_ENCODE("%s: Length %02X on %d more bytes\n", __FUNCTION__, lengthP, num_more_bytes);
printf("[MIH_C] %s: Length %02X on %d more bytes\n", __FUNCTION__, lengthP, num_more_bytes);
BitBuffer_write8(bbP, (MIH_C_UNSIGNED_INT1_T)(128 + num_more_bytes));
length = lengthP - 128;
while (length > 0) {
......@@ -249,7 +249,7 @@ inline u_int16_t MIH_C_LIST_LENGTH_get_encode_num_bytes(u_int16_t lengthP) {
if (((lengthP - 128) % 255) != 0) {
num_more_bytes += 1;
}
DEBUG_ENCODE("%s: Length %02X on %d more bytes\n", __FUNCTION__, lengthP, num_more_bytes);
printf("[MIH_C] %s: Length %02X on %d more bytes\n", __FUNCTION__, lengthP, num_more_bytes);
return num_more_bytes + sizeof (MIH_C_UNSIGNED_INT1_T);
}
}
......@@ -268,12 +268,12 @@ inline void MIH_C_LIST_LENGTH_decode(Bit_Buffer_t* bbP, u_int16_t *lengthP) {
num_more_bytes = num_more_bytes - 1;
}
#ifdef DEBUG_TRACE_DETAILS
DEBUG_DECODE("%s: Length %d \n", __FUNCTION__, *lengthP);
printf("[MIH_C] %s: Length %d \n", __FUNCTION__, *lengthP);
#endif
} else {
*lengthP = byte1;
#ifdef DEBUG_TRACE_DETAILS
DEBUG_DECODE("%s: Length %d \n", __FUNCTION__, *lengthP);
printf("[MIH_C] %s: Length %d \n", __FUNCTION__, *lengthP);
#endif
}
}
......
......@@ -106,7 +106,7 @@ inline void MIH_C_LINK_ADDR_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ADDR_T *dataP)
MIH_C_OTHER_L2_ADDR_encode(bbP, &dataP->_union.other_l2_addr);
break;
default:
ERR("NO KNOWN VALUE FOR ENCODING CHOICE OF MIH_C_LINK_ADDR_T %d\n", dataP->choice);
printf("[MIH_C] ERROR NO KNOWN VALUE FOR ENCODING CHOICE OF MIH_C_LINK_ADDR_T %d\n", dataP->choice);
}
}
//-----------------------------------------------------------------------------
......@@ -133,7 +133,7 @@ inline void MIH_C_LINK_ADDR_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ADDR_T *dataP)
MIH_C_OTHER_L2_ADDR_decode(bbP, &dataP->_union.other_l2_addr);
break;
default:
ERR("NO KNOWN VALUE FOR DECODING CHOICE OF MIH_C_LINK_ADDR_T %d\n", dataP->choice);
printf("[MIH_C] ERROR NO KNOWN VALUE FOR DECODING CHOICE OF MIH_C_LINK_ADDR_T %d\n", dataP->choice);
}
}
......
......@@ -159,7 +159,7 @@ inline void MIH_C_QOS_PARAM_VAL_encode(Bit_Buffer_t* bbP, MIH_C_QOS_PARAM_VAL_T
case 4: MIH_C_PK_DELAY_JITTER_LIST_encode(bbP, &dataP->_union.pk_delay_jitter_list); break;
case 5: MIH_C_PK_LOSS_RATE_LIST_encode(bbP, &dataP->_union.pk_loss_rate_list); break;
default:
ERR("NO KNOWN VALUE FOR ENCODING CHOICE OF MIH_C_QOS_PARAM_VAL_T %d\n", dataP->choice);
printf("[MIH_C] ERROR NO KNOWN VALUE FOR ENCODING CHOICE OF MIH_C_QOS_PARAM_VAL_T %d\n", dataP->choice);
}
}
//-----------------------------------------------------------------------------
......@@ -174,7 +174,7 @@ inline void MIH_C_QOS_PARAM_VAL_decode(Bit_Buffer_t* bbP, MIH_C_QOS_PARAM_VAL_T
case 4: MIH_C_PK_DELAY_JITTER_LIST_decode(bbP, &dataP->_union.pk_delay_jitter_list); break;
case 5: MIH_C_PK_LOSS_RATE_LIST_decode(bbP, &dataP->_union.pk_loss_rate_list); break;
default:
ERR("NO KNOWN VALUE FOR DECODING CHOICE OF MIH_C_QOS_PARAM_VAL_T %d\n", dataP->choice);
printf("[MIH_C] ERROR NO KNOWN VALUE FOR DECODING CHOICE OF MIH_C_QOS_PARAM_VAL_T %d\n", dataP->choice);
}
}
......
......@@ -7,7 +7,6 @@
#include <arpa/inet.h>
//-----------------------------------------------------------------------------
#include "MIH_C_bit_buffer.h"
#include "MIH_C_log.h"
//-----------------------------------------------------------------------------
Bit_Buffer_t* new_BitBuffer_0(void)
//-----------------------------------------------------------------------------
......@@ -115,7 +114,7 @@ u_int32_t BitBuffer_read(Bit_Buffer_t* bbP, const unsigned int nb_bitsP)
//cout << dec << "BitBuffer_read(" << nb_bitsP << ")"<< endl;
if (BitBuffer_isCheckReadOverflowOK(bbP, nb_bitsP)) {
if (nb_bitsP > (sizeof(unsigned long)*8)) {
ERR("BitBuffer_read nb bits too large - must be <= sizeof(long int)*8");
printf("[MIH_C] ERROR BitBuffer_read nb bits too large - must be <= sizeof(long int)*8");
} else {
do {
data_l = data_l << 8;
......@@ -254,7 +253,7 @@ void BitBuffer_write8b(Bit_Buffer_t* bbP, u_int8_t valueP, unsigned int nb_bitsP
valueP = valueP & ((u_int8_t)(0xFF) >> (8 - nb_bitsP));
//std::cout << "BitBuffer_write char " << (u_int32_t)(valueP) << " " << nb_bitsP << " bits" << std::endl;
if (nb_bitsP > (sizeof(unsigned char)*8)) {
ERR("BitBuffer_write nb bits too large - must be <= sizeof(char)*8");
printf("[MIH_C] ERROR BitBuffer_write nb bits too large - must be <= sizeof(char)*8");
} else {
if (bbP->m_bit_mod_8_position == 0) {
if (nb_bitsP == (sizeof(unsigned char)*8)) {
......@@ -288,7 +287,7 @@ void BitBuffer_write16b(Bit_Buffer_t* bbP, u_int16_t valueP, unsigned int nb_bit
if (BitBuffer_isCheckWriteOverflowOK(bbP,nb_bitsP)) {
valueP = valueP & ((u_int16_t)(0xFFFF) >> (16 - nb_bitsP));
if (nb_bitsP > (sizeof (u_int16_t)*8)) {
ERR("BitBuffer_write nb bits too large - must be <= sizeof (short)*8");
printf("[MIH_C] ERROR BitBuffer_write nb bits too large - must be <= sizeof (short)*8");
} else {
if (nb_bitsP > 8) {
//BitBuffer_write8b(bbP,(u_int8_t)(valueP >> (8 - (16-nb_bitsP))), nb_bitsP - 8);
......@@ -308,7 +307,7 @@ void BitBuffer_writelittleendian16b(Bit_Buffer_t* bbP, u_int16_t valueP, unsigne
if (BitBuffer_isCheckWriteOverflowOK(bbP,nb_bitsP)) {
valueP = valueP & ((u_int16_t)(0xFFFF) >> (16 - nb_bitsP));
if (nb_bitsP > (sizeof (u_int16_t)*8)) {
ERR("BitBuffer_write nb bits too large - must be <= sizeof (short)*8");
printf("[MIH_C] ERROR BitBuffer_write nb bits too large - must be <= sizeof (short)*8");
} else {
if (nb_bitsP > 8) {
BitBuffer_write8(bbP,(u_int8_t)(valueP));
......@@ -328,7 +327,7 @@ void BitBuffer_write32b(Bit_Buffer_t* bbP, u_int32_t valueP, unsigned int nb_bit
if (BitBuffer_isCheckWriteOverflowOK(bbP,nb_bitsP)) {
valueP = valueP & ((u_int32_t)(0xFFFFFFFF) >> (32 - nb_bitsP));
if (nb_bitsP > (sizeof (u_int32_t)*8)) {
ERR("BitBuffer_write nb bits too large - must be <= sizeof (int)*8");
printf("[MIH_C] ERROR BitBuffer_write nb bits too large - must be <= sizeof (int)*8");
} else {
if (nb_bitsP > 24) {
//BitBuffer_write8b(bbP,(u_int8_t)(valueP >> (24 - (32-nb_bitsP))), nb_bitsP - 24);
......@@ -359,7 +358,7 @@ void BitBuffer_writelittleendian32b(Bit_Buffer_t* bbP, u_int32_t valueP, unsigne
if (BitBuffer_isCheckWriteOverflowOK(bbP,nb_bitsP)) {
valueP = valueP & ((u_int32_t)(0xFFFFFFFF) >> (32 - nb_bitsP));
if (nb_bitsP > (sizeof (u_int32_t)*8)) {
ERR("BitBuffer_write nb bits too large - must be <= sizeof (int)*8");
printf("[MIH_C] ERROR BitBuffer_write nb bits too large - must be <= sizeof (int)*8");
} else {
if (nb_bitsP > 24) {
BitBuffer_write8(bbP,(u_int8_t)(valueP));
......
......@@ -50,7 +50,7 @@ int MIH_C_Link_Header_Encode(Bit_Buffer_t* bbP, MIH_C_HEADER_T* headerP) {
BitBuffer_write8b (bbP, reserved, 4);
BitBuffer_write16b (bbP, headerP->transaction_id, 12);
BitBuffer_write16 (bbP, headerP->payload_length);
DEBUG_ENCODE("%s: version 0x%02X\n", __FUNCTION__, headerP->version);
/*DEBUG_ENCODE("%s: version 0x%02X\n", __FUNCTION__, headerP->version);
DEBUG_ENCODE("%s: ack_req 0x%02X\n", __FUNCTION__, headerP->ack_req);
DEBUG_ENCODE("%s: ack_rsp 0x%02X\n", __FUNCTION__, headerP->ack_rsp);
DEBUG_ENCODE("%s: uir 0x%02X\n", __FUNCTION__, headerP->uir);
......@@ -61,7 +61,7 @@ int MIH_C_Link_Header_Encode(Bit_Buffer_t* bbP, MIH_C_HEADER_T* headerP) {
DEBUG_ENCODE("%s: action_identifier 0x%04X\n", __FUNCTION__, headerP->action_identifier);
DEBUG_ENCODE("%s: reserved 0x%02X\n", __FUNCTION__, reserved);
DEBUG_ENCODE("%s: transaction_id 0x%04X\n", __FUNCTION__, headerP->transaction_id);
DEBUG_ENCODE("%s: payload_length 0x%02X\n", __FUNCTION__, headerP->payload_length);
DEBUG_ENCODE("%s: payload_length 0x%02X\n", __FUNCTION__, headerP->payload_length);*/
// may be check for validity of header field -> set MIH_HEADER_DECODE_FAILURE
if (BitBuffer_isCheckWriteOverflowOK(bbP, 0) == BIT_BUFFER_FALSE) {
......@@ -99,7 +99,7 @@ int MIH_C_Link_Header_Decode(Bit_Buffer_t* bbP, MIH_C_HEADER_T* headerP) {
headerP->transaction_id = (MIH_C_TRANSACTION_ID_T) BitBuffer_read(bbP, 12);
headerP->payload_length = (MIH_C_VARIABLE_PAYLOAD_LENGTH_T)BitBuffer_read16(bbP);
DEBUG_DECODE("%s: version 0x%02X\n", __FUNCTION__, headerP->version);
/*DEBUG_DECODE("%s: version 0x%02X\n", __FUNCTION__, headerP->version);
DEBUG_DECODE("%s: ack_req 0x%02X\n", __FUNCTION__, headerP->ack_req);
DEBUG_DECODE("%s: ack_rsp 0x%02X\n", __FUNCTION__, headerP->ack_rsp);
DEBUG_DECODE("%s: uir 0x%02X\n", __FUNCTION__, headerP->uir);
......@@ -110,7 +110,7 @@ int MIH_C_Link_Header_Decode(Bit_Buffer_t* bbP, MIH_C_HEADER_T* headerP) {
DEBUG_DECODE("%s: action_identifier 0x%04X\n", __FUNCTION__, headerP->action_identifier);
DEBUG_DECODE("%s: reserved 0x%02X\n", __FUNCTION__, reserved);
DEBUG_DECODE("%s: transaction_id 0x%04X\n", __FUNCTION__, headerP->transaction_id);
DEBUG_DECODE("%s: payload_length 0x%02X\n", __FUNCTION__, headerP->payload_length);
DEBUG_DECODE("%s: payload_length 0x%02X\n", __FUNCTION__, headerP->payload_length);*/
// may be check for validity of header field -> set MIH_HEADER_DECODE_FAILURE
if (BitBuffer_isCheckReadOverflowOK(bbP, 0) == BIT_BUFFER_FALSE) {
......
......@@ -5,6 +5,7 @@
***************************************************************************/
#define MIH_C_INTERFACE
#define MIH_C_LOG_C
/*
//-----------------------------------------------------------------------------
#include "MIH_C_log.h"
//-----------------------------------------------------------------------------
......@@ -35,7 +36,7 @@ int is_newline( char *str, int size){
if ( str[i] == '\n' )
return 1;
}
/* if we get all the way to here, there must not have been a newline! */
// if we get all the way to here, there must not have been a newline!
return 0;
}
......@@ -161,5 +162,5 @@ int MIH_C_log_exit(void) {
}
return 0;
}
*/
......@@ -23,7 +23,7 @@ int MIH_C_Link_Message_Decode_Link_Capability_Discover_request(Bit_Buffer_t* bbP
if (tlv == MIH_C_TLV_SOURCE_MIHF_ID) {
MIH_C_MIHF_ID_decode(bbP, &messageP->source);
} else {
ERR(" %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_SOURCE_MIHF_ID\n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_SOURCE_MIHF_ID\n", __FUNCTION__);
return MIH_MESSAGE_DECODE_FAILURE;
}
......@@ -33,25 +33,25 @@ int MIH_C_Link_Message_Decode_Link_Capability_Discover_request(Bit_Buffer_t* bbP
if (tlv == MIH_C_TLV_DESTINATION_MIHF_ID) {
MIH_C_MIHF_ID_decode(bbP, &messageP->destination);
} else {
ERR(" %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_DESTINATION_MIHF_ID\n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_DESTINATION_MIHF_ID\n", __FUNCTION__);
return MIH_MESSAGE_DECODE_FAILURE;
}
status = MIH_C_Link_Primitive_Decode_Link_Capability_Discover_request(bbP, &messageP->primitive);
if (status == MIH_PRIMITIVE_DECODE_OK) {
DEBUG(" %s() -> MIH_MESSAGE_DECODE_OK \n", __FUNCTION__);
printf("[MIH_C] %s() -> MIH_MESSAGE_DECODE_OK \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_OK;
}
if (status == MIH_PRIMITIVE_DECODE_TOO_SHORT) {
ERR(" %s() -> MIH_MESSAGE_DECODE_TOO_SHORT \n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_TOO_SHORT \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_TOO_SHORT;
}
if (status == MIH_PRIMITIVE_DECODE_FAILURE) {
ERR(" %s() -> MIH_MESSAGE_DECODE_FAILURE \n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_FAILURE \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_FAILURE;
}
if (status == MIH_PRIMITIVE_DECODE_BAD_PARAMETER) {
ERR(" %s() -> MIH_MESSAGE_DECODE_BAD_PARAMETER \n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_BAD_PARAMETER \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_BAD_PARAMETER;
}
return status;
......@@ -87,7 +87,7 @@ int MIH_C_Link_Message_Decode_Link_Event_Subscribe_request(Bit_Buffer_t* bbP, MI
if (tlv == MIH_C_TLV_SOURCE_MIHF_ID) {
MIH_C_MIHF_ID_decode(bbP, &messageP->source);
} else {
ERR(" %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_SOURCE_MIHF_ID\n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_SOURCE_MIHF_ID\n", __FUNCTION__);
return MIH_MESSAGE_DECODE_FAILURE;
}
......@@ -97,25 +97,25 @@ int MIH_C_Link_Message_Decode_Link_Event_Subscribe_request(Bit_Buffer_t* bbP, MI
if (tlv == MIH_C_TLV_DESTINATION_MIHF_ID) {
MIH_C_MIHF_ID_decode(bbP, &messageP->destination);
} else {
ERR(" %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_DESTINATION_MIHF_ID\n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_DESTINATION_MIHF_ID\n", __FUNCTION__);
return MIH_MESSAGE_DECODE_FAILURE;
}
status = MIH_C_Link_Primitive_Decode_Link_Event_Subscribe_request(bbP, &messageP->primitive);
if (status == MIH_PRIMITIVE_DECODE_OK) {
DEBUG(" %s() -> MIH_MESSAGE_DECODE_OK \n", __FUNCTION__);
printf("[MIH_C] %s() -> MIH_MESSAGE_DECODE_OK \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_OK;
}
if (status == MIH_PRIMITIVE_DECODE_TOO_SHORT) {
ERR(" %s() -> MIH_MESSAGE_DECODE_TOO_SHORT \n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_TOO_SHORT \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_TOO_SHORT;
}
if (status == MIH_PRIMITIVE_DECODE_FAILURE) {
ERR(" %s() -> MIH_MESSAGE_DECODE_FAILURE \n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_FAILURE \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_FAILURE;
}
if (status == MIH_PRIMITIVE_DECODE_BAD_PARAMETER) {
ERR(" %s() -> MIH_MESSAGE_DECODE_BAD_PARAMETER \n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_BAD_PARAMETER \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_BAD_PARAMETER;
}
return status;
......@@ -151,7 +151,7 @@ int MIH_C_Link_Message_Decode_Link_Event_Unsubscribe_request(Bit_Buffer_t* bbP,
if (tlv == MIH_C_TLV_SOURCE_MIHF_ID) {
MIH_C_MIHF_ID_decode(bbP, &messageP->source);
} else {
ERR(" %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_SOURCE_MIHF_ID\n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_SOURCE_MIHF_ID\n", __FUNCTION__);
return MIH_PRIMITIVE_DECODE_FAILURE;
}
......@@ -161,25 +161,25 @@ int MIH_C_Link_Message_Decode_Link_Event_Unsubscribe_request(Bit_Buffer_t* bbP,
if (tlv == MIH_C_TLV_DESTINATION_MIHF_ID) {
MIH_C_MIHF_ID_decode(bbP, &messageP->destination);
} else {
ERR(" %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_DESTINATION_MIHF_ID\n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_FAILURE @ MIH_C_TLV_DESTINATION_MIHF_ID\n", __FUNCTION__);
return MIH_PRIMITIVE_DECODE_FAILURE;
}
status = MIH_C_Link_Primitive_Decode_Link_Event_Unsubscribe_request(bbP, &messageP->primitive);
if (status == MIH_PRIMITIVE_DECODE_OK) {
DEBUG(" %s() -> MIH_MESSAGE_DECODE_OK \n", __FUNCTION__);
printf("[MIH_C] %s() -> MIH_MESSAGE_DECODE_OK \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_OK;
}
if (status == MIH_PRIMITIVE_DECODE_TOO_SHORT) {
ERR(" %s() -> MIH_MESSAGE_DECODE_TOO_SHORT \n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_TOO_SHORT \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_TOO_SHORT;
}
if (status == MIH_PRIMITIVE_DECODE_FAILURE) {
ERR(" %s() -> MIH_MESSAGE_DECODE_FAILURE \n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_FAILURE \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_FAILURE;
}
if (status == MIH_PRIMITIVE_DECODE_BAD_PARAMETER) {
ERR(" %s() -> MIH_MESSAGE_DECODE_BAD_PARAMETER \n", __FUNCTION__);
printf("[MIH_C] ERROR %s() -> MIH_MESSAGE_DECODE_BAD_PARAMETER \n", __FUNCTION__);
return MIH_MESSAGE_DECODE_BAD_PARAMETER;
}
return status;
......
......@@ -25,14 +25,14 @@ int MIH_C_Link_Primitive_Decode_Link_Event_Subscribe_request(Bit_Buffer_t* bbP,
MIH_C_LINK_EVENT_LIST_decode(bbP, &primitiveP->RequestedLinkEventList);
#if MIH_C_DEBUG_DESERIALIZATION
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_DETECTED) DEBUG("SUBSCRIBE_REQUEST LINK_DETECTED\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_UP) DEBUG("SUBSCRIBE_REQUEST LINK_UP\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_DOWN) DEBUG("SUBSCRIBE_REQUEST LINK_DOWN\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_PARAMETERS_REPORT) DEBUG("SUBSCRIBE_REQUEST LINK_PARAMETERS_REPORT\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_GOING_DOWN) DEBUG("SUBSCRIBE_REQUEST LINK_GOING_DOWN\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_HANDOVER_IMMINENT) DEBUG("SUBSCRIBE_REQUEST LINK_HANDOVER_IMMINENT\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_HANDOVER_COMPLETE) DEBUG("SUBSCRIBE_REQUEST LINK_HANDOVER_COMPLETE\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_PDU_TRANSMIT_STATUS) DEBUG("SUBSCRIBE_REQUEST LINK_PDU_TRANSMIT_STATUS\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_DETECTED) printf("SUBSCRIBE_REQUEST LINK_DETECTED\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_UP) printf("SUBSCRIBE_REQUEST LINK_UP\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_DOWN) printf("SUBSCRIBE_REQUEST LINK_DOWN\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_PARAMETERS_REPORT) printf("SUBSCRIBE_REQUEST LINK_PARAMETERS_REPORT\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_GOING_DOWN) printf("SUBSCRIBE_REQUEST LINK_GOING_DOWN\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_HANDOVER_IMMINENT) printf("SUBSCRIBE_REQUEST LINK_HANDOVER_IMMINENT\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_HANDOVER_COMPLETE) printf("SUBSCRIBE_REQUEST LINK_HANDOVER_COMPLETE\n");
if (primitiveP->RequestedLinkEventList & MIH_C_BIT_LINK_PDU_TRANSMIT_STATUS) printf("SUBSCRIBE_REQUEST LINK_PDU_TRANSMIT_STATUS\n");
#endif
if (BitBuffer_isCheckReadOverflowOK(bbP, 0) == BIT_BUFFER_TRUE) {
......
......@@ -39,7 +39,7 @@
#ifndef __MIH_C_H__
# define __MIH_C_H__
#include "MIH_C_bit_buffer.h"
#include "MIH_C_log.h"
#include "UTIL/LOG/log.h"
#include "MIH_C_Link_Constants.h"
#include "MIH_C_Types.h"
#include "MIH_C_header_codec.h"
......@@ -56,7 +56,7 @@
#include "MIH_C_primitive_codec.h"
#include "MIH_C_msg_codec.h"
void MIH_C_init(int log_outputP);
void MIH_C_init(void);
void MIH_C_exit(void);
#define DEBUG_TRACE_DETAILS
......
......@@ -35,7 +35,7 @@ Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis
* \bug
* \warning
*/
#error "To be removed"
#ifndef __MIH_C_LOG_H__
# define __MIH_C_LOG_H__
//-----------------------------------------------------------------------------
......
/*****************************************************************************
* Eurecom OpenAirInterface 3
* Copyright(c) 2012 Eurecom
*
* Source lteRALenb.h
*
* Version 0.1
*
* Date 11/18/2013
*
* Product MIH RAL LTE
*
* Subsystem RAL-LTE
*
* Authors Michelle Wetterwald, Lionel Gauthier, Frederic Maurel
*
* Description Header file to be included by any module that wants to interface with RAL ENB.
*
*****************************************************************************/
#ifndef __LTE_RAL_ENB_H__
#define __LTE_RAL_ENB_H__
#include "MIH_C.h"
#include "openair_types.h"
#include "platform_constants.h"
#include "platform_types.h"
#include "lteRALenb_constants.h"
#include "lteRALenb_variables.h"
#include "lteRALenb_action.h"
#include "lteRALenb_main.h"
#include "lteRALenb_mih_msg.h"
#include "lteRALenb_rrc_msg.h"
#include "lteRALenb_parameters.h"
#include "lteRALenb_process.h"
#include "lteRALenb_subscribe.h"
#include "lteRALenb_thresholds.h"
#endif
......@@ -26,9 +26,9 @@
* Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*
*******************************************************************************/
/*! \file eRALlte_action.h
/*! \file lteRALenb_action.h
* \brief
* \author BRIZZOLA Davide, GAUTHIER Lionel, MAUREL Frederic, WETTERWALD Michelle
* \author GAUTHIER Lionel, MAUREL Frederic, WETTERWALD Michelle
* \date 2012
* \version
* \note
......@@ -36,11 +36,26 @@
* \warning
*/
#ifndef __RAL_LTE_ACTION_H__
#define __RAL_LTE_ACTION_H__
#include "MIH_C_msg_codec.h"
#include "MIH_C_Link_Messages.h"
#ifndef __LTE_RAL_ENB_ACTION_H__
#define __LTE_RAL_ENB_ACTION_H__
//-----------------------------------------------------------------------------
# ifdef LTE_RAL_ENB_ACTION_C
# define private_lteralenb_action(x) x
# define protected_lteralenb_action(x) x
# define public_lteralenb_action(x) x
# else
# ifdef LTE_RAL_ENB
# define private_lteralenb_action(x)
# define protected_lteralenb_action(x) extern x
# define public_lteralenb_action(x) extern x
# else
# define private_lteralenb_action(x)
# define protected_lteralenb_action(x)
# define public_lteralenb_action(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include "lteRALenb.h"
/****************************************************************************/
/********************* G L O B A L C O N S T A N T S *******************/
......@@ -49,7 +64,37 @@
/****************************************************************************/
/************************ G L O B A L T Y P E S ************************/
/****************************************************************************/
#ifdef MIH_C_MEDIEVAL_EXTENSIONS
/*
* ---------------------------------------------------------------------------
* Flow identifier management:
* Radio Bearer data flows are identified by a source address, a destination
* address and a port number for a particular IP transport protocol (UDP,
* TCP). A private data structure is used to map upper-layer flow identifiers
* to lower-layer RB channel identifiers. It is handled by private functions.
* ---------------------------------------------------------------------------
*/
/* Structure of the destination data flow */
typedef struct Data_flow {
unsigned char addr[16]; // IP address
unsigned int l2id[2]; // L2 identifier
unsigned int port; // IP port identifier
int proto; // IP protocol
int cnxid; // Data flow identifier
}data_flow_t;
#define ACTION_MAX_FLOW ((RAL_MAX_MT)*(RAL_MAX_RB))
typedef struct eRAL_action_DataFlowList {
int n_flows;
data_flow_t flow [ACTION_MAX_FLOW];
int flow_id [ACTION_MAX_FLOW]; //added TEMP MW 23/05/13
} eRAL_action_DataFlowList_t;
private_lteralenb_action(eRAL_action_DataFlowList_t g_flows = {};)
#endif // MIH_C_MEDIEVAL_EXTENSIONS
/****************************************************************************/
/******************** G L O B A L V A R I A B L E S ********************/
/****************************************************************************/
......@@ -58,6 +103,16 @@
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
void eRALlte_action_request(MIH_C_Message_Link_Action_request_t* messageP);
protected_lteralenb_action(void eRAL_action_request (ral_enb_instance_t instanceP, MIH_C_Message_Link_Action_request_t* msgP);)
protected_lteralenb_action(int eRAL_action_save_flow_id (ral_enb_instance_t instanceP, MIH_C_FLOW_ID_T* flowId, int cnxid);)
private_lteralenb_action( int eRAL_action_set_channel_id (ral_enb_instance_t instanceP, MIH_C_FLOW_ID_T* flowId, int cnxid);)
private_lteralenb_action( int eRAL_action_get_channel_id (ral_enb_instance_t instanceP, MIH_C_FLOW_ID_T* flowId, int* cnxid);)
private_lteralenb_action( int eRAL_action_del_channel_id (ral_enb_instance_t instanceP, int fix);)
private_lteralenb_action( int eRAL_action_is_in_progress (ral_enb_instance_t instanceP, MIH_C_STATUS_T* status, MIH_C_LINK_AC_RESULT_T* ac_status, MIH_C_LINK_AC_TYPE_T action);)
#ifdef MIH_C_MEDIEVAL_EXTENSIONS
private_lteralenb_action( MIH_C_LINK_AC_RESULT_T eRAL_action_link_flow_attr(ral_enb_instance_t instanceP);)
private_lteralenb_action( MIH_C_LINK_AC_RESULT_T eRAL_action_link_activate_resources(ral_enb_instance_t instanceP);)
private_lteralenb_action( MIH_C_LINK_AC_RESULT_T eRAL_action_link_deactivate_resources(ral_enb_instance_t instanceP);)
#endif // MIH_C_MEDIEVAL_EXTENSIONS
#endif
......@@ -2,7 +2,7 @@
* Eurecom OpenAirInterface 3
* Copyright(c) 2012 Eurecom
*
* Source eRALlte_constants.h
* Source lteRALenb_constants.h
*
* Version 0.1
*
......@@ -18,8 +18,8 @@
* side.
*
*****************************************************************************/
#ifndef __RAL_LTE_CONS_H__
#define __RAL_LTE_CONS_H__
#ifndef __LTE_RAL_ENB_CONSTANTS_H__
#define __LTE_RAL_ENB_CONSTANTS_H__
#include <sys/types.h>
......@@ -28,23 +28,16 @@
/****************************************************************************/
//-----------------------------------------------------------------------------
#define DEFAULT_LOCAL_PORT_RAL "1235"
#define DEFAULT_REMOTE_PORT_MIHF "1025"
#define DEFAULT_IP_ADDRESS_MIHF "127.0.0.1"
#define DEFAULT_IP_ADDRESS_RAL "127.0.0.1"
#define DEFAULT_LINK_ID "link"
#define DEFAULT_MIHF_ID "mihf1"
#define DEFAULT_ADDRESS_3GPP "0335060080149150"
#define ENB_DEFAULT_LOCAL_PORT_RAL "1235"
#define ENB_DEFAULT_REMOTE_PORT_MIHF "1025"
#define ENB_DEFAULT_IP_ADDRESS_MIHF "127.0.0.1"
#define ENB_DEFAULT_IP_ADDRESS_RAL "127.0.0.1"
#define ENB_DEFAULT_LINK_ID_RAL "enb_lte_link"
#define ENB_DEFAULT_LINK_ADDRESS_RAL "060080149150"
#define ENB_DEFAULT_MIHF_ID "mihf_enb"
#define ENB_DEFAULT_ADDRESS_3GPP "0335060080149150"
#define DEFAULT_PLMN "208020"
#define DEFAULT_MCC "208" // France
#define DEFAULT_MNC "020" // Bouygues Telecom
//-----------------------------------------------------------------------------
#define MIH_C_RADIO_POLLING_INTERVAL_MICRO_SECONDS 50000
#define MIH_C_RADIO_POLLING_INTERVAL_SECONDS 0
//-----------------------------------------------------------------------------
// Constants for scenario
#define PREDEFINED_MIH_NETWORK_ID "eurecom"
......@@ -54,8 +47,4 @@
#define PREDEFINED_CLASSES_SERVICE_SUPPORTED 2
#define PREDEFINED_QUEUES_SUPPORTED 2
#define PREDEFINED_LINK_DETECTED_INDICATION_SIG_STRENGTH 5
#define PREDEFINED_LINK_DETECTED_INDICATION_SINR 45
#define PREDEFINED_LINK_DETECTED_INDICATION_LINK_DATA_RATE 1000
#endif
/*******************************************************************************
*
* Eurecom OpenAirInterface 3
* Copyright(c) 2012 Eurecom
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* The full GNU General Public License is included in this distribution in
* the file called "COPYING".
*
* Contact Information
* Openair Admin: openair_admin@eurecom.fr
* Openair Tech : openair_tech@eurecom.fr
* Forums : http://forums.eurecom.fsr/openairinterface
* Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*
*******************************************************************************/
/*! \file lteRALenb_main.h
* \brief
* \author GAUTHIER Lionel, MAUREL Frederic, WETTERWALD Michelle
* \date 2012
* \version
* \note
* \bug
* \warning
*/
#ifndef __LTE_RAL_ENB_MAIN_H__
#define __LTE_RAL_ENB_MAIN_H__
//-----------------------------------------------------------------------------
# ifdef LTE_RAL_ENB_MAIN_C
# define private_lteralenb_main(x) x
# define protected_lteralenb_main(x) x
# define public_lteralenb_main(x) x
# else
# ifdef LTE_RAL_ENB
# define private_lteralenb_main(x)
# define protected_lteralenb_main(x) extern x
# define public_lteralenb_main(x) extern x
# else
# define private_lteralenb_main(x)
# define protected_lteralenb_main(x)
# define public_lteralenb_main(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include "lteRALenb.h"
#include "commonDef.h"
#include "collection/hashtable/hashtable.h"
public_lteralenb_main(char* g_conf_enb_ral_listening_port;)
public_lteralenb_main(char* g_conf_enb_ral_ip_address;)
public_lteralenb_main(char* g_conf_enb_ral_link_id;)
public_lteralenb_main(char* g_conf_enb_ral_link_address;)
public_lteralenb_main(char* g_conf_enb_mihf_remote_port;)
public_lteralenb_main(char* g_conf_enb_mihf_ip_address;)
public_lteralenb_main(char* g_conf_enb_mihf_id;)
/*
* Radio Bearer data
*/
typedef struct ral_lte_channel {
u32 cnx_id;
u8 multicast;
// MIHF parameters ix=0 UPLINK, ix=1 DOWNLINK
u16 flowId[2];
u16 classId[2];
float resBitrate[2];
float meanBitrate[2];
float bktDepth[2];
float pkBitrate[2];
float MTU[2];
#if ! defined(ENABLE_USE_MME)
//IP driver parameters
u16 rbId;
u16 RadioQoSclass;
u16 dscpUL;
u16 dscpDL;
u16 nas_state;
u16 status;
#endif
}ral_lte_channel_t;
/*
* Mobile Terminal data
*/
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;
struct ral_lte_channel radio_channel[RAL_MAX_RB];
int num_rbs;
int num_class;
int nas_state;
int mt_state;
}ral_lte_mt_t;
/*
* Multicast data // TEMP MW A supprimer!!!!
*/
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];
}ral_lte_mcast_t;
/*
* RAL LTE internal data
*/
typedef struct lte_ral_enb_object {
//------------------------
// CONFIG PARAMETERS
//------------------------
char* ral_listening_port;
char* ral_ip_address;
char* ral_link_address;
char* mihf_remote_port;
char* mihf_ip_address;
char* link_id;
char* mihf_id;
MIH_C_LINK_MIHCAP_FLAG_T link_mihcap_flag; // hardcoded parameters
MIH_C_NET_CAPS_T net_caps;// hardcoded parameters
// provided by RRC with RRC_RAL_SYSTEM_CONFIGURATION_IND message
plmn_t plmn_id;
unsigned int cell_id:28;
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;
MIH_C_FLOW_ID_T pending_req_fid;
ral_lte_mt_t pending_mt;
int pending_mt_timer;
int pending_mt_flag;
ral_lte_mt_t mt[RAL_MAX_MT];
ral_lte_mcast_t mcast;
// measurements for MEDIEVAL project
//MIH_C_TIMER_INTERVAL_T measurement_timer_interval; // This timer value (ms) is used to set the interval between
// 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;
//int congestion_flag;
//int congestion_threshold;
//int measures_triggered_flag;
//int requested_period;
// MIH-INTERFACE data
int mih_sock_desc;
MIH_C_LINK_AC_TYPE_LIST_T mih_supported_link_action_list;
MIH_C_LINK_EVENT_LIST_T mih_supported_link_event_list;
MIH_C_LINK_CMD_LIST_T mih_supported_link_command_list;
MIH_C_LINK_EVENT_LIST_T mih_subscribe_req_event_list;
//LIST(MIH_C_LINK_CFG_PARAM, mih_link_cfg_param_thresholds);
// to tell what are the configured thresholds in mih_link_cfg_param_thresholds_list
//MIH_C_BOOLEAN_T active_mih_link_cfg_param_threshold[MIH_C_LINK_CFG_PARAM_LIST_LENGTH];
MIH_C_LINK_AC_TYPE_T pending_req_action;
MIH_C_STATUS_T pending_req_status;
MIH_C_LINK_AC_RESULT_T pending_req_ac_result;
MIH_C_TRANSACTION_ID_T pending_req_transaction_id;
hash_table_t *ue_htbl;
MIH_C_TRANSACTION_ID_T transaction_id;
char buffer[800];
} lte_ral_enb_object_t;
/* RAL LTE internal data */
protected_lteralenb_main(lte_ral_enb_object_t g_enb_ral_obj[MAX_MODULES];)
private_lteralenb_main(hash_table_t *g_enb_ral_fd2instance;)
private_lteralenb_main(void eRAL_get_IPv6_addr (const char* if_name);)
public_lteralenb_main( void eRAL_init_default_values (void);)
private_lteralenb_main(int eRAL_initialize (void);)
private_lteralenb_main(void eRAL_process_file_descriptors(struct epoll_event *events, int nb_events);)
public_lteralenb_main( void* eRAL_task (void *args_p);)
#endif
......@@ -26,9 +26,9 @@
* Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*
*******************************************************************************/
/*! \file eRALlte_parameters.h
/*! \file lteRALenb_parameters.h
* \brief
* \author BRIZZOLA Davide, GAUTHIER Lionel, MAUREL Frederic, WETTERWALD Michelle
* \author GAUTHIER Lionel, MAUREL Frederic, WETTERWALD Michelle
* \date 2012
* \version
* \note
......@@ -36,10 +36,26 @@
* \warning
*/
#ifndef __RAL_LTE_PARAMETERS_H__
#define __RAL_LTE_PARAMETERS_H__
#include "MIH_C.h"
#ifndef __LTE_RAL_ENB_PARAMETERS_H__
#define __LTE_RAL_ENB_PARAMETERS_H__
//-----------------------------------------------------------------------------
# ifdef LTE_RAL_ENB_PARAMETERS_C
# define private_lteralenb_parameters(x) x
# define protected_lteralenb_parameters(x) x
# define public_lteralenb_parameters(x) x
# else
# ifdef LTE_RAL_ENB
# define private_lteralenb_parameters(x)
# define protected_lteralenb_parameters(x) extern x
# define public_lteralenb_parameters(x) extern x
# else
# define private_lteralenb_parameters(x)
# define protected_lteralenb_parameters(x)
# define public_lteralenb_parameters(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include "lteRALenb.h"
/****************************************************************************/
/********************* G L O B A L C O N S T A N T S *******************/
......@@ -57,6 +73,6 @@
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
void eRALlte_get_parameters_request(MIH_C_Message_Link_Get_Parameters_request_t* messageP);
void eRAL_get_parameters_request(ral_enb_instance_t instanceP, MIH_C_Message_Link_Get_Parameters_request_t* messageP);
#endif
/*******************************************************************************
*
* Eurecom OpenAirInterface 3
* Copyright(c) 2012 Eurecom
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* The full GNU General Public License is included in this distribution in
* the file called "COPYING".
*
* Contact Information
* Openair Admin: openair_admin@eurecom.fr
* Openair Tech : openair_tech@eurecom.fr
* Forums : http://forums.eurecom.fsr/openairinterface
* Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*
*******************************************************************************/
/*! \file lteRALenb_process.h
* \brief
* \author GAUTHIER Lionel, MAUREL Frederic, WETTERWALD Michelle
* \date 2012
* \version
* \note
* \bug
* \warning
*/
#ifndef __LTE_RAL_ENB_PROCESS_H__
#define __LTE_RAL_ENB_PROCESS_H__
//-----------------------------------------------------------------------------
# ifdef LTE_RAL_ENB_PROCESS_C
# define private_lteralenb_process(x) x
# define protected_lteralenb_process(x) x
# define public_lteralenb_process(x) x
# else
# ifdef LTE_RAL_ENB
# define private_lteralenb_process(x)
# define protected_lteralenb_process(x) extern x
# define public_lteralenb_process(x) extern x
# else
# define private_lteralenb_process(x)
# define protected_lteralenb_process(x)
# define public_lteralenb_process(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include "lteRALenb.h"
protected_lteralenb_process(int eRAL_process_find_channel (ral_enb_instance_t instanceP, unsigned int cnxid, int* mt_ix, int* ch_ix);)
protected_lteralenb_process(int eRAL_process_find_new_channel (ral_enb_instance_t instanceP, int mt_ix);)
private_lteralenb_process( void eRAL_process_clean_channel (struct ral_lte_channel* channel);)
protected_lteralenb_process(char* eRAL_process_mt_addr_to_string (const unsigned char* ip_addr);)
protected_lteralenb_process(void eRAL_process_mt_addr_to_l2id (const unsigned char* mt_addr, unsigned int* l2id);)
private_lteralenb_process( int eRAL_process_cmp_mt_addr (const char* mt_addr, const char* l2id);)
protected_lteralenb_process(int eRAL_process_find_mt_by_addr (ral_enb_instance_t instanceP, const char* mt_addr);)
private_lteralenb_process( void eRAL_process_verify_pending_mt_status(ral_enb_instance_t instanceP);)
protected_lteralenb_process(int eRAL_process_map_qos (ral_enb_instance_t instanceP, int mt_ix, int ch_ix);)
private_lteralenb_process( void eRAL_process_waiting_RB (ral_enb_instance_t instanceP, int mt_ix);)
private_lteralenb_process( void eRAL_process_clean_pending_mt (ral_enb_instance_t instanceP);)
protected_lteralenb_process(void RAL_printInitStatus (ral_enb_instance_t instanceP);)
private_lteralenb_process( void RAL_NAS_measures_polling (ral_enb_instance_t instanceP);)
private_lteralenb_process( void RAL_NAS_report_congestion (ral_enb_instance_t instanceP, int ix);)
private_lteralenb_process( void RAL_NAS_measures_analyze (ral_enb_instance_t instanceP);)
#endif
......@@ -34,10 +34,11 @@
* \email: michelle.wetterwald@eurecom.fr, lionel.gauthier@eurecom.fr, frederic.maurel@eurecom.fr
*/
/*******************************************************************************/
#ifndef __RAL_LTE_PROTO_H__
#define __RAL_LTE_PROTO_H__
#ifndef __LTE_RAL_ENB_PROTO_H__
#define __LTE_RAL_ENB_PROTO_H__
#include "lteRALenb_variables.h"
# error "Remove inclusion"
//#include "lteRALenb_variables.h"
/****************************************************************************/
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
......@@ -45,34 +46,37 @@
* Functions defined in eRALlte_NAS.c
*/
void eRALlte_NAS_get_MTs_list(void);
int eRALlte_NAS_update_MTs_list(void);
//void eRALlte_NAS_get_MTs_list(void);
//int eRALlte_NAS_update_MTs_list(void);
int eRALlte_NAS_process_message(void);
int eRALlte_NAS_send_rb_establish_request(int mt_ix, int ch_ix);
int eRALlte_NAS_send_rb_release_request(int mt_ix, int ch_ix);
int eRALlte_NAS_send_measure_request(void);
//int eRALlte_NAS_process_message(void);
//int eRALlte_NAS_send_rb_establish_request(int mt_ix, int ch_ix);
//int eRALlte_NAS_send_rb_release_request(int mt_ix, int ch_ix);
//int eRALlte_NAS_send_measure_request(void);
#ifdef RAL_REALTIME
int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int mt_ix, int ch_ix);
#endif
//#ifdef RAL_REALTIME
//int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int mt_ix, int ch_ix);
//#endif
/*
* Functions defined in eRALlte_process.c
*/
int eRALlte_process_find_channel(unsigned int cnxid, int* mt_ix, int* ch_ix);
int eRALlte_process_find_new_channel(int mt_ix);
void eRALlte_process_clean_channel(struct ral_lte_channel* pchannel);
void eRALlte_process_verify_pending_mt_status(void);
char* eRALlte_process_mt_addr_to_string(const unsigned char* mt_addr);
void eRALlte_process_mt_addr_to_l2id(const unsigned char* mt_addr, unsigned int* l2id);
int eRALlte_process_cmp_mt_addr(const char* mt_addr, const char* l2id);
int eRALlte_process_find_mt_by_addr(const char* mt_addr);
int eRALlte_process_map_qos(int mt_ix, int ch_ix);
//int eRALlte_process_find_channel(unsigned int cnxid, int* mt_ix, int* ch_ix);
//int eRALlte_process_find_new_channel(int mt_ix);
//void eRALlte_process_clean_channel(struct ral_lte_channel* pchannel);
//void eRALlte_process_verify_pending_mt_status(void);
//char* eRALlte_process_mt_addr_to_string(const unsigned char* mt_addr);
//void eRALlte_process_mt_addr_to_l2id(const unsigned char* mt_addr, unsigned int* l2id);
//int eRALlte_process_cmp_mt_addr(const char* mt_addr, const char* l2id);
//int eRALlte_process_find_mt_by_addr(const char* mt_addr);
//int eRALlte_process_map_qos(int mt_ix, int ch_ix);
// MW Added
void RAL_printInitStatus(void);
void RAL_NAS_measures_polling(void);
void RAL_NAS_measures_analyze(void);
void RAL_NAS_report_congestion(int ix);
//void RAL_printInitStatus(void);
//void RAL_NAS_measures_polling(void);
//void RAL_NAS_measures_analyze(void);
//void RAL_NAS_report_congestion(int ix);
//void* ral_enb_task(void *args_p);
#endif
/*******************************************************************************
*
* Eurecom OpenAirInterface 3
* Copyright(c) 2012 Eurecom
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* The full GNU General Public License is included in this distribution in
* the file called "COPYING".
*
* Contact Information
* Openair Admin: openair_admin@eurecom.fr
* Openair Tech : openair_tech@eurecom.fr
* Forums : http://forums.eurecom.fsr/openairinterface
* Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*
*******************************************************************************/
/*! \file lteRALenb_rrc_msg.h
* \brief
* \author GAUTHIER Lionel
* \date 2013
* \version
* \note
* \bug
* \warning
*/
#ifndef __LTE_RAL_ENB_RRC_MSG_H__
#define __LTE_RAL_ENB_RRC_MSG_H__
//-----------------------------------------------------------------------------
# ifdef LTE_RAL_ENB_RRC_MSG_C
# define private_lteralenb_rrc_msg(x) x
# define protected_lteralenb_rrc_msg(x) x
# define public_lteralenb_rrc_msg(x) x
# else
# ifdef LTE_RAL_ENB
# define private_lteralenb_rrc_msg(x)
# define protected_lteralenb_rrc_msg(x) extern x
# define public_lteralenb_rrc_msg(x) extern x
# else
# define private_lteralenb_rrc_msg(x)
# define protected_lteralenb_rrc_msg(x)
# define public_lteralenb_rrc_msg(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include "lteRALenb.h"
#include "intertask_interface.h"
protected_lteralenb_rrc_msg(void eRAL_rx_rrc_ral_system_configuration_indication (instance_t instance, MessageDef *msg_p);)
protected_lteralenb_rrc_msg(void eRAL_rx_rrc_ral_connection_establishment_indication (instance_t instance, MessageDef *msg_p);)
protected_lteralenb_rrc_msg(void eRAL_rx_rrc_ral_connection_reestablishment_indication (instance_t instance, MessageDef *msg_p);)
protected_lteralenb_rrc_msg(void eRAL_rx_rrc_ral_connection_reconfiguration_indication (instance_t instance, MessageDef *msg_p);)
protected_lteralenb_rrc_msg(void eRAL_rx_rrc_ral_measurement_report_indication (instance_t instance, MessageDef *msg_p);)
protected_lteralenb_rrc_msg(void eRAL_rx_rrc_ral_connection_release_indication (instance_t instance, MessageDef *msg_p);)
#endif
......@@ -26,9 +26,9 @@
* Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*
*******************************************************************************/
/*! \file eRALlte_subscribe.h
/*! \file lteRALenb_subscribe.h
* \brief
* \author BRIZZOLA Davide, GAUTHIER Lionel, MAUREL Frederic, WETTERWALD Michelle
* \author GAUTHIER Lionel, MAUREL Frederic, WETTERWALD Michelle
* \date 2012
* \version
* \note
......@@ -36,10 +36,26 @@
* \warning
*/
#ifndef __RAL_LTE_SUBSCRIBE_H__
#define __RAL_LTE_SUBSCRIBE_H__
#include "MIH_C.h"
#ifndef __LTE_RAL_ENB_SUBSCRIBE_H__
#define __LTE_RAL_ENB_SUBSCRIBE_H__
//-----------------------------------------------------------------------------
# ifdef LTE_RAL_ENB_PROCESS_C
# define private_lteralenb_subscribe(x) x
# define protected_lteralenb_subscribe(x) x
# define public_lteralenb_subscribe(x) x
# else
# ifdef LTE_RAL_ENB
# define private_lteralenb_subscribe(x)
# define protected_lteralenb_subscribe(x) extern x
# define public_lteralenb_subscribe(x) extern x
# else
# define private_lteralenb_subscribe(x)
# define protected_lteralenb_subscribe(x)
# define public_lteralenb_subscribe(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include "lteRALenb.h"
/****************************************************************************/
/********************* G L O B A L C O N S T A N T S *******************/
......@@ -57,8 +73,8 @@
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
void eRALlte_subscribe_request(MIH_C_Message_Link_Event_Subscribe_request_t* msgP);
protected_lteralenb_subscribe(void eRAL_subscribe_request(ral_enb_instance_t instanceP, MIH_C_Message_Link_Event_Subscribe_request_t* msgP);)
void eRALlte_unsubscribe_request(MIH_C_Message_Link_Event_Unsubscribe_request_t* msgP);
protected_lteralenb_subscribe(void eRAL_unsubscribe_request(ral_enb_instance_t instanceP, MIH_C_Message_Link_Event_Unsubscribe_request_t* msgP);)
#endif
......@@ -26,9 +26,9 @@
* Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*
*******************************************************************************/
/*! \file eRALlte_thresholds.h
/*! \file lteRALenb_thresholds.h
* \brief
* \author BRIZZOLA Davide, GAUTHIER Lionel, MAUREL Frederic, WETTERWALD Michelle
* \author GAUTHIER Lionel, MAUREL Frederic, WETTERWALD Michelle
* \date 2012
* \version
* \note
......@@ -36,10 +36,27 @@
* \warning
*/
#ifndef __RAL_LTE_THRESHOLDS_H__
#define __RAL_LTE_THRESHOLDS_H__
#include "MIH_C.h"
#ifndef __LTE_RAL_ENB_THRESHOLDS_H__
#define __LTE_RAL_ENB_THRESHOLDS_H__
//-----------------------------------------------------------------------------
# ifdef LTE_RAL_ENB_PROCESS_C
# define private_lteralenb_thresholds(x) x
# define protected_lteralenb_thresholds(x) x
# define public_lteralenb_thresholds(x) x
# else
# ifdef LTE_RAL_ENB
# define private_lteralenb_thresholds(x)
# define protected_lteralenb_thresholds(x) extern x
# define public_lteralenb_thresholds(x) extern x
# else
# define private_lteralenb_thresholds(x)
# define protected_lteralenb_thresholds(x)
# define public_lteralenb_thresholds(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include "lteRALenb.h"
#include "intertask_interface.h"
/****************************************************************************/
/********************* G L O B A L C O N S T A N T S *******************/
......@@ -59,6 +76,7 @@
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
void eRALlte_configure_thresholds_request(MIH_C_Message_Link_Configure_Thresholds_request_t* messageP);
protected_lteralenb_thresholds(void eRAL_configure_thresholds_request(ral_enb_instance_t instanceP, MIH_C_Message_Link_Configure_Thresholds_request_t* messageP);)
protected_lteralenb_thresholds(void eRAL_rx_rrc_ral_configure_threshold_conf(instance_t instance, MessageDef *msg_p);)
#endif
......@@ -18,8 +18,8 @@
* the network side and the access router dummy configuration.
*
*****************************************************************************/
#ifndef __RAL_LTE_VAR_H__
#define __RAL_LTE_VAR_H__
#ifndef __LTE_RAL_ENB_VARIABLES_H__
#define __LTE_RAL_ENB_VARIABLES_H__
// Define working mode : Dummy or Realtime
//#define RAL_DUMMY
......@@ -31,14 +31,7 @@
//flag to reduce the logs
#define DEBUG_RAL_DETAILS
#include "rrc_d_types.h"
#ifdef RAL_DUMMY
#include "nas_rg_netlink.h"
#endif
#include "MIH_C_Types.h"
#include "MIH_C_header_codec.h"
#include "MIH_C_Link_Primitives.h"
/****************************************************************************/
/********************* G L O B A L C O N S T A N T S *******************/
......@@ -48,16 +41,16 @@
/*Arguments ioctl command
*/
//arg[0]
#define IO_OBJ_STATS 0
#define IO_OBJ_CNX 1
#define IO_OBJ_RB 2
#define IO_OBJ_MEAS 3
#define IO_OBJ_MC 4 // multicast
//LG#define IO_OBJ_STATS 0
//LG#define IO_OBJ_CNX 1
//LG#define IO_OBJ_RB 2
//LG#define IO_OBJ_MEAS 3
//LG#define IO_OBJ_MC 4 // multicast
//arg[1]
#define IO_CMD_ADD 0
#define IO_CMD_DEL 1
#define IO_CMD_LIST 2
//LG#define IO_CMD_ADD 0
//LG#define IO_CMD_DEL 1
//LG#define IO_CMD_LIST 2
#define NAS_CONNECTED 1 //same as NAS interface
#define NAS_DISCONNECTED 0
......@@ -139,6 +132,8 @@ const char DestIpv6Addr[ADDR_MAX][16] = { // DUMMY
extern const char DestIpv6Addr[ADDR_MAX][16];
#endif
typedef int ral_enb_instance_t;
/****************************************************************************/
/************************ G L O B A L T Y P E S ************************/
/****************************************************************************/
......@@ -146,117 +141,14 @@ extern const char DestIpv6Addr[ADDR_MAX][16];
/* List of link action types */
TYPEDEF_BITMAP8(MIH_C_LINK_AC_TYPE_LIST);
/*
* Radio Bearer data
*/
struct ral_lte_channel {
u32 cnx_id;
u8 multicast;
// MIHF parameters ix=0 UPLINK, ix=1 DOWNLINK
u16 flowId[2];
u16 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;
};
/*
* Mobile Terminal data
*/
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;
struct ral_lte_channel radio_channel[RAL_MAX_RB];
int num_rbs;
int num_class;
int nas_state;
int mt_state;
};
/*
* Multicast data // TEMP MW A supprimer!!!!
*/
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];
};
/*
* RAL LTE internal data
*/
struct ral_lte_priv {
u8 plmn[3];
int curr_cellId;
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;
MIH_C_FLOW_ID_T pending_req_fid;
struct ral_lte_mt pending_mt;
int pending_mt_timer;
int pending_mt_flag;
struct ral_lte_mt mt[RAL_MAX_MT];
struct ral_lte_mcast mcast;
// struct tqal_ar_mobile mt[TQAL_MAX_MTs];
// struct tqal_ar_channel multicast_channel;
// u8 mc_group_addr[16];
//Added for demo 3 - MW
int meas_polling_interval;
int meas_polling_counter;
u16 num_UEs;
u32 rlcBufferOccupancy[RAL_MAX_MT];
u32 scheduledPRB[RAL_MAX_MT];
u32 totalDataVolume[RAL_MAX_MT];
u32 totalNumPRBs;
int congestion_flag;
int congestion_threshold;
int measures_triggered_flag;
int requested_period;
// MIH-INTERFACE data
MIH_C_LINK_AC_TYPE_LIST_T mih_supported_link_action_list;
MIH_C_LINK_EVENT_LIST_T mih_supported_link_event_list;
MIH_C_LINK_CMD_LIST_T mih_supported_link_command_list;
MIH_C_LINK_EVENT_LIST_T mih_subscribe_req_event_list;
LIST(MIH_C_LINK_CFG_PARAM, mih_link_cfg_param_thresholds);
// to tell what are the configured thresholds in mih_link_cfg_param_thresholds_list
MIH_C_BOOLEAN_T active_mih_link_cfg_param_threshold[MIH_C_LINK_CFG_PARAM_LIST_LENGTH];
MIH_C_LINK_AC_TYPE_T pending_req_action;
MIH_C_STATUS_T pending_req_status;
MIH_C_LINK_AC_RESULT_T pending_req_ac_result;
MIH_C_TRANSACTION_ID_T pending_req_transaction_id;
char buffer[800];
};
/****************************************************************************/
/******************** G L O B A L V A R I A B L E S ********************/
/****************************************************************************/
extern struct ral_lte_priv *ralpriv;
//extern struct ral_lte_priv *ralpriv;
/****************************************************************************/
/****************** E X P O R T E D F U N C T I O N S ******************/
......
......@@ -9,9 +9,10 @@
#ifndef __RRC_DTYPES_H__
#define __RRC_DTYPES_H__
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
# error "Remove inclusion"
//typedef unsigned char u8;
//typedef unsigned short u16;
//typedef unsigned int u32;
#endif
......@@ -27,14 +27,14 @@ CFLAGS += -I$(NAS_DIR) -I$(RRC_DIR)
LDFLAGS = -L$(INTERFACE_DIR)/LIB -lmih_c-802.21 -lrt
ERAL_OBJS += $(SRC_DIR)/lteRALenb_main.o
ERAL_OBJS += $(SRC_DIR)/lteRALenb_mih_msg.o
ERAL_OBJS += $(SRC_DIR)/lteRALenb_rrc_msg.o
ERAL_OBJS += $(SRC_DIR)/lteRALenb_thresholds.o
ERAL_OBJS += $(SRC_DIR)/lteRALenb_parameters.o
ERAL_OBJS += $(SRC_DIR)/lteRALenb_action.o
ERAL_OBJS += $(SRC_DIR)/lteRALenb_subscribe.o
ERAL_OBJS += $(SRC_DIR)/lteRALenb_ioctl.o
ERAL_OBJS += $(SRC_DIR)/lteRALenb_process.o
ERAL_OBJS += $(SRC_DIR)/lteRALenb_main.o
OBJS = $(ERAL_OBJS)
......
......@@ -2,7 +2,7 @@
* Eurecom OpenAirInterface 3
* Copyright(c) 2012 Eurecom
*
* Source eRALlte_parameters.c
* Source eRAL_parameters.c
*
* Version 0.1
*
......@@ -17,10 +17,10 @@
* Description
*
*****************************************************************************/
#define LTE_RAL_ENB
#define LTE_RAL_ENB_PARAMETERS_C
#include "lteRALenb_parameters.h"
#include "lteRALenb_mih_msg.h"
#include "lteRALenb.h"
/****************************************************************************/
/****************** E X P O R T E D F U N C T I O N S ******************/
......@@ -28,7 +28,7 @@
/****************************************************************************
** **
** Name: eRALlte_get_parameters_request() **
** Name: eRAL_get_parameters_request() **
** **
** Description: Processes the Link_Get_Parameters.request message and **
** sends a LinK_Get_Parameters.confirm message to the MIHF. **
......@@ -41,14 +41,135 @@
** Others: None **
** **
***************************************************************************/
void eRALlte_get_parameters_request(MIH_C_Message_Link_Get_Parameters_request_t* msgP)
void eRAL_get_parameters_request(ral_enb_instance_t instanceP, MIH_C_Message_Link_Get_Parameters_request_t* messageP)
{
MIH_C_STATUS_T status = MIH_C_STATUS_SUCCESS;
MIH_C_STATUS_T status;
MIH_C_LINK_PARAM_LIST_T link_parameters_status_list;
MIH_C_LINK_STATES_RSP_LIST_T link_states_response_list;
MIH_C_LINK_DESC_RSP_LIST_T link_descriptors_response_list;
unsigned int link_index;
// SAVE REQUEST
// MAY BE MERGE REQUESTS ?
//memcpy(&g_link_cfg_param_thresholds_list, &messageP->primitive.LinkConfigureParameterList_list, sizeof(MIH_C_LINK_CFG_PARAM_LIST_T));
status = MIH_C_STATUS_SUCCESS;
for (link_index = 0;
link_index < messageP->primitive.LinkParametersRequest_list.length;
link_index++) {
//------------------------------------------------
// MIH_C_LINK_PARAM_LIST_T
//------------------------------------------------
memcpy(&link_parameters_status_list.val[link_index].link_param_type,
&messageP->primitive.LinkParametersRequest_list.val[link_index],
sizeof(MIH_C_LINK_PARAM_TYPE_T));
switch (messageP->primitive.LinkParametersRequest_list.val[link_index].choice) {
case MIH_C_LINK_PARAM_TYPE_CHOICE_GEN:
/*#define MIH_C_LINK_PARAM_GEN_DATA_RATE (MIH_C_LINK_PARAM_GEN_T)0
#define MIH_C_LINK_PARAM_GEN_SIGNAL_STRENGTH (MIH_C_LINK_PARAM_GEN_T)1
#define MIH_C_LINK_PARAM_GEN_SINR (MIH_C_LINK_PARAM_GEN_T)2
#define MIH_C_LINK_PARAM_GEN_THROUGHPUT (MIH_C_LINK_PARAM_GEN_T)3
#define MIH_C_LINK_PARAM_GEN_PACKET_ERROR_RATE (MIH_C_LINK_PARAM_GEN_T)4*/
link_parameters_status_list.val[link_index].choice = MIH_C_LINK_PARAM_CHOICE_LINK_PARAM_VAL;
link_parameters_status_list.val[link_index]._union.link_param_val = MIH_C_LINK_PARAM_GEN_SIGNAL_STRENGTH;
break;
case MIH_C_LINK_PARAM_TYPE_CHOICE_QOS:
/*
* \brief A type to represent QOS_LIST parameters.
* 0: Maximum number of differentiable classes of service supported.
* 1: Minimum packet transfer delay for all CoS, the minimum delay over a class
* population of interest.
* 2: Average packet transfer delay for all CoS, the arithmetic mean of the delay
* over a class population of interest. (See B.3.4)
* 3: Maximum packet transfer delay for all CoS, the maximum delay over a class
* population of interest.
* 4: Packet transfer delay jitter for all CoS, the standard deviation of the delay
* over a class population of interest. (See B.3.5.)
* 5: Packet loss rate for all CoS, the ratio between the number of frames that are
* transmitted but not received and the total number of frames transmitted over
* a class population of interest. (See B.3.2.)
* 6–255: (Reserved)
*/
link_parameters_status_list.val[link_index].choice = MIH_C_LINK_PARAM_CHOICE_QOS_PARAM_VAL;
link_parameters_status_list.val[link_index]._union.qos_param_val.choice = MIH_C_QOS_PARAM_VAL_CHOICE_AVG_PK_TX_DELAY;
link_parameters_status_list.val[link_index]._union.qos_param_val._union.avg_pk_tx_delay_list.length = 2; //??
link_parameters_status_list.val[link_index]._union.qos_param_val._union.avg_pk_tx_delay_list.val[0].cos_id = 2; //??
link_parameters_status_list.val[link_index]._union.qos_param_val._union.avg_pk_tx_delay_list.val[0].value = 20; //??
link_parameters_status_list.val[link_index]._union.qos_param_val._union.avg_pk_tx_delay_list.val[1].cos_id = 3; //??
link_parameters_status_list.val[link_index]._union.qos_param_val._union.avg_pk_tx_delay_list.val[2].value = 50; //??
break;
case MIH_C_LINK_PARAM_TYPE_CHOICE_LTE:
/*
#define MIH_C_LINK_PARAM_LTE_UE_RSRP 0
#define MIH_C_LINK_PARAM_LTE_UE_RSRQ 1
#define MIH_C_LINK_PARAM_LTE_UE_CQI 2
#define MIH_C_LINK_PARAM_LTE_AVAILABLE_BW 3
#define MIH_C_LINK_PARAM_LTE_PACKET_DELAY 4
#define MIH_C_LINK_PARAM_LTE_PACKET_LOSS_RATE 5
#define MIH_C_LINK_PARAM_LTE_L2_BUFFER_STATUS 6
#define MIH_C_LINK_PARAM_LTE_MOBILE_NODE_CAPABILITIES 7
#define MIH_C_LINK_PARAM_LTE_EMBMS_CAPABILITY 8
#define MIH_C_LINK_PARAM_LTE_JUMBO_FEASIBILITY 9
#define MIH_C_LINK_PARAM_LTE_JUMBO_SETUP_STATUS 10
#define MIH_C_LINK_PARAM_LTE_NUM_ACTIVE_EMBMS_RECEIVERS_PER_FLOW 11
*/
case MIH_C_LINK_PARAM_TYPE_CHOICE_GG:
case MIH_C_LINK_PARAM_TYPE_CHOICE_EDGE:
case MIH_C_LINK_PARAM_TYPE_CHOICE_ETH:
case MIH_C_LINK_PARAM_TYPE_CHOICE_802_11:
case MIH_C_LINK_PARAM_TYPE_CHOICE_C2K:
case MIH_C_LINK_PARAM_TYPE_CHOICE_FDD:
case MIH_C_LINK_PARAM_TYPE_CHOICE_HRPD:
case MIH_C_LINK_PARAM_TYPE_CHOICE_802_16:
case MIH_C_LINK_PARAM_TYPE_CHOICE_802_20:
case MIH_C_LINK_PARAM_TYPE_CHOICE_802_22:
default:
LOG_E(RAL_ENB, "%s TO DO CONTINUE PROCESSING LinkParametersRequest_list of \n", __FUNCTION__);
}
//------------------------------------------------
// MIH_C_LINK_STATES_RSP_LIST_T
//------------------------------------------------
if (messageP->primitive.LinkStatesRequest & MIH_C_BIT_LINK_STATES_REQ_OP_MODE) {
link_states_response_list.val[link_index].choice = 0;
link_states_response_list.val[link_index]._union.op_mode = MIH_C_OPMODE_NORMAL_MODE;
} else if (messageP->primitive.LinkStatesRequest & MIH_C_BIT_LINK_STATES_REQ_CHANNEL_ID) {
link_states_response_list.val[link_index].choice = 1;
link_states_response_list.val[link_index]._union.channel_id = PREDEFINED_CHANNEL_ID;
} else {
LOG_E(RAL_ENB, "%s Invalid LinkStatesRequest in MIH_C_Link_Get_Parameters_request\n", __FUNCTION__);
// DEFAULT VALUES
link_states_response_list.val[link_index].choice = 0;
link_states_response_list.val[link_index]._union.op_mode = MIH_C_OPMODE_NORMAL_MODE;
}
//------------------------------------------------
// MIH_C_LINK_DESC_RSP_LIST_T
//------------------------------------------------
if (messageP->primitive.LinkDescriptorsRequest & MIH_C_BIT_NUMBER_OF_CLASSES_OF_SERVICE_SUPPORTED) {
link_descriptors_response_list.val[link_index].choice = 0;
link_descriptors_response_list.val[link_index]._union.num_cos = PREDEFINED_CLASSES_SERVICE_SUPPORTED;
} else if (messageP->primitive.LinkDescriptorsRequest & MIH_C_BIT_NUMBER_OF_QUEUES_SUPPORTED) {
link_descriptors_response_list.val[link_index].choice = 1;
link_descriptors_response_list.val[link_index]._union.num_queue = PREDEFINED_QUEUES_SUPPORTED;
} else {
LOG_E(RAL_ENB, "%s Invalid LinkDescriptorsRequest in MIH_C_Link_Get_Parameters_request\n", __FUNCTION__);
// DEFAULT VALUES
link_descriptors_response_list.val[link_index].choice = 0;
link_descriptors_response_list.val[link_index]._union.num_cos = PREDEFINED_CLASSES_SERVICE_SUPPORTED;
}
}
link_parameters_status_list.length = messageP->primitive.LinkParametersRequest_list.length;
link_states_response_list.length = messageP->primitive.LinkParametersRequest_list.length;
link_descriptors_response_list.length = messageP->primitive.LinkParametersRequest_list.length;
/* Get parameters link command is not supported at the network side */
DEBUG(" Get Parameters request is not supported by the network\n");
eRALlte_send_get_parameters_confirm(&msgP->header.transaction_id,
&status, NULL, NULL, NULL);
LOG_D(RAL_ENB, " Get Parameters request is not supported by the network\n");
eRAL_send_get_parameters_confirm(instanceP, &messageP->header.transaction_id,
&status, NULL, NULL, NULL);
}
/****************************************************************************/
......
/*****************************************************************************
* Eurecom OpenAirInterface 3
* Copyright(c) 2012 Eurecom
*
* Source eRAL_subscribe.c
*
* Version 0.1
*
* Date 11/27/2013
*
* Product MIH RAL LTE
*
* Subsystem
*
* Authors Lionel Gauthier
*
* Description
*
*****************************************************************************/
#define LTE_RAL_ENB
#define LTE_RAL_ENB_RRC_MSG_C
#include "lteRALenb.h"
static int ueid2eui48(u8 *euiP, u8* ue_idP)
{
// inspired by linux-source-3.2.0/net/ipv6/addrconf.c
memcpy(euiP, ue_idP, 3);
memcpy(euiP + 5, ue_idP + 3, 3);
euiP[3] = 0xFF;
euiP[4] = 0xFE;
euiP[0] ^= 2;
return 0;
}
//---------------------------------------------------------------------------------------------------------------------
void eRAL_rx_rrc_ral_system_configuration_indication(instance_t instanceP, MessageDef *msg_p)
//---------------------------------------------------------------------------------------------------------------------
{
g_enb_ral_obj[instanceP].plmn_id = RRC_RAL_SYSTEM_CONFIGURATION_IND(msg_p).plmn_id;
g_enb_ral_obj[instanceP].cell_id = RRC_RAL_SYSTEM_CONFIGURATION_IND(msg_p).cell_id;
}
//---------------------------------------------------------------------------------------------------------------------
void eRAL_rx_rrc_ral_connection_establishment_indication(instance_t instanceP, MessageDef *msg_p)
//---------------------------------------------------------------------------------------------------------------------
{
MIH_C_LINK_TUPLE_ID_T link_tuple_id;
uint8_t ue_id_array[MIH_C_3GPP_ADDR_LENGTH];
uint8_t mn_link_addr[MIH_C_3GPP_ADDR_LENGTH];
uint64_t ue_id; //EUI-64
int i;
// The LINK_ID contains the MN LINK_ADDR
link_tuple_id.link_id.link_type = MIH_C_WIRELESS_LTE;
link_tuple_id.link_id.link_addr.choice = MIH_C_CHOICE_3GPP_ADDR;
memset(ue_id_array, 0, MIH_C_3GPP_ADDR_LENGTH);
#warning "TO DO FIX UE_ID TYPE in rrc_ral_connection_establishment_ind_t"
ue_id = (uint64_t)RRC_RAL_CONNECTION_ESTABLISHMENT_IND(msg_p).ue_id;
for (i = 0; i < MIH_C_3GPP_ADDR_LENGTH; i++) {
ue_id_array[MIH_C_3GPP_ADDR_LENGTH-1-i] = (ue_id & 0x00000000000000FF);
ue_id = ue_id >> 8;
}
ueid2eui48(mn_link_addr, ue_id_array);
MIH_C_3GPP_ADDR_set(&(link_tuple_id.link_id.link_addr._union._3gpp_addr), NULL, 8);
//The optional LINK_ADDR may contains a link address of PoA.
link_tuple_id.choice = MIH_C_LINK_TUPLE_ID_CHOICE_NULL;
eRAL_send_link_up_indication(instanceP, &g_enb_ral_obj[instanceP].transaction_id,
&link_tuple_id,
NULL, //MIH_C_LINK_ADDR_T *old_arP,(Optional) Old Access Router link address.
NULL, //MIH_C_LINK_ADDR_T *new_arP,(Optional) New Access Router link address.
NULL, //MIH_C_IP_RENEWAL_FLAG_T *flagP, (Optional) Indicates whether the MN needs to change IP Address in the new PoA.
NULL); //MIH_C_IP_MOB_MGMT_T *mobil_mngtP, (Optional) Indicates the type of Mobility Management Protocol supported by the new PoA.
g_enb_ral_obj[instanceP].transaction_id ++;
}
//---------------------------------------------------------------------------------------------------------------------
void eRAL_rx_rrc_ral_connection_reestablishment_indication(instance_t instance, MessageDef *msg_p)
//---------------------------------------------------------------------------------------------------------------------
{
#warning "TO DO ral_rx_rrc_ral_connection_reestablishment_indication"
}
//---------------------------------------------------------------------------------------------------------------------
void eRAL_rx_rrc_ral_connection_reconfiguration_indication(instance_t instance, MessageDef *msg_p)
//---------------------------------------------------------------------------------------------------------------------
{
}
//---------------------------------------------------------------------------------------------------------------------
void eRAL_rx_rrc_ral_measurement_report_indication(instance_t instance, MessageDef *msg_p)
//---------------------------------------------------------------------------------------------------------------------
{
}
//---------------------------------------------------------------------------------------------------------------------
void eRAL_rx_rrc_ral_connection_release_indication(instance_t instance, MessageDef *msg_p)
//---------------------------------------------------------------------------------------------------------------------
{
}
......@@ -2,7 +2,7 @@
* Eurecom OpenAirInterface 3
* Copyright(c) 2012 Eurecom
*
* Source eRALlte_subscribe.c
* Source eRAL_subscribe.c
*
* Version 0.1
*
......@@ -17,11 +17,9 @@
* Description
*
*****************************************************************************/
#include "lteRALenb_subscribe.h"
#include "lteRALenb_mih_msg.h"
#include "lteRALenb_variables.h"
#define LTE_RAL_ENB
#define LTE_RAL_ENB_SUBSCRIBE_C
#include "lteRALenb.h"
/****************************************************************************/
/****************** E X P O R T E D F U N C T I O N S ******************/
......@@ -29,7 +27,7 @@
/****************************************************************************
** **
** Name: eRALlte_subscribe_request() **
** Name: eRAL_subscribe_request() **
** **
** Description: Subscribes the MIH-F to receive specified link event **
** indications and sends Link Event Subscribe confirmation **
......@@ -43,35 +41,35 @@
** Others: ralpriv **
** **
***************************************************************************/
void eRALlte_subscribe_request(MIH_C_Message_Link_Event_Subscribe_request_t* msgP)
void eRAL_subscribe_request(ral_enb_instance_t instanceP, MIH_C_Message_Link_Event_Subscribe_request_t* msgP)
{
MIH_C_STATUS_T status = MIH_C_STATUS_REJECTED;
/* Check whether the action request is supported */
if (ralpriv->mih_supported_link_command_list & MIH_C_BIT_LINK_EVENT_SUBSCRIBE)
if (g_enb_ral_obj[instanceP].mih_supported_link_command_list & MIH_C_BIT_LINK_EVENT_SUBSCRIBE)
{
MIH_C_LINK_EVENT_LIST_T mih_subscribed_req_event_list;
MIH_C_LINK_EVENT_LIST_T mih_subscribed_req_event_list;
ralpriv->mih_subscribe_req_event_list |= (msgP->primitive.RequestedLinkEventList & ralpriv->mih_supported_link_event_list);
g_enb_ral_obj[instanceP].mih_subscribe_req_event_list |= (msgP->primitive.RequestedLinkEventList & g_enb_ral_obj[instanceP].mih_supported_link_event_list);
mih_subscribed_req_event_list = ralpriv->mih_subscribe_req_event_list & msgP->primitive.RequestedLinkEventList;
mih_subscribed_req_event_list = g_enb_ral_obj[instanceP].mih_subscribe_req_event_list & msgP->primitive.RequestedLinkEventList;
status = MIH_C_STATUS_SUCCESS;
status = MIH_C_STATUS_SUCCESS;
eRALlte_send_event_subscribe_confirm(&msgP->header.transaction_id,
&status,
&mih_subscribed_req_event_list);
eRAL_send_event_subscribe_confirm(instanceP, &msgP->header.transaction_id,
&status,
&mih_subscribed_req_event_list);
}
else
{
eRALlte_send_event_subscribe_confirm(&msgP->header.transaction_id,
&status,
NULL);
eRAL_send_event_subscribe_confirm(instanceP, &msgP->header.transaction_id,
&status,
NULL);
}
}
/****************************************************************************
** **
** Name: eRALlte_unsubscribe_request() **
** Name: eRAL_unsubscribe_request() **
** **
** Description: Unsubscribes the MIH-F to receive specified link event **
** indications and sends Link Event Unsubscribe confirmation **
......@@ -85,31 +83,31 @@ void eRALlte_subscribe_request(MIH_C_Message_Link_Event_Subscribe_request_t* msg
** Others: ralpriv **
** **
***************************************************************************/
void eRALlte_unsubscribe_request(MIH_C_Message_Link_Event_Unsubscribe_request_t* msgP)
void eRAL_unsubscribe_request(ral_enb_instance_t instanceP, MIH_C_Message_Link_Event_Unsubscribe_request_t* msgP)
{
MIH_C_STATUS_T status = MIH_C_STATUS_REJECTED;
/* Check whether the action request is supported */
if (ralpriv->mih_supported_link_command_list & MIH_C_BIT_LINK_EVENT_UNSUBSCRIBE)
if (g_enb_ral_obj[instanceP].mih_supported_link_command_list & MIH_C_BIT_LINK_EVENT_UNSUBSCRIBE)
{
MIH_C_LINK_EVENT_LIST_T mih_unsubscribed_req_event_list;
MIH_C_LINK_EVENT_LIST_T saved_req_event_list;
MIH_C_LINK_EVENT_LIST_T mih_unsubscribed_req_event_list;
MIH_C_LINK_EVENT_LIST_T saved_req_event_list;
saved_req_event_list = ralpriv->mih_subscribe_req_event_list;
saved_req_event_list = g_enb_ral_obj[instanceP].mih_subscribe_req_event_list;
ralpriv->mih_subscribe_req_event_list &= ~(msgP->primitive.RequestedLinkEventList & ralpriv->mih_supported_link_event_list);
mih_unsubscribed_req_event_list = ralpriv->mih_subscribe_req_event_list ^ saved_req_event_list;
g_enb_ral_obj[instanceP].mih_subscribe_req_event_list &= ~(msgP->primitive.RequestedLinkEventList & g_enb_ral_obj[instanceP].mih_supported_link_event_list);
mih_unsubscribed_req_event_list = g_enb_ral_obj[instanceP].mih_subscribe_req_event_list ^ saved_req_event_list;
status = MIH_C_STATUS_SUCCESS;
status = MIH_C_STATUS_SUCCESS;
eRALlte_send_event_unsubscribe_confirm(&msgP->header.transaction_id,
&status,
&mih_unsubscribed_req_event_list);
eRAL_send_event_unsubscribe_confirm(instanceP, &msgP->header.transaction_id,
&status,
&mih_unsubscribed_req_event_list);
}
else
{
eRALlte_send_event_unsubscribe_confirm(&msgP->header.transaction_id,
&status,
NULL);
eRAL_send_event_unsubscribe_confirm(instanceP, &msgP->header.transaction_id,
&status,
NULL);
}
}
......
/*****************************************************************************
* Eurecom OpenAirInterface 3
* Copyright(c) 2013 Eurecom
*
* Source lteRALue.h
*
* Version 0.1
*
* Date 11/27/2013
*
* Product MIH RAL LTE
*
* Subsystem RAL-LTE
*
* Authors Lionel Gauthier
*
* Description Header file to be included by any module that wants to interface with RAL UE.
*
*****************************************************************************/
#ifndef __LTE_RAL_UE_H__
#define __LTE_RAL_UE_H__
#include "MIH_C.h"
#include "openair_types.h"
#include "platform_constants.h"
#include "platform_types.h"
#include "lteRALue_constants.h"
#include "lteRALue_variables.h"
#include "lteRALue_main.h"
#include "lteRALue_action.h"
#include "lteRALue_mih_msg.h"
#include "lteRALue_rrc_msg.h"
#include "lteRALue_parameters.h"
//#include "lteRALue_process.h"
#include "lteRALue_subscribe.h"
#include "lteRALue_thresholds.h"
#endif
/*******************************************************************************
*
* Eurecom OpenAirInterface 3
* Copyright(c) 2013 Eurecom
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* The full GNU General Public License is included in this distribution in
* the file called "COPYING".
*
* Contact Information
* Openair Admin: openair_admin@eurecom.fr
* Openair Tech : openair_tech@eurecom.fr
* Forums : http://forums.eurecom.fsr/openairinterface
* Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*
*******************************************************************************/
/*! \file lteralue_action.h
* \brief
* \author GAUTHIER Lionel, MAUREL Frederic, WETTERWALD Michelle
* \date 2012
* \version
* \note
* \bug
* \warning
*/
#ifndef __LTE_RAL_UE_ACTION_H__
#define __LTE_RAL_UE_ACTION_H__
//-----------------------------------------------------------------------------
# ifdef LTE_RAL_UE_ACTION_C
# define private_lteralue_action(x) x
# define protected_lteralue_action(x) x
# define public_lteralue_action(x) x
# else
# ifdef LTE_RAL_UE
# define private_lteralue_action(x)
# define protected_lteralue_action(x) extern x
# define public_lteralue_action(x) extern x
# else
# define private_lteralue_action(x)
# define protected_lteralue_action(x)
# define public_lteralue_action(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include "lteRALue.h"
/****************************************************************************/
/********************* G L O B A L C O N S T A N T S *******************/
/****************************************************************************/
/****************************************************************************/
/************************ G L O B A L T Y P E S ************************/
/****************************************************************************/
#ifdef MIH_C_MEDIEVAL_EXTENSIONS
#endif // MIH_C_MEDIEVAL_EXTENSIONS
/****************************************************************************/
/******************** G L O B A L V A R I A B L E S ********************/
/****************************************************************************/
/****************************************************************************/
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
protected_lteralue_action(void mRAL_action_request(ral_ue_instance_t instanceP, MIH_C_Message_Link_Action_request_t* messageP);)
#endif
......@@ -34,21 +34,19 @@
* \email: michelle.wetterwald@eurecom.fr, lionel.gauthier@eurecom.fr, frederic.maurel@eurecom.fr
*/
/*******************************************************************************/
#ifndef __MRALLTE_CONSTANTS_H__
#define __MRALLTE_CONSTANTS_H__
#ifndef __LTERALUE_CONSTANTS_H__
#define __LTERALUE_CONSTANTS_H__
//-----------------------------------------------------------------------------
#define DEFAULT_LOCAL_PORT_RAL "1235"
#define DEFAULT_REMOTE_PORT_MIHF "1025"
#define DEFAULT_IP_ADDRESS_MIHF "127.0.0.1"
#define DEFAULT_IP_ADDRESS_RAL "127.0.0.1"
#define DEFAULT_LINK_ID "link" //"lte"
#define DEFAULT_MIHF_ID "mihf1"
#define UE_DEFAULT_LOCAL_PORT_RAL "1335"
#define UE_DEFAULT_REMOTE_PORT_MIHF "1125"
#define UE_DEFAULT_IP_ADDRESS_MIHF "127.0.0.1"
#define UE_DEFAULT_IP_ADDRESS_RAL "127.0.0.1"
#define UE_DEFAULT_LINK_ID_RAL "ue_lte_link"
#define UE_DEFAULT_LINK_ADDRESS_RAL "060080149150"
#define UE_DEFAULT_MIHF_ID "mihf_ue"
#define DEFAULT_ADDRESS_3GPP "0335060080149150"
#define DEFAULT_ADDRESS_eNB "0000000000000001"
//-----------------------------------------------------------------------------
#define MIH_C_RADIO_POLLING_INTERVAL_MICRO_SECONDS 50000
#define MIH_C_RADIO_POLLING_INTERVAL_SECONDS 0
//-----------------------------------------------------------------------------
// Constants for scenario
#define PREDEFINED_MIH_NETWORK_ID "eurecom"
......@@ -58,9 +56,4 @@
#define PREDEFINED_CLASSES_SERVICE_SUPPORTED 2
#define PREDEFINED_QUEUES_SUPPORTED 2
#define PREDEFINED_LINK_GOING_DOWN_INDICATION_SIG_STRENGTH 20
#define PREDEFINED_LINK_DETECTED_INDICATION_SIG_STRENGTH 10
#define PREDEFINED_LINK_DETECTED_INDICATION_SINR 45
#define PREDEFINED_LINK_DETECTED_INDICATION_LINK_DATA_RATE 1000
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -172,7 +172,7 @@ int RAL_process_NAS_message(int ioctl_obj, int ioctl_cmd, int ioctl_cellid){
ralpriv->pending_req_flag = 1;
DEBUG(" Connexion establishment pending: pending_req_flag %d\n",ralpriv->pending_req_flag);
}
//mRALlte_send_link_action_confirm(&ralpriv->pending_req_transaction_id, &ralpriv->pending_req_status, NULL, &ralpriv->pending_req_ac_result);
//mRAL_send_link_action_confirm(&ralpriv->pending_req_transaction_id, &ralpriv->pending_req_status, NULL, &ralpriv->pending_req_ac_result);
rc = 0;
}
break;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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