forked from acouzens/open5gs
update it
This commit is contained in:
parent
8bdfef6a35
commit
e07f023241
|
@ -7,7 +7,9 @@ libmme_la_SOURCES = \
|
|||
mme_event.h mme_context.h \
|
||||
s1ap_build.h s1ap_handler.h s1ap_conv.h s1ap_path.h \
|
||||
mme_s6a_handler.h \
|
||||
nas_conv.h nas_security.h emm_handler.h esm_handler.h \
|
||||
nas_conv.h nas_security.h \
|
||||
emm_handler.h \
|
||||
esm_handler.h esm_build.h \
|
||||
mme_s11_path.h mme_s11_build.h \
|
||||
mme_sm.h
|
||||
|
||||
|
@ -16,7 +18,8 @@ nodist_libmme_la_SOURCES = \
|
|||
mme_init.c mme_event.c mme_context.c \
|
||||
s1ap_sm.c s1ap_build.c s1ap_handler.c s1ap_conv.c s1ap_path.c \
|
||||
mme_s6a_handler.c \
|
||||
nas_conv.c nas_security.c emm_sm.c emm_handler.c esm_sm.c esm_handler.c \
|
||||
nas_conv.c nas_security.c emm_sm.c emm_handler.c \
|
||||
esm_sm.c esm_handler.c esm_build.c \
|
||||
mme_s11_path.c mme_s11_build.c \
|
||||
mme_sm.c
|
||||
|
||||
|
|
|
@ -196,25 +196,3 @@ void emm_handle_authentication_response(
|
|||
sendbuf,,);
|
||||
mme_event_nas_to_s1ap(ue, sendbuf);
|
||||
}
|
||||
|
||||
void emm_handle_security_mode_complete(mme_ue_t *ue)
|
||||
{
|
||||
nas_message_t message;
|
||||
pkbuf_t *sendbuf = NULL;
|
||||
|
||||
memset(&message, 0, sizeof(message));
|
||||
message.h.security_header_type =
|
||||
NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED;
|
||||
message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM;
|
||||
|
||||
message.esm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_ESM;
|
||||
message.esm.h.procedure_transaction_identity = 33;
|
||||
message.esm.h.message_type = NAS_ESM_INFORMATION_REQUEST;
|
||||
|
||||
d_assert(nas_security_encode(&sendbuf, ue, &message) == CORE_OK &&
|
||||
sendbuf,,);
|
||||
|
||||
pkbuf_free(sendbuf);
|
||||
d_assert(ue, return, "Null param");
|
||||
mme_s6a_send_air(ue);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ CORE_DECLARE(void) emm_handle_attach_request(
|
|||
CORE_DECLARE(void) emm_handle_authentication_request(mme_ue_t *ue);
|
||||
CORE_DECLARE(void) emm_handle_authentication_response(
|
||||
mme_ue_t *ue, nas_authentication_response_t *authentication_response);
|
||||
CORE_DECLARE(void) emm_handle_security_mode_complete(mme_ue_t *ue);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
#define TRACE_MODULE _esm_build
|
||||
|
||||
#include "core_debug.h"
|
||||
|
||||
#include "nas_message.h"
|
||||
|
||||
#include "nas_security.h"
|
||||
#include "esm_build.h"
|
||||
|
||||
status_t esm_build_information_request(pkbuf_t **pkbuf, mme_esm_t *esm)
|
||||
{
|
||||
nas_message_t message;
|
||||
mme_ue_t *ue = NULL;
|
||||
|
||||
d_assert(esm, return CORE_ERROR, "Null param");
|
||||
ue = esm->ue;
|
||||
d_assert(ue, return CORE_ERROR, "Null param");
|
||||
|
||||
memset(&message, 0, sizeof(message));
|
||||
message.h.security_header_type =
|
||||
NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED;
|
||||
message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM;
|
||||
|
||||
message.esm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_ESM;
|
||||
message.esm.h.procedure_transaction_identity = esm->pti;
|
||||
message.esm.h.message_type = NAS_ESM_INFORMATION_REQUEST;
|
||||
|
||||
d_assert(nas_security_encode(pkbuf, ue, &message) == CORE_OK && *pkbuf,,);
|
||||
|
||||
return CORE_OK;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef __ESM_BUILD_H__
|
||||
#define __ESM_BUILD_H__
|
||||
|
||||
#include "mme_context.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
CORE_DECLARE(status_t) esm_build_information_request(
|
||||
pkbuf_t **pkbuf, mme_esm_t *esm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __ESM_BUILD_H__ */
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "mme_event.h"
|
||||
#include "esm_handler.h"
|
||||
#include "esm_build.h"
|
||||
|
||||
void esm_state_initial(fsm_t *s, event_t *e)
|
||||
{
|
||||
|
@ -56,6 +57,13 @@ void esm_state_operational(fsm_t *s, event_t *e)
|
|||
{
|
||||
case EVT_LO_MME_ESM_INFO_REQ:
|
||||
{
|
||||
pkbuf_t *pkbuf = NULL;
|
||||
status_t rv;
|
||||
|
||||
rv = esm_build_information_request(&pkbuf, esm);
|
||||
d_assert(rv == CORE_OK, break, "esm_build failed");
|
||||
|
||||
mme_event_nas_to_s1ap(ue, pkbuf);
|
||||
d_info("[NAS] ESM information request : "
|
||||
"UE[%s] <--- ESM[%d]", ue->imsi_bcd, esm->pti);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue