spec study
This commit is contained in:
parent
232a078fe9
commit
1641bba934
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "cellwire.h"
|
||||
#include "context.h"
|
||||
#include "s1ap_message.h"
|
||||
|
||||
static mme_ctx_t self;
|
||||
|
||||
|
@ -43,6 +44,8 @@ status_t context_init()
|
|||
self.plmn_id.mnc_len = 2;
|
||||
self.plmn_id.mcc = 1; /* 001 */
|
||||
self.plmn_id.mnc = 1; /* 01 */
|
||||
self.tracking_area_code = 12345;
|
||||
self.default_paging_drx = S1ap_PagingDRX_v64;
|
||||
self.relative_capacity = 0xff;
|
||||
|
||||
self.srvd_gummei.num_of_plmn_id = 1;
|
||||
|
|
|
@ -49,10 +49,14 @@ typedef struct _mme_ctx_t {
|
|||
c_uint32_t enb_local_addr; /** Network byte order */
|
||||
|
||||
plmn_id_t plmn_id;
|
||||
srvd_gummei_t srvd_gummei;
|
||||
|
||||
/* S1SetupRequest */
|
||||
c_uint16_t tracking_area_code;
|
||||
c_uint16_t default_paging_drx;
|
||||
|
||||
/* S1SetupResponse */
|
||||
srvd_gummei_t srvd_gummei;
|
||||
c_uint8_t relative_capacity;
|
||||
c_uint16_t tac;
|
||||
} mme_ctx_t;
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,10 +21,8 @@ status_t s1ap_build_setup_rsp(pkbuf_t **pkbuf)
|
|||
memset(&message, 0, sizeof(s1ap_message));
|
||||
|
||||
ies = &message.msg.s1ap_S1SetupResponseIEs;
|
||||
ies->relativeMMECapacity = mme_self()->relative_capacity;
|
||||
|
||||
numServedGUMMEI = 1;
|
||||
|
||||
servedGUMMEI = (S1ap_ServedGUMMEIsItem_t *)
|
||||
core_calloc(numServedGUMMEI, sizeof(S1ap_ServedGUMMEIsItem_t));
|
||||
for (i = 0; i < numServedGUMMEI; i++)
|
||||
|
@ -61,8 +59,10 @@ status_t s1ap_build_setup_rsp(pkbuf_t **pkbuf)
|
|||
ASN_SEQUENCE_ADD(&servedGUMMEI->servedMMECs, mmeCode);
|
||||
}
|
||||
}
|
||||
|
||||
ASN_SEQUENCE_ADD(&ies->servedGUMMEIs, servedGUMMEI);
|
||||
|
||||
ies->relativeMMECapacity = mme_self()->relative_capacity;
|
||||
|
||||
message.procedureCode = S1ap_ProcedureCode_id_S1Setup;
|
||||
message.direction = S1AP_PDU_PR_successfulOutcome;
|
||||
|
||||
|
|
|
@ -27,7 +27,8 @@ status_t s1ap_build_setup_req(pkbuf_t **pkbuf, c_uint32_t enb_id)
|
|||
|
||||
supportedTA = (S1ap_SupportedTAs_Item_t *)
|
||||
core_calloc(1, sizeof(S1ap_SupportedTAs_Item_t));
|
||||
s1ap_conv_uint16_to_octet_string(mme_self()->tac, &supportedTA->tAC);
|
||||
s1ap_conv_uint16_to_octet_string(
|
||||
mme_self()->tracking_area_code, &supportedTA->tAC);
|
||||
plmnIdentity = (S1ap_PLMNidentity_t *)
|
||||
core_calloc(1, sizeof(S1ap_PLMNidentity_t));
|
||||
s1ap_conv_plmn_id_to_tbcd_string(
|
||||
|
@ -36,6 +37,8 @@ status_t s1ap_build_setup_req(pkbuf_t **pkbuf, c_uint32_t enb_id)
|
|||
|
||||
ASN_SEQUENCE_ADD(&ies->supportedTAs, supportedTA);
|
||||
|
||||
ies->defaultPagingDRX = mme_self()->default_paging_drx;
|
||||
|
||||
message.direction = S1AP_PDU_PR_initiatingMessage;
|
||||
message.procedureCode = S1ap_ProcedureCode_id_S1Setup;
|
||||
|
||||
|
|
Loading…
Reference in New Issue