Commit 2eaeef69 authored by Lionel Gauthier's avatar Lionel Gauthier

UE context release command TO BE CONTINUED

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5877 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent d4f1cf16
......@@ -66,9 +66,20 @@ static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
{
case S1ap_ProcedureCode_id_downlinkNASTransport:
ret = s1ap_decode_s1ap_downlinknastransporties(
&message->msg.s1ap_DownlinkNASTransportIEs, &initiating_p->value);
s1ap_xer_print_s1ap_downlinknastransport(s1ap_xer__print2sp, message_string, message);
message_id = S1AP_DOWNLINK_NAS_LOG;
&message->msg.s1ap_DownlinkNASTransportIEs,
&initiating_p->value);
s1ap_xer_print_s1ap_downlinknastransport(s1ap_xer__print2sp,
message_string,
message);
message_id = S1AP_DOWNLINK_NAS_LOG;
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP,
message_id,
message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_downlink_nas_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_downlink_nas_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
break;
case S1ap_ProcedureCode_id_InitialContextSetup:
......@@ -76,6 +87,29 @@ static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
&message->msg.s1ap_InitialContextSetupRequestIEs, &initiating_p->value);
s1ap_xer_print_s1ap_initialcontextsetuprequest(s1ap_xer__print2sp, message_string, message);
message_id = S1AP_INITIAL_CONTEXT_SETUP_LOG;
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP,
message_id,
message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_initial_context_setup_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_initial_context_setup_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
break;
case S1ap_ProcedureCode_id_UEContextRelease:
ret = s1ap_decode_s1ap_uecontextreleasecommandies(
&message->msg.s1ap_UEContextReleaseCommandIEs, &initiating_p->value);
s1ap_xer_print_s1ap_uecontextreleasecommand(s1ap_xer__print2sp, message_string, message);
message_id = S1AP_UE_CONTEXT_RELEASE_COMMAND_LOG;
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP,
message_id,
message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_ue_context_release_command_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_ue_context_release_command_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
break;
default:
......@@ -86,15 +120,7 @@ static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
return -1;
}
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_downlink_nas_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_downlink_nas_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
return ret;
}
......
......@@ -71,6 +71,11 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p);
static
int s1ap_eNB_handle_ue_context_release(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *s1ap_message_p);
/* Handlers matrix. Only eNB related procedure present here */
s1ap_message_decoded_callback messages_callback[][3] = {
{ 0, 0, 0 }, /* HandoverPreparation */
......@@ -96,7 +101,7 @@ s1ap_message_decoded_callback messages_callback[][3] = {
{ 0, 0, 0 }, /* UplinkS1cdma2000tunneling */
{ 0, 0, 0 }, /* UEContextModification */
{ 0, 0, 0 }, /* UECapabilityInfoIndication */
{ 0, 0, 0 }, /* UEContextRelease */
{ s1ap_eNB_handle_ue_context_release, 0, 0 }, /* UEContextRelease */
{ 0, 0, 0 }, /* eNBStatusTransfer */
{ 0, 0, 0 }, /* MMEStatusTransfer */
{ s1ap_eNB_handle_deactivate_trace, 0, 0 }, /* DeactivateTrace */
......@@ -511,3 +516,32 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
return 0;
}
static
int s1ap_eNB_handle_ue_context_release(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *s1ap_message_p)
{
int i;
s1ap_eNB_mme_data_t *mme_desc_p = NULL;
s1ap_eNB_ue_context_t *ue_desc_p = NULL;
MessageDef *message_p = NULL;
S1ap_UEContextReleaseCommandIEs_t *ueContextReleaseCommand_p;
DevAssert(s1ap_message_p != NULL);
ueContextReleaseCommand_p = &s1ap_message_p->msg.s1ap_UEContextReleaseCommandIEs;
if ((mme_desc_p = s1ap_eNB_get_MME(NULL, assoc_id, 0)) == NULL) {
S1AP_ERROR("[SCTP %d] Received UE context release command for non "
"existing MME context\n", assoc_id);
return -1;
}
#warning "TODO"
S1AP_ERROR("s1ap_eNB_handle_ue_context_release to be continued\n");
return 0;
}
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