update it
This commit is contained in:
parent
87acd05c2d
commit
401dae4a71
|
@ -26,7 +26,7 @@
|
|||
/*******************************************************************************
|
||||
* This file had been created by gtpv2c_tlv.py script v0.1.0
|
||||
* Please do not modify this file but regenerate it via script.
|
||||
* Created on: 2017-03-31 08:55:14.436967 by acetcom
|
||||
* Created on: 2017-04-07 19:18:35.663184 by acetcom
|
||||
* from 24301-d80.docx
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -630,6 +630,8 @@ status_t nas_plain_decode(nas_message_t *message, pkbuf_t *pkbuf)
|
|||
d_assert(size >= CORE_OK, return CORE_ERROR, "decode error");
|
||||
decoded += size;
|
||||
break;
|
||||
case NAS_AUTHENTICATION_REJECT:
|
||||
break;
|
||||
case NAS_IDENTITY_REQUEST:
|
||||
size = nas_decode_identity_request(message, pkbuf);
|
||||
d_assert(size >= CORE_OK, return CORE_ERROR, "decode error");
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
/*******************************************************************************
|
||||
* This file had been created by gtpv2c_tlv.py script v0.1.0
|
||||
* Please do not modify this file but regenerate it via script.
|
||||
* Created on: 2017-03-31 08:55:14.443538 by acetcom
|
||||
* Created on: 2017-04-07 19:18:35.669382 by acetcom
|
||||
* from 24301-d80.docx
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -715,6 +715,8 @@ status_t nas_plain_encode(pkbuf_t **pkbuf, nas_message_t *message)
|
|||
d_assert(size >= 0, return CORE_ERROR, "decode error");
|
||||
encoded += size;
|
||||
break;
|
||||
case NAS_AUTHENTICATION_REJECT:
|
||||
break;
|
||||
case NAS_IDENTITY_REQUEST:
|
||||
size = nas_encode_identity_request(*pkbuf, message);
|
||||
d_assert(size >= 0, return CORE_ERROR, "decode error");
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
/*******************************************************************************
|
||||
* This file had been created by gtpv2c_tlv.py script v0.1.0
|
||||
* Please do not modify this file but regenerate it via script.
|
||||
* Created on: 2017-03-31 08:55:14.424942 by acetcom
|
||||
* Created on: 2017-04-07 19:18:35.652865 by acetcom
|
||||
* from 24301-d80.docx
|
||||
******************************************************************************/
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
/*******************************************************************************
|
||||
* This file had been created by gtpv2c_tlv.py script v0.1.0
|
||||
* Please do not modify this file but regenerate it via script.
|
||||
* Created on: 2017-03-31 08:55:14.422134 by acetcom
|
||||
* Created on: 2017-04-07 19:18:35.650438 by acetcom
|
||||
* from 24301-d80.docx
|
||||
******************************************************************************/
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
/*******************************************************************************
|
||||
* This file had been created by gtpv2c_tlv.py script v0.1.0
|
||||
* Please do not modify this file but regenerate it via script.
|
||||
* Created on: 2017-03-31 08:55:14.430326 by acetcom
|
||||
* Created on: 2017-04-07 19:18:35.658375 by acetcom
|
||||
* from 24301-d80.docx
|
||||
******************************************************************************/
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
ies = []
|
||||
msg_list[key]["ies"] = ies
|
|
@ -213,6 +213,7 @@ msg_list["ATTACH COMPLETE"]["table"] = 9
|
|||
msg_list["ATTACH REJECT"]["table"] = 10
|
||||
msg_list["ATTACH REQUEST"]["table"] = 11
|
||||
msg_list["AUTHENTICATION FAILURE"]["table"] = 12
|
||||
msg_list["AUTHENTICATION REJECT"]["table"] = 13
|
||||
msg_list["AUTHENTICATION REQUEST"]["table"] = 14
|
||||
msg_list["AUTHENTICATION RESPONSE"]["table"] = 15
|
||||
msg_list["IDENTITY REQUEST"]["table"] = 27
|
||||
|
@ -632,13 +633,11 @@ f.write("""status_t nas_plain_decode(nas_message_t *message, pkbuf_t *pkbuf)
|
|||
for (k, v) in sorted_msg_list:
|
||||
if "ies" not in msg_list[k]:
|
||||
continue;
|
||||
if len(msg_list[k]["ies"]) == 0:
|
||||
continue
|
||||
|
||||
f.write(" case NAS_%s:\n" % v_upper(k))
|
||||
f.write(" size = nas_decode_%s(message, pkbuf);\n" % v_lower(k))
|
||||
f.write(" d_assert(size >= CORE_OK, return CORE_ERROR, \"decode error\");\n")
|
||||
f.write(" decoded += size;\n")
|
||||
if len(msg_list[k]["ies"]) != 0:
|
||||
f.write(" size = nas_decode_%s(message, pkbuf);\n" % v_lower(k))
|
||||
f.write(" d_assert(size >= CORE_OK, return CORE_ERROR, \"decode error\");\n")
|
||||
f.write(" decoded += size;\n")
|
||||
f.write(" break;\n")
|
||||
|
||||
f.write(""" default:
|
||||
|
@ -729,13 +728,11 @@ f.write("""status_t nas_plain_encode(pkbuf_t **pkbuf, nas_message_t *message)
|
|||
for (k, v) in sorted_msg_list:
|
||||
if "ies" not in msg_list[k]:
|
||||
continue;
|
||||
if len(msg_list[k]["ies"]) == 0:
|
||||
continue
|
||||
|
||||
f.write(" case NAS_%s:\n" % v_upper(k))
|
||||
f.write(" size = nas_encode_%s(*pkbuf, message);\n" % v_lower(k))
|
||||
f.write(" d_assert(size >= 0, return CORE_ERROR, \"decode error\");\n")
|
||||
f.write(" encoded += size;\n")
|
||||
if len(msg_list[k]["ies"]) != 0:
|
||||
f.write(" size = nas_encode_%s(*pkbuf, message);\n" % v_lower(k))
|
||||
f.write(" d_assert(size >= 0, return CORE_ERROR, \"decode error\");\n")
|
||||
f.write(" encoded += size;\n")
|
||||
f.write(" break;\n")
|
||||
|
||||
|
||||
|
|
|
@ -129,3 +129,23 @@ void emm_handle_authentication_response(
|
|||
d_info("[NAS] Security mode command : UE[%s] <-- EMM", ue->imsi);
|
||||
}
|
||||
|
||||
void emm_handle_security_mode_complete(mme_ue_t *ue)
|
||||
{
|
||||
nas_message_t message;
|
||||
#if 0
|
||||
pkbuf_t *sendbuf = NULL;
|
||||
#endif
|
||||
|
||||
memset(&message, 0, sizeof(message));
|
||||
message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM;
|
||||
message.h.message_type = NAS_ESM_INFORMATION_REQUEST;
|
||||
|
||||
message.h.security_header_type =
|
||||
NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED;
|
||||
#if 0
|
||||
d_assert(nas_security_encode(&sendbuf, ue, &message) == CORE_OK &&
|
||||
sendbuf,,);
|
||||
#endif
|
||||
|
||||
d_assert(ue, return, "Null param");
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ CORE_DECLARE(void) emm_handle_attach_request(
|
|||
mme_ue_t *ue, nas_attach_request_t *attach_request);
|
||||
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
|
||||
}
|
||||
|
|
|
@ -87,6 +87,7 @@ void emm_state_operational(emm_sm_t *s, event_t *e)
|
|||
d_assert(ue->imsi, return,);
|
||||
d_info("[NAS] Security mode complete : UE[%s] --> EMM",
|
||||
ue->imsi);
|
||||
emm_handle_security_mode_complete(ue);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue