Merge remote-tracking branch 'origin/develop' into bugfix-48-L1L2signaling
Conflicts: openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c openair1/PHY/LTE_TRANSPORT/dlsch_coding.c openair1/SCHED/phy_procedures_lte_eNb.c openair2/LAYER2/MAC/config.c openair2/LAYER2/MAC/pre_processor.c openair2/LAYER2/openair2_proc.c openair2/RRC/LITE/rrc_eNB.c openair3/NAS/UE/API/USIM/usim_api.c openair3/NAS/UE/ESM/esm_ebr_context.c
This commit is contained in:
@@ -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) |
|
||||
|
||||
@@ -511,7 +511,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,
|
||||
|
||||
@@ -291,10 +291,11 @@ int usim_api_authenticate(const OctetString* rand_pP, const OctetString* autn_pP
|
||||
|
||||
u8 sqn_ms[USIM_API_SQNMS_SIZE];
|
||||
memset(sqn_ms, 0, USIM_API_SQNMS_SIZE);
|
||||
|
||||
//#define USIM_API_SQN_MS_SIZE 3
|
||||
printf("_usim_api_data.sqn_ms %p\n",_usim_api_data.sqn_ms);
|
||||
for (i = 0; i < USIM_API_SQNMS_SIZE; i++) {
|
||||
#warning "LG:BUG HERE TODO"
|
||||
//#warning "LG:BUG HERE TODO"
|
||||
printf("i %d: ((uint8_t*)(_usim_api_data.sqn_ms))[USIM_API_SQNMS_SIZE - i] %d\n",i, ((uint8_t*)(_usim_api_data.sqn_ms))[USIM_API_SQNMS_SIZE - i]);
|
||||
sqn_ms[USIM_API_SQNMS_SIZE - i] =
|
||||
((uint8_t*)(_usim_api_data.sqn_ms))[USIM_API_SQNMS_SIZE - i];
|
||||
|
||||
@@ -130,7 +130,7 @@ int emm_proc_status(unsigned int ueid, int emm_cause)
|
||||
emm_sap_t emm_sap;
|
||||
|
||||
emm_security_context_t *sctx = NULL;
|
||||
struct emm_data_context_s *ctx = NULL;
|
||||
//struct emm_data_context_s *ctx = NULL;
|
||||
|
||||
LOG_TRACE(INFO,"EMM-PROC - EMM status procedure requested");
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ int lowerlayer_data_req(unsigned int ueid, const OctetString *data)
|
||||
int rc;
|
||||
emm_sap_t emm_sap;
|
||||
emm_security_context_t *sctx = NULL;
|
||||
struct emm_data_context_s *ctx = NULL;
|
||||
//struct emm_data_context_s *ctx = NULL;
|
||||
|
||||
emm_sap.primitive = EMMAS_DATA_REQ;
|
||||
emm_sap.u.emm_as.u.data.guti = _emm_data.guti;
|
||||
|
||||
@@ -215,7 +215,7 @@ emm_fsm_state_t _emm_fsm_status[EMM_FSM_NB_UE_MAX];
|
||||
***************************************************************************/
|
||||
void emm_fsm_initialize(void)
|
||||
{
|
||||
int ueid;
|
||||
//int ueid;
|
||||
LOG_FUNC_IN;
|
||||
|
||||
_emm_fsm_status[0] = EMM_NULL;
|
||||
|
||||
@@ -114,6 +114,9 @@ int emm_reg_send(const emm_reg_t *msg)
|
||||
emm_reg_primitive_t primitive = msg->primitive;
|
||||
assert( (primitive > _EMMREG_START) && (primitive < _EMMREG_END));
|
||||
|
||||
/* avoid gcc warnings */
|
||||
(void)primitive;
|
||||
|
||||
/* Execute the EMM procedure */
|
||||
rc = emm_fsm_process(msg);
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ int esm_ebr_context_create(
|
||||
int bid = 0;
|
||||
esm_data_context_t *esm_ctx = NULL;
|
||||
esm_pdn_t *pdn = NULL;
|
||||
unsigned int ueid = 0;
|
||||
//unsigned int ueid = 0;
|
||||
|
||||
LOG_FUNC_IN;
|
||||
|
||||
@@ -212,7 +212,7 @@ int esm_ebr_context_create(
|
||||
{
|
||||
char *tmp = NULL;
|
||||
char ipv4_addr[INET_ADDRSTRLEN];
|
||||
char ipv6_addr[INET6_ADDRSTRLEN];
|
||||
//char ipv6_addr[INET6_ADDRSTRLEN];
|
||||
char *netmask = NULL;
|
||||
char broadcast[INET_ADDRSTRLEN];
|
||||
struct in_addr in_addr;
|
||||
@@ -221,7 +221,8 @@ int esm_ebr_context_create(
|
||||
|
||||
switch (pdn->type) {
|
||||
case NET_PDN_TYPE_IPV4V6:
|
||||
ipv6_addr[0] = pdn->ip_addr[4];
|
||||
//ipv6_addr[0] = pdn->ip_addr[4];
|
||||
/* TODO? */
|
||||
|
||||
// etc
|
||||
case NET_PDN_TYPE_IPV4:
|
||||
@@ -283,11 +284,14 @@ int esm_ebr_context_create(
|
||||
res = sprintf(command_line,
|
||||
"ifconfig oip1 %s netmask %s broadcast %s",
|
||||
ipv4_addr, netmask, broadcast);
|
||||
(void)res; /* avoid gcc warning "set but not used" */
|
||||
// AssertFatal((res > 0) && (res < 128),
|
||||
// "error in system command line");
|
||||
LOG_TRACE(INFO, "ESM-PROC - executing %s ",
|
||||
command_line);
|
||||
//system(command_line);
|
||||
|
||||
if (system(command_line)) ; /* TODO: what to do? */
|
||||
|
||||
break;
|
||||
|
||||
case NET_PDN_TYPE_IPV6:
|
||||
@@ -341,7 +345,7 @@ int esm_ebr_context_release(
|
||||
esm_pdn_t *pdn = NULL;
|
||||
esm_data_context_t *esm_ctx;
|
||||
|
||||
unsigned int ueid = 0;
|
||||
//unsigned int ueid = 0;
|
||||
|
||||
LOG_FUNC_IN;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
asn_enc_rval_t OCTET_STRING_encode_aper(asn_TYPE_descriptor_t *td, asn_per_constraints_t *cts, void *sptr, asn_per_outp_t *po) { asn_enc_rval_t er = { 0, 0, 0 }; (void)td; (void)cts; (void)sptr; (void)po; return er; }
|
||||
|
||||
+asn_comp_rval_t * OCTET_STRING_compare(asn_TYPE_descriptor_t *td1, void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2) { (void)td1; (void)sptr1; (void)td2; (void)sptr2; return 0; }
|
||||
+asn_comp_rval_t * OCTET_STRING_compare(asn_TYPE_descriptor_t *td1, const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2) { (void)td1; (void)sptr1; (void)td2; (void)sptr2; return 0; }
|
||||
+
|
||||
size_t xer_whitespace_span(const void *chunk_buf, size_t chunk_size) { (void)chunk_buf; (void)chunk_size; return 0; }
|
||||
--- libasn1compiler/asn1c_C.c 2015-12-08 14:39:33.366543533 +0100
|
||||
@@ -51,9 +51,9 @@
|
||||
+ if(HIDE_INNER_DEFS) OUT("_%d", expr->_type_unique_index);
|
||||
+ OUT("_compare(asn_TYPE_descriptor_t *td1,\n");
|
||||
+ INDENTED(
|
||||
+ OUT("\tvoid *structure1,\n");
|
||||
+ OUT("\tconst void *structure1,\n");
|
||||
+ OUT("\tasn_TYPE_descriptor_t *td2,\n");
|
||||
+ OUT("\tvoid *structure2) {\n");
|
||||
+ OUT("\tconst void *structure2) {\n");
|
||||
+ OUT("asn_comp_rval_t * res = NULL;\n");
|
||||
+ OUT("%s_%d_inherit_TYPE_descriptor(td1);\n",
|
||||
+ p, expr->_type_unique_index);
|
||||
@@ -142,8 +142,8 @@
|
||||
+typedef struct asn_comp_rval_s {
|
||||
+ enum COMPARE_ERR_CODE_e err_code;
|
||||
+ char *name; // e_S1ap_ProtocolIE_ID not available for all ASN1 use (RRC vs S1AP, X2AP)
|
||||
+ void *structure1;
|
||||
+ void *structure2;
|
||||
+ const void *structure1;
|
||||
+ const void *structure2;
|
||||
+ struct asn_comp_rval_s *next;
|
||||
+} asn_comp_rval_t;
|
||||
+
|
||||
@@ -234,7 +234,7 @@
|
||||
+
|
||||
+asn_comp_rval_t *
|
||||
+BOOLEAN_compare(asn_TYPE_descriptor_t *td1,
|
||||
+ void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2) {
|
||||
+ const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2) {
|
||||
+ const BOOLEAN_t *st1 = (const BOOLEAN_t *)sptr1;
|
||||
+ const BOOLEAN_t *st2 = (const BOOLEAN_t *)sptr2;
|
||||
+ asn_comp_rval_t *res = NULL;
|
||||
@@ -279,9 +279,9 @@
|
||||
+
|
||||
+typedef asn_comp_rval_t * (type_compare_f)(
|
||||
+ struct asn_TYPE_descriptor_s *type_descriptor1,
|
||||
+ void *struct_ptr1,
|
||||
+ const void *struct_ptr1,
|
||||
+ struct asn_TYPE_descriptor_s *type_descriptor2,
|
||||
+ void *struct_ptr2
|
||||
+ const void *struct_ptr2
|
||||
+);
|
||||
+
|
||||
+
|
||||
@@ -299,7 +299,7 @@
|
||||
}
|
||||
+
|
||||
+asn_comp_rval_t *
|
||||
+CHOICE_compare(asn_TYPE_descriptor_t *td1, void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2)
|
||||
+CHOICE_compare(asn_TYPE_descriptor_t *td1, const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2)
|
||||
+{
|
||||
+ asn_CHOICE_specifics_t *specs1 = (asn_CHOICE_specifics_t *)td1->specifics;
|
||||
+ asn_CHOICE_specifics_t *specs2 = (asn_CHOICE_specifics_t *)td2->specifics;
|
||||
@@ -392,14 +392,13 @@
|
||||
}
|
||||
--- skeletons/constr_SEQUENCE.c 2015-12-08 14:39:33.346543533 +0100
|
||||
+++ skeletons/constr_SEQUENCE.c 2015-12-08 10:39:52.442558000 +0100
|
||||
@@ -1761,3 +1761,66 @@
|
||||
@@ -1761,3 +1761,65 @@
|
||||
|
||||
_ASN_ENCODED_OK(er);
|
||||
}
|
||||
+
|
||||
+asn_comp_rval_t * SEQUENCE_compare(asn_TYPE_descriptor_t *td1, void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2) {
|
||||
+asn_comp_rval_t * SEQUENCE_compare(asn_TYPE_descriptor_t *td1, const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2) {
|
||||
+ int edx;
|
||||
+ int ret;
|
||||
+ asn_comp_rval_t *res = NULL;
|
||||
+ asn_comp_rval_t *res2 = NULL;
|
||||
+
|
||||
@@ -498,7 +497,7 @@
|
||||
}
|
||||
+
|
||||
+asn_comp_rval_t *
|
||||
+SET_compare(asn_TYPE_descriptor_t *td1, void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2)
|
||||
+SET_compare(asn_TYPE_descriptor_t *td1, const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2)
|
||||
+{
|
||||
+ int edx;
|
||||
+ asn_comp_rval_t *res = NULL;
|
||||
@@ -563,19 +562,18 @@
|
||||
* Some handy helpers. *
|
||||
--- skeletons/constr_SET_OF.c 2015-12-08 14:39:33.338543533 +0100
|
||||
+++ skeletons/constr_SET_OF.c 2015-12-08 10:45:54.466557000 +0100
|
||||
@@ -1039,3 +1039,55 @@
|
||||
@@ -1039,3 +1039,54 @@
|
||||
rv.consumed = 0;
|
||||
return rv;
|
||||
}
|
||||
+
|
||||
+asn_comp_rval_t *
|
||||
+SET_OF_compare(asn_TYPE_descriptor_t *td1, void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2)
|
||||
+SET_OF_compare(asn_TYPE_descriptor_t *td1, const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2)
|
||||
+{
|
||||
+ asn_TYPE_member_t *elm1 = td1->elements;
|
||||
+ asn_TYPE_member_t *elm2 = td2->elements;
|
||||
+ const asn_anonymous_set_ *list1 = _A_CSET_FROM_VOID(sptr1);
|
||||
+ const asn_anonymous_set_ *list2 = _A_CSET_FROM_VOID(sptr2);
|
||||
+ int ret;
|
||||
+ int i;
|
||||
+ asn_comp_rval_t *res = NULL;
|
||||
+ asn_comp_rval_t *res2 = NULL;
|
||||
@@ -667,10 +665,10 @@
|
||||
}
|
||||
+
|
||||
+asn_comp_rval_t *
|
||||
+ENUMERATED_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
|
||||
+ ENUMERATED_t *st1 = (ENUMERATED_t *)sptr1;
|
||||
+ ENUMERATED_t *st2 = (ENUMERATED_t *)sptr2;
|
||||
+ENUMERATED_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
|
||||
+ const ENUMERATED_t *st1 = (const ENUMERATED_t *)sptr1;
|
||||
+ const ENUMERATED_t *st2 = (const ENUMERATED_t *)sptr2;
|
||||
+ asn_comp_rval_t *res = NULL;
|
||||
+
|
||||
+ COMPARE_CHECK_ARGS(td1, td2, sptr1, sptr2, res)
|
||||
@@ -774,10 +772,10 @@
|
||||
|
||||
|
||||
+asn_comp_rval_t *
|
||||
+INTEGER_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
|
||||
+ INTEGER_t *st1 = (INTEGER_t *)sptr1;
|
||||
+ INTEGER_t *st2 = (INTEGER_t *)sptr2;
|
||||
+INTEGER_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
|
||||
+ const INTEGER_t *st1 = (const INTEGER_t *)sptr1;
|
||||
+ const INTEGER_t *st2 = (const INTEGER_t *)sptr2;
|
||||
+ asn_comp_rval_t *res = NULL;
|
||||
+
|
||||
+ COMPARE_CHECK_ARGS(td1, td2, sptr1, sptr2, res)
|
||||
@@ -857,8 +855,8 @@
|
||||
}
|
||||
+
|
||||
+asn_comp_rval_t *
|
||||
+NativeEnumerated_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
|
||||
+NativeEnumerated_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
|
||||
+ const asn_INTEGER_enum_map_t *a = sptr1;
|
||||
+ const asn_INTEGER_enum_map_t *b = sptr2;
|
||||
+ asn_comp_rval_t *res = NULL;
|
||||
@@ -902,8 +900,8 @@
|
||||
|
||||
+
|
||||
+asn_comp_rval_t *
|
||||
+NativeInteger_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
|
||||
+NativeInteger_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
|
||||
+ const long *native1 = (const long *)sptr1;
|
||||
+ const long *native2 = (const long *)sptr2;
|
||||
+ asn_comp_rval_t *res = NULL;
|
||||
@@ -945,10 +943,10 @@
|
||||
}
|
||||
|
||||
+asn_comp_rval_t *
|
||||
+NativeReal_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
|
||||
+ REAL_t *st1 = (REAL_t *)sptr1;
|
||||
+ REAL_t *st2 = (REAL_t *)sptr2;
|
||||
+NativeReal_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
|
||||
+ const REAL_t *st1 = (const REAL_t *)sptr1;
|
||||
+ const REAL_t *st2 = (const REAL_t *)sptr2;
|
||||
+ asn_comp_rval_t *res = NULL;
|
||||
+
|
||||
+ COMPARE_CHECK_ARGS(td1, td2, sptr1, sptr2, res)
|
||||
@@ -999,8 +997,8 @@
|
||||
}
|
||||
+
|
||||
+asn_comp_rval_t *
|
||||
+NULL_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
|
||||
+NULL_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
@@ -1068,9 +1066,9 @@
|
||||
|
||||
+asn_comp_rval_t *
|
||||
+OCTET_STRING_compare(asn_TYPE_descriptor_t *td1,
|
||||
+ void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2) {
|
||||
+ OCTET_STRING_t *st1 = (OCTET_STRING_t *)sptr1;
|
||||
+ OCTET_STRING_t *st2 = (OCTET_STRING_t *)sptr2;
|
||||
+ const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2) {
|
||||
+ const OCTET_STRING_t *st1 = (const OCTET_STRING_t *)sptr1;
|
||||
+ const OCTET_STRING_t *st2 = (const OCTET_STRING_t *)sptr2;
|
||||
+ asn_comp_rval_t *res = NULL;
|
||||
+
|
||||
+ COMPARE_CHECK_ARGS(td1, td2, sptr1, sptr2, res)
|
||||
@@ -1134,10 +1132,10 @@
|
||||
+
|
||||
+
|
||||
+asn_comp_rval_t *
|
||||
+REAL_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
|
||||
+ REAL_t *st1 = (REAL_t *)sptr1;
|
||||
+ REAL_t *st2 = (REAL_t *)sptr2;
|
||||
+REAL_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
|
||||
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
|
||||
+ const REAL_t *st1 = (const REAL_t *)sptr1;
|
||||
+ const REAL_t *st2 = (const REAL_t *)sptr2;
|
||||
+ asn_comp_rval_t *res = NULL;
|
||||
+
|
||||
+ COMPARE_CHECK_ARGS(td1, td2, sptr1, sptr2, res)
|
||||
|
||||
@@ -859,11 +859,12 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
|
||||
|
||||
break;
|
||||
|
||||
#warning "TODO mapping mme_ue_s1ap_id enb_ue_s1ap_id?"
|
||||
//#warning "TODO mapping mme_ue_s1ap_id enb_ue_s1ap_id?"
|
||||
|
||||
case S1ap_UE_S1AP_IDs_PR_mME_UE_S1AP_ID:
|
||||
mme_ue_s1ap_id = ueContextReleaseCommand_p->uE_S1AP_IDs.choice.mME_UE_S1AP_ID;
|
||||
S1AP_ERROR("TO DO mapping mme_ue_s1ap_id enb_ue_s1ap_id");
|
||||
(void)mme_ue_s1ap_id; /* TODO: remove - it's to remove gcc warning about unused var */
|
||||
|
||||
case S1ap_UE_S1AP_IDs_PR_NOTHING:
|
||||
default:
|
||||
|
||||
@@ -191,7 +191,7 @@ int s1ap_eNB_handle_nas_first_req(
|
||||
* The cell identity is defined on 28 bits but as we use macro enb id,
|
||||
* we have to pad.
|
||||
*/
|
||||
#warning "TODO get cell id from RRC"
|
||||
//#warning "TODO get cell id from RRC"
|
||||
MACRO_ENB_ID_TO_CELL_IDENTITY(instance_p->eNB_id,
|
||||
0, // Cell ID
|
||||
&initial_ue_message_p->eutran_cgi.cell_ID);
|
||||
@@ -400,7 +400,7 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_
|
||||
s1ap_eNB_instance_p->mnc_digit_length,
|
||||
&uplink_NAS_transport_p->eutran_cgi.pLMNidentity);
|
||||
|
||||
#warning "TODO get cell id from RRC"
|
||||
//#warning "TODO get cell id from RRC"
|
||||
MACRO_ENB_ID_TO_CELL_IDENTITY(s1ap_eNB_instance_p->eNB_id,
|
||||
0,
|
||||
&uplink_NAS_transport_p->eutran_cgi.cell_ID);
|
||||
|
||||
@@ -148,7 +148,7 @@ sctp_handle_new_association_req(
|
||||
DevAssert(sctp_new_association_req_p != NULL);
|
||||
|
||||
/* Create new socket with IPv6 affinity */
|
||||
#warning "SCTP may Force IPv4 only, here"
|
||||
//#warning "SCTP may Force IPv4 only, here"
|
||||
#ifdef NO_VIRTUAL_MACHINE
|
||||
|
||||
// in init chunk appears a list of host addresses, IPv4 and IPv4 in an arbitrary (unsorted) order
|
||||
|
||||
@@ -49,7 +49,7 @@ int nas_stream_encrypt_eea1(nas_stream_cipher_t *stream_cipher, uint8_t *out)
|
||||
int n ;
|
||||
int i = 0;
|
||||
uint32_t zero_bit = 0;
|
||||
uint32_t byte_length;
|
||||
//uint32_t byte_length;
|
||||
uint32_t *KS;
|
||||
uint32_t K[4],IV[4];
|
||||
|
||||
@@ -60,7 +60,7 @@ int nas_stream_encrypt_eea1(nas_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;
|
||||
//byte_length = stream_cipher->blength >> 3;
|
||||
|
||||
memset(&snow_3g_context, 0, sizeof(snow_3g_context));
|
||||
/*Initialisation*/
|
||||
|
||||
@@ -112,6 +112,7 @@ int nas_stream_encrypt_eia2(nas_stream_cipher_t *stream_cipher, uint8_t out[4])
|
||||
cmac_ctx = CMAC_CTX_new();
|
||||
ret = CMAC_Init(cmac_ctx, stream_cipher->key, stream_cipher->key_length, cipher, NULL);
|
||||
ret = CMAC_Update(cmac_ctx, m, m_length + 8);
|
||||
(void)ret; /* avoid gcc warning "set but not used" */
|
||||
CMAC_Final(cmac_ctx, data, &size);
|
||||
CMAC_CTX_free(cmac_ctx);
|
||||
|
||||
|
||||
@@ -300,8 +300,8 @@ void *udp_eNB_task(void *args_p)
|
||||
int nb_events;
|
||||
struct epoll_event *events;
|
||||
MessageDef *received_message_p = NULL;
|
||||
const char *msg_name = NULL;
|
||||
instance_t instance = 0;
|
||||
//const char *msg_name = NULL;
|
||||
//instance_t instance = 0;
|
||||
udp_enb_init(NULL);
|
||||
|
||||
itti_mark_task_ready(TASK_UDP);
|
||||
@@ -316,8 +316,8 @@ void *udp_eNB_task(void *args_p)
|
||||
|
||||
if (received_message_p != NULL) {
|
||||
|
||||
msg_name = ITTI_MSG_NAME (received_message_p);
|
||||
instance = ITTI_MSG_INSTANCE (received_message_p);
|
||||
//msg_name = ITTI_MSG_NAME (received_message_p);
|
||||
//instance = ITTI_MSG_INSTANCE (received_message_p);
|
||||
|
||||
switch (ITTI_MSG_ID(received_message_p)) {
|
||||
case UDP_INIT: {
|
||||
|
||||
Reference in New Issue
Block a user