Refactor SCTP association response handler

* this function is used by both CU-CP and CU-UP
* it behaves differently depending on the type of E1 instance:
  CU-CP: inform RRC of E1 connection loss with CU-UP
  CU-UP: trigger a new SCTP association request by sending an ITTI to the CU-UP task
* after receiving the E1AP register request, the CU-UP will send a new association request to
  SCTP until new E1 connection is achieved by sending a TIMER_HAS_EXPIRED message to the CU-UP
  task. The function e1apHandleTimer() is basically triggering a new E1 association request
  until new E1 connection is achieved
* print SCTP association state in e1ap.c whenever needed

Related to #878
This commit is contained in:
Guido Casati
2025-01-14 14:13:49 +01:00
parent b922fd2649
commit bcd1270237
6 changed files with 57 additions and 28 deletions
+17 -6
View File
@@ -36,11 +36,22 @@
#define SCTP_INIT_MSG_MULTI_CNF(mSGpTR) (mSGpTR)->ittiMsg.sctp_init_msg_multi_cnf
#define SCTP_CLOSE_ASSOCIATION(mSGpTR) (mSGpTR)->ittiMsg.sctp_close_association
enum sctp_state_e {
SCTP_STATE_CLOSED,
SCTP_STATE_SHUTDOWN,
SCTP_STATE_ESTABLISHED,
SCTP_STATE_UNREACHABLE
#define SCTP_STATES \
ITEM(SCTP_STATE_CLOSED) \
ITEM(SCTP_STATE_SHUTDOWN) \
ITEM(SCTP_STATE_ESTABLISHED) \
ITEM(SCTP_STATE_UNREACHABLE)
typedef enum {
#define ITEM(state) state,
SCTP_STATES
#undef ITEM
} sctp_state_e;
static const char *sctp_state_s[] __attribute__((unused)) = {
#define ITEM(state) #state,
SCTP_STATES
#undef ITEM
};
typedef struct sctp_new_association_req_s {
@@ -112,7 +123,7 @@ typedef struct sctp_new_association_resp_s {
uint16_t in_streams;
/* State of the association at SCTP level */
enum sctp_state_e sctp_state;
sctp_state_e sctp_state;
} sctp_new_association_resp_t;
typedef struct sctp_data_ind_s {