Generate SCTP output stream identifier

This commit is contained in:
Sukchan Lee 2018-05-09 23:09:04 +09:00
parent e18467889c
commit 10f59c850b
2 changed files with 13 additions and 0 deletions

View File

@ -1761,6 +1761,17 @@ enb_ue_t* enb_ue_add(mme_enb_t *enb)
index_alloc(&enb_ue_pool, &enb_ue);
d_assert(enb_ue, return NULL, "Null param");
/*
* We'll use self.mme_ue_s1ap_id for generating SCTP stream id
*
* Default number of output stream : 30
* 0 : Non UE assocation
* 1 ~ 29 : UE specific association
*/
enb_ue->ostream_id = self.mme_ue_s1ap_id %
(context_self()->parameter.sctp_streams - 1) + 1;
enb_ue->enb_ue_s1ap_id = INVALID_UE_S1AP_ID;
enb_ue->mme_ue_s1ap_id = NEXT_ID(self.mme_ue_s1ap_id, 1, 0xffffffff);
enb_ue->enb = enb;

View File

@ -159,6 +159,8 @@ struct _enb_ue_t {
lnode_t node; /* A node of list_t */
index_t index; /* An index of this node */
c_uint16_t ostream_id; /* SCTP Output Stream Identifier */
/* UE identity */
#define INVALID_UE_S1AP_ID 0xffffffff /* Initial value of enb_ue_s1ap_id */
c_uint32_t enb_ue_s1ap_id; /* eNB-UE-S1AP-ID received from eNB */