Commit 44355e1a authored by gauthier's avatar gauthier

Receiving setupresponse success, TBC

parent 610e07a9
...@@ -283,6 +283,22 @@ const char * const et_chunk_type_cid2str(const sctp_cid_t chunk_type) ...@@ -283,6 +283,22 @@ const char * const et_chunk_type_cid2str(const sctp_cid_t chunk_type)
} }
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
const char * const et_error_match2str(const int err)
{
switch (err) {
case -ET_ERROR_MATCH_PACKET_SCTP_CHUNK_TYPE: return "SCTP_CHUNK_TYPE"; break;
case -ET_ERROR_MATCH_PACKET_SCTP_PPID: return "SCTP_PPID"; break;
case -ET_ERROR_MATCH_PACKET_SCTP_ASSOC_ID: return "SCTP_ASSOC_ID"; break;
case -ET_ERROR_MATCH_PACKET_SCTP_STREAM_ID: return "SCTP_STREAM_ID"; break;
case -ET_ERROR_MATCH_PACKET_SCTP_SSN: return "SCTP_SSN"; break;
case -ET_ERROR_MATCH_PACKET_S1AP_PRESENT: return "S1AP_PRESENT"; break;
case -ET_ERROR_MATCH_PACKET_S1AP_PROCEDURE_CODE: return "S1AP_PROCEDURE_CODE"; break;
case -ET_ERROR_MATCH_PACKET_S1AP_CRITICALITY: return "S1AP_CRITICALITY"; break;
default:
AssertFatal (0, "ERROR: Unknown match error %d!(TODO handle an1c error codes)\n", err);
}
}
//------------------------------------------------------------------------------
et_packet_action_t et_action_str2et_action_t(const xmlChar * const action) et_packet_action_t et_action_str2et_action_t(const xmlChar * const action)
{ {
if ((!xmlStrcmp(action, (const xmlChar *)"SEND"))) { return ET_PACKET_ACTION_S1C_SEND;} if ((!xmlStrcmp(action, (const xmlChar *)"SEND"))) { return ET_PACKET_ACTION_S1C_SEND;}
......
...@@ -178,6 +178,19 @@ typedef enum { ...@@ -178,6 +178,19 @@ typedef enum {
ET_FSM_STATE_END ET_FSM_STATE_END
} et_fsm_state_t; } et_fsm_state_t;
typedef enum {
ET_ERROR_MATCH_START = 1,
ET_ERROR_MATCH_PACKET_SCTP_CHUNK_TYPE = ET_ERROR_MATCH_START,
ET_ERROR_MATCH_PACKET_SCTP_PPID,
ET_ERROR_MATCH_PACKET_SCTP_ASSOC_ID,
ET_ERROR_MATCH_PACKET_SCTP_STREAM_ID,
ET_ERROR_MATCH_PACKET_SCTP_SSN,
ET_ERROR_MATCH_PACKET_S1AP_PRESENT,
ET_ERROR_MATCH_PACKET_S1AP_PROCEDURE_CODE,
ET_ERROR_MATCH_PACKET_S1AP_CRITICALITY,
ET_ERROR_MATCH_END
} et_error_match_code_t;
...@@ -332,9 +345,9 @@ typedef struct et_scenario_s { ...@@ -332,9 +345,9 @@ typedef struct et_scenario_s {
hash_table_t *hash_old_ue_mme_id2ue_mme_id; hash_table_t *hash_old_ue_mme_id2ue_mme_id;
struct timeval time_last_tx_packet; struct timeval time_last_tx_packet;
struct timeval time_last_rx_packet; struct timeval time_last_rx_packet;
et_packet_t *last_rx_packet; et_packet_t *last_rx_packet; // last packet received with all previous scenario RX packet received.
et_packet_t *last_tx_packet; et_packet_t *last_tx_packet; // last sent packet
et_packet_t *next_packet; et_packet_t *next_packet; // next packet to be handled in the scenario (RX or TX packet)
} et_scenario_t; } et_scenario_t;
...@@ -402,6 +415,7 @@ s1ap_eNB_instance_t *et_s1ap_eNB_get_instance(instance_t instance); ...@@ -402,6 +415,7 @@ s1ap_eNB_instance_t *et_s1ap_eNB_get_instance(instance_t instance);
void et_s1ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,uint32_t buffer_length, uint16_t stream); void et_s1ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,uint32_t buffer_length, uint16_t stream);
int et_s1ap_is_matching(et_s1ap_t * const s1ap1, et_s1ap_t * const s1ap2, const uint32_t constraints); int et_s1ap_is_matching(et_s1ap_t * const s1ap1, et_s1ap_t * const s1ap2, const uint32_t constraints);
et_packet_t* et_build_packet_from_s1ap_data_ind(et_event_s1ap_data_ind_t * const s1ap_data_ind); et_packet_t* et_build_packet_from_s1ap_data_ind(et_event_s1ap_data_ind_t * const s1ap_data_ind);
void et_scenario_set_packet_received(et_packet_t * const packet);
void et_s1ap_process_rx_packet(et_event_s1ap_data_ind_t * const sctp_data_ind); void et_s1ap_process_rx_packet(et_event_s1ap_data_ind_t * const sctp_data_ind);
void et_s1ap_eNB_handle_sctp_data_ind(sctp_data_ind_t * const sctp_data_ind); void et_s1ap_eNB_handle_sctp_data_ind(sctp_data_ind_t * const sctp_data_ind);
void et_s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p, void et_s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p,
...@@ -450,6 +464,7 @@ int et_compare_et_ip_to_net_ip_address(const et_ip_t * const ip, const net_ip_ad ...@@ -450,6 +464,7 @@ int et_compare_et_ip_to_net_ip_address(const et_ip_t * const ip, const net_ip_ad
int et_hex2data(unsigned char * const data, const unsigned char * const hexstring, const unsigned int len); int et_hex2data(unsigned char * const data, const unsigned char * const hexstring, const unsigned int len);
sctp_cid_t et_chunk_type_str2cid(const xmlChar * const chunk_type_str); sctp_cid_t et_chunk_type_str2cid(const xmlChar * const chunk_type_str);
const char * const et_chunk_type_cid2str(const sctp_cid_t chunk_type); const char * const et_chunk_type_cid2str(const sctp_cid_t chunk_type);
const char * const et_error_match2str(const int err);
et_packet_action_t et_action_str2et_action_t(const xmlChar * const action); et_packet_action_t et_action_str2et_action_t(const xmlChar * const action);
void et_ip_str2et_ip(const xmlChar * const ip_str, et_ip_t * const ip); void et_ip_str2et_ip(const xmlChar * const ip_str, et_ip_t * const ip);
void et_enb_config_init(const char const * lib_config_file_name_pP); void et_enb_config_init(const char const * lib_config_file_name_pP);
......
...@@ -273,6 +273,28 @@ void et_display_packet(const et_packet_t * const packet) ...@@ -273,6 +273,28 @@ void et_display_packet(const et_packet_t * const packet)
default: default:
fprintf(stdout, "\tPacket:\tAction UNKNOWN\n"); fprintf(stdout, "\tPacket:\tAction UNKNOWN\n");
} }
switch(packet->status) {
case ET_PACKET_STATUS_NONE:
fprintf(stdout, "\tPacket:\tStatus NONE\n");
break;
case ET_PACKET_STATUS_NOT_TAKEN_IN_ACCOUNT:
fprintf(stdout, "\tPacket:\tStatus NOT_TAKEN_IN_ACCOUNT\n");
break;
case ET_PACKET_STATUS_SCHEDULED_FOR_SENDING:
fprintf(stdout, "\tPacket:\tStatus SCHEDULED_FOR_SENDING\n");
break;
case ET_PACKET_STATUS_SENT:
fprintf(stdout, "\tPacket:\tStatus SENT\n");
break;
case ET_PACKET_STATUS_SCHEDULED_FOR_RECEIVING:
fprintf(stdout, "\tPacket:\tStatus SCHEDULED_FOR_RECEIVING\n");
break;
case ET_PACKET_STATUS_RECEIVED:
fprintf(stdout, "\tPacket:\tStatus RECEIVED\n");
break;
default:
fprintf(stdout, "\tPacket:\tStatus UNKNOWN\n");
}
et_display_packet_ip(&packet->ip_hdr); et_display_packet_ip(&packet->ip_hdr);
et_display_packet_sctp(&packet->sctp_hdr); et_display_packet_sctp(&packet->sctp_hdr);
} }
......
...@@ -292,7 +292,10 @@ et_fsm_state_t et_scenario_fsm_notify_event_state_null(et_event_t event) ...@@ -292,7 +292,10 @@ et_fsm_state_t et_scenario_fsm_notify_event_state_null(et_event_t event)
case ET_EVENT_INIT: case ET_EVENT_INIT:
AssertFatal(NULL == g_scenario, "Current scenario not ended"); AssertFatal(NULL == g_scenario, "Current scenario not ended");
g_scenario = event.u.init.scenario; g_scenario = event.u.init.scenario;
g_scenario->next_packet = g_scenario->list_packet; g_scenario->next_packet = g_scenario->list_packet;
g_scenario->last_rx_packet = NULL;
g_scenario->last_tx_packet = NULL;
while (NULL != g_scenario->next_packet) { while (NULL != g_scenario->next_packet) {
switch (g_scenario->next_packet->sctp_hdr.chunk_type) { switch (g_scenario->next_packet->sctp_hdr.chunk_type) {
......
...@@ -191,21 +191,21 @@ void et_s1ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, ...@@ -191,21 +191,21 @@ void et_s1ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id,
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
int et_s1ap_is_matching(et_s1ap_t * const s1ap1, et_s1ap_t * const s1ap2, const uint32_t constraints) int et_s1ap_is_matching(et_s1ap_t * const s1ap1, et_s1ap_t * const s1ap2, const uint32_t constraints)
{ {
if (s1ap1->pdu.present != s1ap2->pdu.present) return -6; if (s1ap1->pdu.present != s1ap2->pdu.present) return -ET_ERROR_MATCH_PACKET_S1AP_PRESENT;
switch (s1ap1->pdu.present) { switch (s1ap1->pdu.present) {
case S1AP_PDU_PR_NOTHING: case S1AP_PDU_PR_NOTHING:
break; break;
case S1AP_PDU_PR_initiatingMessage: case S1AP_PDU_PR_initiatingMessage:
if (s1ap1->pdu.choice.initiatingMessage.procedureCode != s1ap2->pdu.choice.initiatingMessage.procedureCode) return -7; if (s1ap1->pdu.choice.initiatingMessage.procedureCode != s1ap2->pdu.choice.initiatingMessage.procedureCode) return -ET_ERROR_MATCH_PACKET_S1AP_PROCEDURE_CODE;
if (s1ap1->pdu.choice.initiatingMessage.criticality != s1ap2->pdu.choice.initiatingMessage.criticality) return -8; if (s1ap1->pdu.choice.initiatingMessage.criticality != s1ap2->pdu.choice.initiatingMessage.criticality) return -ET_ERROR_MATCH_PACKET_S1AP_CRITICALITY;
break; break;
case S1AP_PDU_PR_successfulOutcome: case S1AP_PDU_PR_successfulOutcome:
if (s1ap1->pdu.choice.successfulOutcome.procedureCode != s1ap2->pdu.choice.successfulOutcome.procedureCode) return -7; if (s1ap1->pdu.choice.successfulOutcome.procedureCode != s1ap2->pdu.choice.successfulOutcome.procedureCode) return -ET_ERROR_MATCH_PACKET_S1AP_PROCEDURE_CODE;
if (s1ap1->pdu.choice.successfulOutcome.criticality != s1ap2->pdu.choice.successfulOutcome.criticality) return -8; if (s1ap1->pdu.choice.successfulOutcome.criticality != s1ap2->pdu.choice.successfulOutcome.criticality) return -ET_ERROR_MATCH_PACKET_S1AP_CRITICALITY;
break; break;
case S1AP_PDU_PR_unsuccessfulOutcome: case S1AP_PDU_PR_unsuccessfulOutcome:
if (s1ap1->pdu.choice.unsuccessfulOutcome.procedureCode != s1ap2->pdu.choice.unsuccessfulOutcome.procedureCode) return -7; if (s1ap1->pdu.choice.unsuccessfulOutcome.procedureCode != s1ap2->pdu.choice.unsuccessfulOutcome.procedureCode) return -ET_ERROR_MATCH_PACKET_S1AP_PROCEDURE_CODE;
if (s1ap1->pdu.choice.unsuccessfulOutcome.criticality != s1ap2->pdu.choice.unsuccessfulOutcome.criticality) return -8; if (s1ap1->pdu.choice.unsuccessfulOutcome.criticality != s1ap2->pdu.choice.unsuccessfulOutcome.criticality) return -ET_ERROR_MATCH_PACKET_S1AP_CRITICALITY;
break; break;
default: default:
AssertFatal(0, "Unknown pdu.present %d", s1ap1->pdu.present); AssertFatal(0, "Unknown pdu.present %d", s1ap1->pdu.present);
...@@ -236,7 +236,8 @@ et_packet_t* et_build_packet_from_s1ap_data_ind(et_event_s1ap_data_ind_t * const ...@@ -236,7 +236,8 @@ et_packet_t* et_build_packet_from_s1ap_data_ind(et_event_s1ap_data_ind_t * const
packet->enb_instance = 0; //TODO packet->enb_instance = 0; //TODO
//packet->ip_hdr; //packet->ip_hdr;
// keep in mind: allocated buffer: sctp_datahdr.payload.binary_stream // keep in mind: allocated buffer: sctp_datahdr.payload.binary_stream
memcpy((void*)&packet->sctp_hdr, (void*)&s1ap_data_ind->sctp_datahdr, sizeof(packet->sctp_hdr)); packet->sctp_hdr.chunk_type = SCTP_CID_DATA;
memcpy((void*)&packet->sctp_hdr.u.data_hdr, (void*)&s1ap_data_ind->sctp_datahdr, sizeof(packet->sctp_hdr));
//packet->next = NULL; //packet->next = NULL;
packet->status = ET_PACKET_STATUS_RECEIVED; packet->status = ET_PACKET_STATUS_RECEIVED;
//packet->timer_id = 0; //packet->timer_id = 0;
...@@ -245,23 +246,54 @@ et_packet_t* et_build_packet_from_s1ap_data_ind(et_event_s1ap_data_ind_t * const ...@@ -245,23 +246,54 @@ et_packet_t* et_build_packet_from_s1ap_data_ind(et_event_s1ap_data_ind_t * const
} }
//------------------------------------------------------------------------------
void et_scenario_set_packet_received(et_packet_t * const packet)
{
int rc = 0;
packet->status = ET_PACKET_STATUS_RECEIVED;
S1AP_DEBUG("Packet num %d received\n", packet->packet_number);
if (packet->timer_id != 0) {
rc = timer_remove(packet->timer_id);
AssertFatal(rc == 0, "Timer on Rx packet num %d unknown", packet->packet_number);
}
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void et_s1ap_process_rx_packet(et_event_s1ap_data_ind_t * const s1ap_data_ind) void et_s1ap_process_rx_packet(et_event_s1ap_data_ind_t * const s1ap_data_ind)
{ {
et_packet_t * packet = NULL; et_packet_t * packet = NULL;
et_packet_t * rx_packet = NULL; et_packet_t * rx_packet = NULL;
unsigned long int not_found = 1; unsigned long int not_found = 1;
long rv = 0;
AssertFatal (NULL != s1ap_data_ind, "Bad parameter sctp_data_ind\n"); AssertFatal (NULL != s1ap_data_ind, "Bad parameter sctp_data_ind\n");
rx_packet = et_build_packet_from_s1ap_data_ind(s1ap_data_ind); rx_packet = et_build_packet_from_s1ap_data_ind(s1ap_data_ind);
packet = g_scenario->next_packet; if (NULL == g_scenario->last_rx_packet) {
packet = g_scenario->list_packet;
while (NULL != packet) {
if (packet->action == ET_PACKET_ACTION_S1C_RECEIVE) {
if (packet->status == ET_PACKET_STATUS_RECEIVED) {
g_scenario->last_rx_packet = packet;
} else {
break;
}
}
packet = packet->next;
}
packet = g_scenario->list_packet;
} else {
packet = g_scenario->last_rx_packet;
}
// not_found threshold may sure depend on number of mme, may be not sure on number of UE // not_found threshold may sure depend on number of mme, may be not sure on number of UE
while ((NULL != packet) && (not_found < 5)) { while ((NULL != packet) && (not_found < 5)) {
if (packet->action == ET_PACKET_ACTION_S1C_RECEIVE) { if (packet->action == ET_PACKET_ACTION_S1C_RECEIVE) {
//TODO rv = et_sctp_is_matching(&packet->sctp_hdr, &rx_packet->sctp_hdr, g_constraints);
if (et_sctp_is_matching(&packet->sctp_hdr, &rx_packet->sctp_hdr, g_constraints) == 0) { if (0 == rv) {
S1AP_DEBUG("Compare RX packet with packet num %d succeeded\n", packet->packet_number);
et_scenario_set_packet_received(packet); et_scenario_set_packet_received(packet);
} else {
S1AP_DEBUG("Compare RX packet with packet num %d failed %s\n", packet->packet_number, et_error_match2str(rv));
} }
} }
not_found += 1; not_found += 1;
...@@ -388,9 +420,9 @@ void et_s1ap_update_assoc_id_of_packets(const int32_t assoc_id, ...@@ -388,9 +420,9 @@ void et_s1ap_update_assoc_id_of_packets(const int32_t assoc_id,
case SCTP_CID_DATA : case SCTP_CID_DATA :
S1AP_DEBUG("%s for SCTP association (%u) SCTP_CID_DATA\n",__FUNCTION__,assoc_id); S1AP_DEBUG("%s for SCTP association (%u) SCTP_CID_DATA\n",__FUNCTION__,assoc_id);
if (ET_PACKET_STATUS_NONE == packet->status) { if ((ET_PACKET_STATUS_NONE == packet->status) || (ET_PACKET_STATUS_SCHEDULED_FOR_RECEIVING == packet->status)) {
if (0 < old_mme_port) { if (0 < old_mme_port) {
if (g_scenario->next_packet->action == ET_PACKET_ACTION_S1C_SEND) { if (packet->action == ET_PACKET_ACTION_S1C_SEND) {
ret = et_compare_et_ip_to_net_ip_address(&packet->ip_hdr.dst, &mme_desc_p->mme_net_ip_address); ret = et_compare_et_ip_to_net_ip_address(&packet->ip_hdr.dst, &mme_desc_p->mme_net_ip_address);
if (0 == ret) { if (0 == ret) {
ret = et_compare_et_ip_to_net_ip_address(&packet->ip_hdr.src, &s1ap_eNB_instance->s1c_net_ip_address); ret = et_compare_et_ip_to_net_ip_address(&packet->ip_hdr.src, &s1ap_eNB_instance->s1c_net_ip_address);
...@@ -403,7 +435,7 @@ void et_s1ap_update_assoc_id_of_packets(const int32_t assoc_id, ...@@ -403,7 +435,7 @@ void et_s1ap_update_assoc_id_of_packets(const int32_t assoc_id,
} }
} }
} }
} else if (g_scenario->next_packet->action == ET_PACKET_ACTION_S1C_RECEIVE) { } else if (packet->action == ET_PACKET_ACTION_S1C_RECEIVE) {
ret = et_compare_et_ip_to_net_ip_address(&packet->ip_hdr.src, &mme_desc_p->mme_net_ip_address); ret = et_compare_et_ip_to_net_ip_address(&packet->ip_hdr.src, &mme_desc_p->mme_net_ip_address);
if (0 == ret) { if (0 == ret) {
ret = et_compare_et_ip_to_net_ip_address(&packet->ip_hdr.dst, &s1ap_eNB_instance->s1c_net_ip_address); ret = et_compare_et_ip_to_net_ip_address(&packet->ip_hdr.dst, &s1ap_eNB_instance->s1c_net_ip_address);
...@@ -474,6 +506,7 @@ void et_s1ap_update_assoc_id_of_packets(const int32_t assoc_id, ...@@ -474,6 +506,7 @@ void et_s1ap_update_assoc_id_of_packets(const int32_t assoc_id,
break; break;
default: default:
AssertFatal(0, "Unknown chunk_type %d packet num %d", packet->sctp_hdr.chunk_type, packet->packet_number);
; ;
} }
packet = packet->next; packet = packet->next;
......
...@@ -63,86 +63,156 @@ int et_s1ap_ies_is_matching(const S1AP_PDU_PR present, s1ap_message * const m1, ...@@ -63,86 +63,156 @@ int et_s1ap_ies_is_matching(const S1AP_PDU_PR present, s1ap_message * const m1,
long ret = 0; long ret = 0;
AssertFatal(m1 != NULL, "bad parameter m1"); AssertFatal(m1 != NULL, "bad parameter m1");
AssertFatal(m2 != NULL, "bad parameter m2"); AssertFatal(m2 != NULL, "bad parameter m2");
if (m1->procedureCode != m2->procedureCode) return -1; AssertFatal((present == S1AP_PDU_PR_initiatingMessage) ||
(present == S1AP_PDU_PR_successfulOutcome) ||
(present == S1AP_PDU_PR_unsuccessfulOutcome) , "bad parameter S1AP_PDU_PR present ");
if (m1->procedureCode != m2->procedureCode) return -ET_ERROR_MATCH_PACKET_S1AP_PROCEDURE_CODE;
// some cases can never occur since uplink only. // some cases can never occur since uplink only.
switch (m1->procedureCode) { switch (m1->procedureCode) {
case S1ap_ProcedureCode_id_HandoverPreparation: case S1ap_ProcedureCode_id_HandoverPreparation:
AssertFatal(0, "S1ap_ProcedureCode_id_InitialContextSetup not implemented"); if (present == S1AP_PDU_PR_initiatingMessage) {
ret = s1ap_compare_s1ap_handoverrequiredies(
&m1->msg.s1ap_HandoverRequiredIEs,
&m2->msg.s1ap_HandoverRequiredIEs);
} else {
ret = s1ap_compare_s1ap_handovercommandies(
&m1->msg.s1ap_HandoverCommandIEs,
&m2->msg.s1ap_HandoverCommandIEs);
}
break; break;
case S1ap_ProcedureCode_id_HandoverResourceAllocation: case S1ap_ProcedureCode_id_HandoverResourceAllocation:
AssertFatal(0, "S1ap_ProcedureCode_id_InitialContextSetup not implemented"); if (present == S1AP_PDU_PR_initiatingMessage) {
ret = s1ap_compare_s1ap_handoverrequesties(
&m1->msg.s1ap_HandoverRequestIEs,
&m2->msg.s1ap_HandoverRequestIEs);
} else if (present == S1AP_PDU_PR_successfulOutcome) {
ret = s1ap_compare_s1ap_handoverrequestacknowledgeies(
&m1->msg.s1ap_HandoverRequestAcknowledgeIEs,
&m2->msg.s1ap_HandoverRequestAcknowledgeIEs);
} else if (present == S1AP_PDU_PR_unsuccessfulOutcome) {
ret = s1ap_compare_s1ap_handoverfailureies(
&m1->msg.s1ap_HandoverFailureIEs,
&m2->msg.s1ap_HandoverFailureIEs);
}
break; break;
case S1ap_ProcedureCode_id_HandoverNotification: case S1ap_ProcedureCode_id_HandoverNotification:
AssertFatal(0, "S1ap_ProcedureCode_id_HandoverNotification not implemented"); ret = s1ap_compare_s1ap_handovernotifyies(
&m1->msg.s1ap_HandoverNotifyIEs,
&m2->msg.s1ap_HandoverNotifyIEs);
break; break;
case S1ap_ProcedureCode_id_PathSwitchRequest: case S1ap_ProcedureCode_id_PathSwitchRequest:
ret = s1ap_compare_s1ap_pathswitchrequesties( ret = s1ap_compare_s1ap_pathswitchrequesties(
&m1->msg.s1ap_PathSwitchRequestIEs, &m1->msg.s1ap_PathSwitchRequestIEs,
&m2->msg.s1ap_PathSwitchRequestIEs); &m2->msg.s1ap_PathSwitchRequestIEs);
break; break;
case S1ap_ProcedureCode_id_HandoverCancel: case S1ap_ProcedureCode_id_HandoverCancel:
ret = s1ap_compare_s1ap_handovercancelies( ret = s1ap_compare_s1ap_handovercancelies(
&m1->msg.s1ap_HandoverCancelIEs, &m1->msg.s1ap_HandoverCancelIEs,
&m2->msg.s1ap_HandoverCancelIEs); &m2->msg.s1ap_HandoverCancelIEs);
break; break;
case S1ap_ProcedureCode_id_E_RABSetup: case S1ap_ProcedureCode_id_E_RABSetup:
if (present == S1AP_PDU_PR_initiatingMessage) {
ret = s1ap_compare_s1ap_e_rabsetuprequesties(
&m1->msg.s1ap_E_RABSetupRequestIEs,
&m2->msg.s1ap_E_RABSetupRequestIEs);
} else {
ret = s1ap_compare_s1ap_e_rabsetupresponseies(
&m1->msg.s1ap_E_RABSetupResponseIEs,
&m2->msg.s1ap_E_RABSetupResponseIEs);
}
break;
case S1ap_ProcedureCode_id_E_RABModify: case S1ap_ProcedureCode_id_E_RABModify:
if (present == S1AP_PDU_PR_initiatingMessage) {
ret = s1ap_compare_s1ap_e_rabmodifyrequesties(
&m1->msg.s1ap_E_RABModifyRequestIEs,
&m2->msg.s1ap_E_RABModifyRequestIEs);
} else {
ret = s1ap_compare_s1ap_e_rabmodifyresponseies(
&m1->msg.s1ap_E_RABModifyResponseIEs,
&m2->msg.s1ap_E_RABModifyResponseIEs);
}
break;
case S1ap_ProcedureCode_id_E_RABRelease: case S1ap_ProcedureCode_id_E_RABRelease:
if (present == S1AP_PDU_PR_initiatingMessage) { if (present == S1AP_PDU_PR_initiatingMessage) {
ret = s1ap_compare_s1ap_e_rabreleasecommandies( ret = s1ap_compare_s1ap_e_rabreleasecommandies(
&m1->msg.s1ap_E_RABReleaseCommandIEs, &m1->msg.s1ap_E_RABReleaseCommandIEs,
&m2->msg.s1ap_E_RABReleaseCommandIEs); &m2->msg.s1ap_E_RABReleaseCommandIEs);
} else if (present == S1AP_PDU_PR_successfulOutcome) { } else {
ret = s1ap_compare_s1ap_e_rabreleaseresponseies( ret = s1ap_compare_s1ap_e_rabreleaseresponseies(
&m1->msg.s1ap_E_RABReleaseResponseIEs, &m1->msg.s1ap_E_RABReleaseResponseIEs,
&m2->msg.s1ap_E_RABReleaseResponseIEs); &m2->msg.s1ap_E_RABReleaseResponseIEs);
} }
break; break;
case S1ap_ProcedureCode_id_E_RABReleaseIndication: case S1ap_ProcedureCode_id_E_RABReleaseIndication:
ret = s1ap_compare_s1ap_e_rabreleaseindicationies( ret = s1ap_compare_s1ap_e_rabreleaseindicationies(
&m1->msg.s1ap_E_RABReleaseIndicationIEs, &m1->msg.s1ap_E_RABReleaseIndicationIEs,
&m2->msg.s1ap_E_RABReleaseIndicationIEs); &m2->msg.s1ap_E_RABReleaseIndicationIEs);
break; break;
case S1ap_ProcedureCode_id_InitialContextSetup: case S1ap_ProcedureCode_id_InitialContextSetup:
AssertFatal(0, "S1ap_ProcedureCode_id_InitialContextSetup not implemented"); if (present == S1AP_PDU_PR_initiatingMessage) {
ret = s1ap_compare_s1ap_initialcontextsetuprequesties(
&m1->msg.s1ap_InitialContextSetupRequestIEs,
&m2->msg.s1ap_InitialContextSetupRequestIEs);
} else {
ret = s1ap_compare_s1ap_initialcontextsetupresponseies(
&m1->msg.s1ap_InitialContextSetupResponseIEs,
&m2->msg.s1ap_InitialContextSetupResponseIEs);
}
break; break;
case S1ap_ProcedureCode_id_Paging: case S1ap_ProcedureCode_id_Paging:
ret = s1ap_compare_s1ap_pagingies( ret = s1ap_compare_s1ap_pagingies(
&m1->msg.s1ap_PagingIEs, &m1->msg.s1ap_PagingIEs,
&m2->msg.s1ap_PagingIEs); &m2->msg.s1ap_PagingIEs);
break; break;
case S1ap_ProcedureCode_id_downlinkNASTransport: case S1ap_ProcedureCode_id_downlinkNASTransport:
ret = s1ap_compare_s1ap_downlinknastransporties( ret = s1ap_compare_s1ap_downlinknastransporties(
&m1->msg.s1ap_DownlinkNASTransportIEs, &m1->msg.s1ap_DownlinkNASTransportIEs,
&m2->msg.s1ap_DownlinkNASTransportIEs); &m2->msg.s1ap_DownlinkNASTransportIEs);
break; break;
case S1ap_ProcedureCode_id_initialUEMessage: case S1ap_ProcedureCode_id_initialUEMessage:
ret = s1ap_compare_s1ap_initialuemessageies( ret = s1ap_compare_s1ap_initialuemessageies(
&m1->msg.s1ap_InitialUEMessageIEs, &m1->msg.s1ap_InitialUEMessageIEs,
&m2->msg.s1ap_InitialUEMessageIEs); &m2->msg.s1ap_InitialUEMessageIEs);
break; break;
case S1ap_ProcedureCode_id_uplinkNASTransport: case S1ap_ProcedureCode_id_uplinkNASTransport:
ret = s1ap_compare_s1ap_uplinknastransporties( ret = s1ap_compare_s1ap_uplinknastransporties(
&m1->msg.s1ap_UplinkNASTransportIEs, &m1->msg.s1ap_UplinkNASTransportIEs,
&m2->msg.s1ap_UplinkNASTransportIEs); &m2->msg.s1ap_UplinkNASTransportIEs);
break; break;
case S1ap_ProcedureCode_id_Reset: case S1ap_ProcedureCode_id_Reset:
ret = s1ap_compare_s1ap_reseties( ret = s1ap_compare_s1ap_reseties(
&m1->msg.s1ap_ResetIEs, &m1->msg.s1ap_ResetIEs,
&m2->msg.s1ap_ResetIEs); &m2->msg.s1ap_ResetIEs);
break; break;
case S1ap_ProcedureCode_id_ErrorIndication: case S1ap_ProcedureCode_id_ErrorIndication:
ret = s1ap_compare_s1ap_errorindicationies( ret = s1ap_compare_s1ap_errorindicationies(
&m1->msg.s1ap_ErrorIndicationIEs, &m1->msg.s1ap_ErrorIndicationIEs,
&m2->msg.s1ap_ErrorIndicationIEs); &m2->msg.s1ap_ErrorIndicationIEs);
break; break;
case S1ap_ProcedureCode_id_NASNonDeliveryIndication: case S1ap_ProcedureCode_id_NASNonDeliveryIndication:
ret = s1ap_compare_s1ap_nasnondeliveryindication_ies( ret = s1ap_compare_s1ap_nasnondeliveryindication_ies(
&m1->msg.s1ap_NASNonDeliveryIndication_IEs, &m1->msg.s1ap_NASNonDeliveryIndication_IEs,
&m2->msg.s1ap_NASNonDeliveryIndication_IEs); &m2->msg.s1ap_NASNonDeliveryIndication_IEs);
break; break;
case S1ap_ProcedureCode_id_S1Setup: case S1ap_ProcedureCode_id_S1Setup:
if (present == S1AP_PDU_PR_initiatingMessage) { if (present == S1AP_PDU_PR_initiatingMessage) {
ret = s1ap_compare_s1ap_s1setuprequesties( ret = s1ap_compare_s1ap_s1setuprequesties(
...@@ -158,21 +228,25 @@ int et_s1ap_ies_is_matching(const S1AP_PDU_PR present, s1ap_message * const m1, ...@@ -158,21 +228,25 @@ int et_s1ap_ies_is_matching(const S1AP_PDU_PR present, s1ap_message * const m1,
&m2->msg.s1ap_S1SetupFailureIEs); &m2->msg.s1ap_S1SetupFailureIEs);
} }
break; break;
case S1ap_ProcedureCode_id_UEContextReleaseRequest: case S1ap_ProcedureCode_id_UEContextReleaseRequest:
ret = s1ap_compare_s1ap_uecontextreleaserequesties( ret = s1ap_compare_s1ap_uecontextreleaserequesties(
&m1->msg.s1ap_UEContextReleaseRequestIEs, &m1->msg.s1ap_UEContextReleaseRequestIEs,
&m2->msg.s1ap_UEContextReleaseRequestIEs); &m2->msg.s1ap_UEContextReleaseRequestIEs);
break; break;
case S1ap_ProcedureCode_id_DownlinkS1cdma2000tunneling: case S1ap_ProcedureCode_id_DownlinkS1cdma2000tunneling:
ret = s1ap_compare_s1ap_downlinks1cdma2000tunnelingies( ret = s1ap_compare_s1ap_downlinks1cdma2000tunnelingies(
&m1->msg.s1ap_DownlinkS1cdma2000tunnelingIEs, &m1->msg.s1ap_DownlinkS1cdma2000tunnelingIEs,
&m2->msg.s1ap_DownlinkS1cdma2000tunnelingIEs); &m2->msg.s1ap_DownlinkS1cdma2000tunnelingIEs);
break; break;
case S1ap_ProcedureCode_id_UplinkS1cdma2000tunneling: case S1ap_ProcedureCode_id_UplinkS1cdma2000tunneling:
ret = s1ap_compare_s1ap_uplinks1cdma2000tunnelingies( ret = s1ap_compare_s1ap_uplinks1cdma2000tunnelingies(
&m1->msg.s1ap_UplinkS1cdma2000tunnelingIEs, &m1->msg.s1ap_UplinkS1cdma2000tunnelingIEs,
&m2->msg.s1ap_UplinkS1cdma2000tunnelingIEs); &m2->msg.s1ap_UplinkS1cdma2000tunnelingIEs);
break; break;
case S1ap_ProcedureCode_id_UEContextModification: case S1ap_ProcedureCode_id_UEContextModification:
if (present == S1AP_PDU_PR_initiatingMessage) { if (present == S1AP_PDU_PR_initiatingMessage) {
ret = s1ap_compare_s1ap_uecontextmodificationrequesties( ret = s1ap_compare_s1ap_uecontextmodificationrequesties(
...@@ -188,53 +262,152 @@ int et_s1ap_ies_is_matching(const S1AP_PDU_PR present, s1ap_message * const m1, ...@@ -188,53 +262,152 @@ int et_s1ap_ies_is_matching(const S1AP_PDU_PR present, s1ap_message * const m1,
&m2->msg.s1ap_UEContextModificationFailureIEs); &m2->msg.s1ap_UEContextModificationFailureIEs);
} }
break; break;
case S1ap_ProcedureCode_id_UECapabilityInfoIndication: case S1ap_ProcedureCode_id_UECapabilityInfoIndication:
ret = s1ap_compare_s1ap_uecapabilityinfoindicationies( ret = s1ap_compare_s1ap_uecapabilityinfoindicationies(
&m1->msg.s1ap_UECapabilityInfoIndicationIEs, &m1->msg.s1ap_UECapabilityInfoIndicationIEs,
&m2->msg.s1ap_UECapabilityInfoIndicationIEs); &m2->msg.s1ap_UECapabilityInfoIndicationIEs);
break; break;
case S1ap_ProcedureCode_id_UEContextRelease:
case S1ap_ProcedureCode_id_UEContextRelease:
if (present == S1AP_PDU_PR_initiatingMessage) {
ret = s1ap_compare_s1ap_uecontextreleasecommandies(
&m1->msg.s1ap_UEContextReleaseCommandIEs,
&m2->msg.s1ap_UEContextReleaseCommandIEs);
} else {
ret = s1ap_compare_s1ap_uecontextreleasecompleteies(
&m1->msg.s1ap_UEContextReleaseCompleteIEs,
&m2->msg.s1ap_UEContextReleaseCompleteIEs);
}
break; break;
case S1ap_ProcedureCode_id_eNBStatusTransfer: case S1ap_ProcedureCode_id_eNBStatusTransfer:
ret = s1ap_compare_s1ap_enbstatustransferies( ret = s1ap_compare_s1ap_enbstatustransferies(
&m1->msg.s1ap_ENBStatusTransferIEs, &m1->msg.s1ap_ENBStatusTransferIEs,
&m2->msg.s1ap_ENBStatusTransferIEs); &m2->msg.s1ap_ENBStatusTransferIEs);
break; break;
case S1ap_ProcedureCode_id_MMEStatusTransfer: case S1ap_ProcedureCode_id_MMEStatusTransfer:
ret = s1ap_compare_s1ap_mmestatustransferies( ret = s1ap_compare_s1ap_mmestatustransferies(
&m1->msg.s1ap_MMEStatusTransferIEs, &m1->msg.s1ap_MMEStatusTransferIEs,
&m2->msg.s1ap_MMEStatusTransferIEs); &m2->msg.s1ap_MMEStatusTransferIEs);
break; break;
case S1ap_ProcedureCode_id_DeactivateTrace: case S1ap_ProcedureCode_id_DeactivateTrace:
ret = s1ap_compare_s1ap_deactivatetraceies( ret = s1ap_compare_s1ap_deactivatetraceies(
&m1->msg.s1ap_DeactivateTraceIEs, &m1->msg.s1ap_DeactivateTraceIEs,
&m2->msg.s1ap_DeactivateTraceIEs); &m2->msg.s1ap_DeactivateTraceIEs);
break; break;
case S1ap_ProcedureCode_id_TraceStart: case S1ap_ProcedureCode_id_TraceStart:
ret = s1ap_compare_s1ap_tracestarties( ret = s1ap_compare_s1ap_tracestarties(
&m1->msg.s1ap_TraceStartIEs, &m1->msg.s1ap_TraceStartIEs,
&m2->msg.s1ap_TraceStartIEs); &m2->msg.s1ap_TraceStartIEs);
break; break;
case S1ap_ProcedureCode_id_TraceFailureIndication: case S1ap_ProcedureCode_id_TraceFailureIndication:
ret = s1ap_compare_s1ap_tracefailureindicationies( ret = s1ap_compare_s1ap_tracefailureindicationies(
&m1->msg.s1ap_TraceFailureIndicationIEs, &m1->msg.s1ap_TraceFailureIndicationIEs,
&m2->msg.s1ap_TraceFailureIndicationIEs); &m2->msg.s1ap_TraceFailureIndicationIEs);
break; break;
case S1ap_ProcedureCode_id_ENBConfigurationUpdate: case S1ap_ProcedureCode_id_ENBConfigurationUpdate:
if (present == S1AP_PDU_PR_initiatingMessage) {
ret = s1ap_compare_s1ap_enbconfigurationupdateies(
&m1->msg.s1ap_ENBConfigurationUpdateIEs,
&m2->msg.s1ap_ENBConfigurationUpdateIEs);
} else if (present == S1AP_PDU_PR_successfulOutcome) {
ret = s1ap_compare_s1ap_enbconfigurationupdateacknowledgeies(
&m1->msg.s1ap_ENBConfigurationUpdateAcknowledgeIEs,
&m2->msg.s1ap_ENBConfigurationUpdateAcknowledgeIEs);
} else {
ret = s1ap_compare_s1ap_enbconfigurationupdatefailureies(
&m1->msg.s1ap_ENBConfigurationUpdateFailureIEs,