Commit 5f29a4e5 authored by Javier Morgade's avatar Javier Morgade

Code cleanup

	-Removing unused files

	ACKNOWLEDGEMENT:
 	1. This commit was developed at Vicomtech (https://www.vicomtech.org) under UE project CDN-X-ALL: "CDN edge-cloud computing for efficient cache and reliable streaming aCROSS Aggregated unicast-multicast LinkS"
 	2. Project funded by Fed4FIRE+ OC5 (https://www.fed4fire.eu)
Signed-off-by: default avatarJavier Morgade <javier.morgade@ieee.org>
parent cad6e8a2
...@@ -193,74 +193,8 @@ int eNB_handle_MBMS_SCHEDULING_INFORMATION(instance_t instance, ...@@ -193,74 +193,8 @@ int eNB_handle_MBMS_SCHEDULING_INFORMATION(instance_t instance,
//xer_fprint(stdout, &asn_DEF_M2AP_MBSFN_Area_Configuration_List, &ie->value.choice.MBSFN_Area_Configuration_List); //xer_fprint(stdout, &asn_DEF_M2AP_MBSFN_Area_Configuration_List, &ie->value.choice.MBSFN_Area_Configuration_List);
} }
//asn_DEF_M2AP_MBSFN_Area_Configuration_List
// void * sptr = (void*)&ie->value.choice.MBSFN_Area_Configuration_List;
// asn_TYPE_descriptor_t * td = &asn_DEF_M2AP_MBSFN_Area_Configuration_List;
// asn_enc_rval_t er;
// const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics;
// const asn_TYPE_member_t *elm = td->elements;
// const asn_anonymous_sequence_ *list = _A_CSEQUENCE_FROM_VOID(sptr);
// const char *mname = specs->as_XMLValueList
// ? 0
// : ((*elm->name) ? elm->name : elm->type->xml_tag);
// size_t mlen = mname ? strlen(mname) : 0;
// //int xcan = (flags & XER_F_CANONICAL);
// //int i;
// if(!sptr) ASN__ENCODE_FAILED;
// er.encoded = 0;
// for(i = 0; i < list->count; i++) {
// asn_enc_rval_t tmper;
// void *memb_ptr = list->array[i];
// if(!memb_ptr) continue;
// if(mname) {
// //if(!xcan) ASN__TEXT_INDENT(1, ilevel);
// //ASN__CALLBACK3("<", 1, mname, mlen, ">", 1);
// }
// tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, ilevel + 1,
// flags, cb, app_key);
// if(tmper.encoded == -1) return tmper;
// er.encoded += tmper.encoded;
// if(tmper.encoded == 0 && specs->as_XMLValueList) {
// const char *name = elm->type->xml_tag;
// size_t len = strlen(name);
// //if(!xcan) ASN__TEXT_INDENT(1, ilevel + 1);
// //ASN__CALLBACK3("<", 1, name, len, "/>", 2);
// }
// if(mname) {
// ASN__CALLBACK3("</", 2, mname, mlen, ">", 1);
// }
// }
//M2AP_FIND_PROTOCOLIE_BY_ID(M2AP_MBSFN_Area_Configuration_Item_t, &ie->value.choice.MBSFN_Area_Configuration_List.list, container2,M2AP_ProtocolIE_ID_id_PMCH_Configuration_List ,true);
//printf("count %d\n",((M2AP_MBSFN_Area_Configuration_Item_t*)ie->value.choice.MBSFN_Area_Configuration_List.list.array[0])->value.choice.PMCH_Configuration_List.list.count);
// M2AP_FIND_PROTOCOLIE_BY_ID(M2AP_M2SetupRequest_Ies_t, ie, container,
// M2AP_ProtocolIE_ID_id_GlobalEND_ID, true);
//itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p2);
itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), message_p); itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
// if(1){
// printf("m2ap_enb_data_g->assoc_id %d %d\n",m2ap_enb_data_g->assoc_id,assoc_id);
// eNB_send_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance,NULL);
// }else
// //eNB_send_MBMS_SESSION_START_FAILURE(instance,assoc_id);
return 0; return 0;
} }
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file m3ap_eNB_decoder.c
* \brief m3ap decoder procedures for eNB
* \author Javier Morgade <javier.morgade@ieee.org>
* \date 2019
* \version 0.1
*/
#include <stdio.h>
#include "assertions.h"
#include "intertask_interface.h"
#include "m3ap_common.h"
#include "m3ap_eNB_decoder.h"
static int m3ap_eNB_decode_initiating_message(M3AP_M3AP_PDU_t *pdu)
{
DevAssert(pdu != NULL);
switch(pdu->choice.initiatingMessage.procedureCode) {
case M3AP_ProcedureCode_id_m3Setup:
//asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_M3AP_M3AP_PDU, pdu);
M3AP_INFO("m3ap_eNB_decode_initiating_message!\n");
break;
// case M3AP_ProcedureCode_id_handoverPreparation:
// //asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_M3AP_M3AP_PDU, pdu);
// M3AP_INFO("m3ap_eNB_decode_initiating_message!\n");
// break;
//
// case M3AP_ProcedureCode_id_uEContextRelease:
// //asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_M3AP_M3AP_PDU, pdu);
// M3AP_INFO("m3ap_eNB_decode_initiating_message!\n");
// break;
//
// case M3AP_ProcedureCode_id_handoverCancel:
// //asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_M3AP_M3AP_PDU, pdu);
// M3AP_INFO("m3ap_eNB_decode_initiating_message!\n");
// break;
//
default:
M3AP_ERROR("Unknown procedure ID (%d) for initiating message\n",
(int)pdu->choice.initiatingMessage.procedureCode);
AssertFatal( 0, "Unknown procedure ID (%d) for initiating message\n",
(int)pdu->choice.initiatingMessage.procedureCode);
return -1;
}
return 0;
}
static int m3ap_eNB_decode_successful_outcome(M3AP_M3AP_PDU_t *pdu)
{
DevAssert(pdu != NULL);
switch(pdu->choice.successfulOutcome.procedureCode) {
case M3AP_ProcedureCode_id_m3Setup:
//asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_M3AP_M3AP_PDU, pdu);
M3AP_INFO("m3ap_eNB_decode_successfuloutcome_message!\n");
break;
// case M3AP_ProcedureCode_id_handoverPreparation:
// //asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_M3AP_M3AP_PDU, pdu);
// M3AP_INFO("m3ap_eNB_decode_successfuloutcome_message!\n");
// break;
//
default:
M3AP_ERROR("Unknown procedure ID (%d) for successfull outcome message\n",
(int)pdu->choice.successfulOutcome.procedureCode);
return -1;
}
return 0;
}
static int m3ap_eNB_decode_unsuccessful_outcome(M3AP_M3AP_PDU_t *pdu)
{
DevAssert(pdu != NULL);
switch(pdu->choice.unsuccessfulOutcome.procedureCode) {
case M3AP_ProcedureCode_id_m3Setup:
//asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_M3AP_M3AP_PDU, pdu);
M3AP_INFO("m3ap_eNB_decode_unsuccessfuloutcome_message!\n");
break;
default:
M3AP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
(int)pdu->choice.unsuccessfulOutcome.procedureCode);
return -1;
}
return 0;
}
int m3ap_eNB_decode_pdu(M3AP_M3AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t length)
{
asn_dec_rval_t dec_ret;
DevAssert(buffer != NULL);
dec_ret = aper_decode(NULL,
&asn_DEF_M3AP_M3AP_PDU,
(void **)&pdu,
buffer,
length,
0,
0);
if (asn1_xer_print) {
xer_fprint(stdout, &asn_DEF_M3AP_M3AP_PDU, pdu);
}
if (dec_ret.code != RC_OK) {
M3AP_ERROR("Failed to decode pdu\n");
return -1;
}
switch(pdu->present) {
case M3AP_M3AP_PDU_PR_initiatingMessage:
return m3ap_eNB_decode_initiating_message(pdu);
case M3AP_M3AP_PDU_PR_successfulOutcome:
return m3ap_eNB_decode_successful_outcome(pdu);
case M3AP_M3AP_PDU_PR_unsuccessfulOutcome:
return m3ap_eNB_decode_unsuccessful_outcome(pdu);
default:
M3AP_DEBUG("Unknown presence (%d) or not implemented\n", (int)pdu->present);
break;
}
return -1;
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file m3ap_eNB_decoder.h
* \brief m3ap decoder procedures for eNB
* \author Konstantinos Alexandris <Konstantinos.Alexandris@eurecom.fr>, Cedric Roux <Cedric.Roux@eurecom.fr>, Navid Nikaein <Navid.Nikaein@eurecom.fr>
* \date 2018
* \version 1.0
*/
#ifndef M3AP_ENB_DECODER_H_
#define M3AP_ENB_DECODER_H_
int m3ap_eNB_decode_pdu(M3AP_M3AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t length)
__attribute__ ((warn_unused_result));
#endif /* M3AP_ENB_DECODER_H_ */
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file m3ap_eNB_encoder.c
* \brief m3ap encoder procedures for eNB
* \author Javier Morgade <javier.morgade@ieee.org>
* \date 2019
* \version 0.1
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include "assertions.h"
#include "conversions.h"
#include "intertask_interface.h"
#include "m3ap_common.h"
#include "m3ap_eNB_encoder.h"
int m3ap_eNB_encode_pdu(M3AP_M3AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
{
ssize_t encoded;
DevAssert(pdu != NULL);
DevAssert(buffer != NULL);
DevAssert(len != NULL);
if (asn1_xer_print) {
xer_fprint(stdout, &asn_DEF_M3AP_M3AP_PDU, (void *)pdu);
}
encoded = aper_encode_to_new_buffer(&asn_DEF_M3AP_M3AP_PDU, 0, pdu, (void **)buffer);
if (encoded < 0) {
return -1;
}
*len = encoded;
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_M3AP_M3AP_PDU, pdu);
return encoded;
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file m3ap_eNB_encoder.h
* \brief m3ap encoder procedures for eNB
* \author Javier Morgade <javier.morgade@ieee.org>
* \date 2019
* \version 0.1
*/
#ifndef M3AP_ENB_ENCODER_H_
#define M3AP_ENB_ENCODER_H_
int m3ap_eNB_encode_pdu(M3AP_M3AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
__attribute__ ((warn_unused_result));
#endif /* M3AP_ENB_ENCODER_H_ */
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file m3ap_eNB_generate_messages.h
* \brief m3ap procedures for eNB
* \author Javier Morgade <javier.morgade@ieee.org>
* \date 2019
* \version 0.1
*/
#ifndef M3AP_ENB_GENERATE_MESSAGES_H_
#define M3AP_ENB_GENERATE_MESSAGES_H_
#include "m3ap_eNB_defs.h"
#include "m3ap_common.h"
int m3ap_eNB_generate_m3_setup_request(m3ap_eNB_instance_t *instance_p,
m3ap_eNB_data_t *m3ap_eNB_data_p);
int m3ap_eNB_generate_m3_setup_response(m3ap_eNB_instance_t *instance_p, m3ap_eNB_data_t *m3ap_eNB_data_p);
int m3ap_eNB_generate_m3_setup_failure(instance_t instance,
uint32_t assoc_id,
M3AP_Cause_PR cause_type,
long cause_value,
long time_to_wait);
int m3ap_eNB_set_cause (M3AP_Cause_t * cause_p,
M3AP_Cause_PR cause_type,
long cause_value);
//int m3ap_eNB_generate_m2_handover_request (m3ap_eNB_instance_t *instance_p, m3ap_eNB_data_t *m3ap_eNB_data_p,
// m3ap_handover_req_t *m3ap_handover_req, int ue_id);
//
//int m3ap_eNB_generate_m2_handover_request_ack (m3ap_eNB_instance_t *instance_p, m3ap_eNB_data_t *m3ap_eNB_data_p,
// m3ap_handover_req_ack_t *m3ap_handover_req_ack);
//
//int m3ap_eNB_generate_m2_ue_context_release (m3ap_eNB_instance_t *instance_p, m3ap_eNB_data_t *m3ap_eNB_data_p,
// m3ap_ue_context_release_t *m3ap_ue_context_release);
//
//int m3ap_eNB_generate_m2_handover_cancel (m3ap_eNB_instance_t *instance_p, m3ap_eNB_data_t *m3ap_eNB_data_p,
// int m2_ue_id,
// m3ap_handover_cancel_cause_t cause);
#endif /* M3AP_ENB_GENERATE_MESSAGES_H_ */
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file m3ap_eNB_handler.h
* \brief m3ap handler procedures for eNB
* \author Javier Morgade <javier.morgade@ieee.org>
* \date 2019
* \version 0.1
*/
#ifndef M3AP_ENB_HANDLERS_H_
#define M3AP_ENB_HANDLERS_H_
#include "m3ap_eNB_defs.h"
void m3ap_handle_m3_setup_message(m3ap_eNB_instance_t *instance_p, m3ap_eNB_data_t *eNB_desc_p, int sctp_shutdown);
int m3ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
const uint8_t * const data, const uint32_t data_length);
#endif /* M3AP_ENB_HANDLERS_H_ */
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file m3ap_eNB_itti_messaging.c
* \brief m3ap tasks for eNB
* \author Javier Morgade <javier.morgade@ieee.org>
* \date 2019
* \version 0.1
*/
#include "intertask_interface.h"
#include "m3ap_eNB_itti_messaging.h"
void m3ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
uint32_t buffer_length, uint16_t stream)
{
MessageDef *message_p;
sctp_data_req_t *sctp_data_req;
message_p = itti_alloc_new_message(TASK_M3AP, SCTP_DATA_REQ);
sctp_data_req = &message_p->ittiMsg.sctp_data_req;
sctp_data_req->assoc_id = assoc_id;
sctp_data_req->buffer = buffer;
sctp_data_req->buffer_length = buffer_length;
sctp_data_req->stream = stream;
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
}
void m3ap_eNB_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id)
{
MessageDef *message_p = NULL;
sctp_close_association_t *sctp_close_association_p = NULL;
message_p = itti_alloc_new_message(TASK_M3AP, SCTP_CLOSE_ASSOCIATION);
sctp_close_association_p = &message_p->ittiMsg.sctp_close_association;
sctp_close_association_p->assoc_id = assoc_id;
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file m3ap_eNB_itti_messaging.h
* \brief m3ap tasks for eNB
* \author Javier Morgade <javier.morgade@ieee.org>
* \date 2019
* \version 0.1
*/
#ifndef M3AP_ENB_ITTI_MESSAGING_H_
#define M3AP_ENB_ITTI_MESSAGING_H_
void m3ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
uint32_t buffer_length, uint16_t stream);
void m3ap_eNB_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id);
#endif /* M3AP_ENB_ITTI_MESSAGING_H_ */
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