update it

This commit is contained in:
Sukchan Lee 2017-04-10 00:27:19 +09:00
parent 4d749f41f5
commit d9307d3187
12 changed files with 177 additions and 93 deletions

View File

@ -16,7 +16,14 @@ extern "C" {
#define MAX_SDU_LEN 2048
#define PLMN_ID_LEN 3
#define MAX_IMSI_LEN 15
#define BCD_TO_BUFFER_LEN(x) (((x)+1)/2)
#define MAX_IMSI_BCD_LEN 15
#define MAX_IMSI_LEN BCD_TO_BUFFER_LEN(MAX_IMSI_BCD_LEN)
#define MAX_MSISDN_BCD_LEN 15
#define MAX_MSISDN_LEN BCD_TO_BUFFER_LEN(MAX_MSISDN_BCD_LEN)
#define MAX_MEI_BCD_LEN 16
#define MAX_MEI_LEN BCD_TO_BUFFER_LEN(MAX_MEI_BCD_LEN)
#define RAND_LEN 16
#define AUTN_LEN 16

View File

@ -15,6 +15,20 @@ extern "C" {
#define MODE_MME 0x1
#define MODE_HSS 0x2
#define S6A_ULR_SINGLE_REGISTRATION_IND (1)
#define S6A_ULR_S6A_S6D_INDICATOR (1 << 1)
#define S6A_ULR_SKIP_SUBSCRIBER_DATA (1 << 2)
#define S6A_ULR_GPRS_SUBSCRIPTION_DATA_IND (1 << 3)
#define S6A_ULR_NODE_TYPE_IND (1 << 4)
#define S6A_ULR_INITIAL_ATTACH_IND (1 << 5)
#define S6A_ULR_PS_LCS_SUPPORTED_BY_UE (1 << 6)
#define S6A_ULA_SEPARATION_INDICATION (0)
#define S6A_ULA_MME_REGISTERED_FOR_SMS (1)
#define S6A_UE_SRVCC_NOT_SUPPORTED (0)
#define S6A_UE_SRVCC_SUPPORTED (1)
struct s6a_config_t {
/* Diameter Identity of the local peer (FQDN -- ASCII) */
char *cnf_diamid;

View File

@ -22,6 +22,7 @@ hss_context_t* hss_self()
status_t hss_context_init(void)
{
char buf[HSS_KEY_LEN];
hss_ue_t *ue;
memset(&self, 0, sizeof(hss_context_t));
@ -38,11 +39,18 @@ status_t hss_context_init(void)
#define UE3_IMSI "001010123456819"
#define UE3_RAND "20080c3818183b52 2614162c07601d0d"
#define MSISDN "491725670014"
#define MEI "3516020019874800"
ue = hss_ue_add();
d_assert(ue, return -1, "UE context add failed");
strcpy((char*)ue->imsi, UE1_IMSI);
ue->imsi_len = strlen(UE1_IMSI);
strcpy((char*)ue->imsi_bcd, UE1_IMSI);
ue->imsi_bcd_len = strlen(UE1_IMSI);
strcpy((char*)ue->msisdn_bcd, MSISDN);
ue->msisdn_bcd_len = strlen(MSISDN);
strcpy((char*)ue->mei_bcd, MEI);
ue->mei_bcd_len = strlen(MEI);
memcpy(ue->k, CORE_HEX(K, strlen(K), buf), HSS_KEY_LEN);
core_generate_random_bytes(ue->rand, RAND_LEN);
ue->sqn = 64;
@ -50,8 +58,12 @@ status_t hss_context_init(void)
ue = hss_ue_add();
d_assert(ue, return -1, "UE context add failed");
strcpy((char*)ue->imsi, UE2_IMSI);
ue->imsi_len = strlen(UE2_IMSI);
strcpy((char*)ue->imsi_bcd, UE2_IMSI);
ue->imsi_bcd_len = strlen(UE2_IMSI);
strcpy((char*)ue->msisdn_bcd, MSISDN);
ue->msisdn_bcd_len = strlen(MSISDN);
strcpy((char*)ue->mei_bcd, MEI);
ue->mei_bcd_len = strlen(MEI);
memcpy(ue->k, CORE_HEX(K, strlen(K), buf), HSS_KEY_LEN);
core_generate_random_bytes(ue->rand, RAND_LEN);
ue->sqn = 64;
@ -59,8 +71,12 @@ status_t hss_context_init(void)
ue = hss_ue_add();
d_assert(ue, return -1, "UE context add failed");
strcpy((char*)ue->imsi, UE3_IMSI);
ue->imsi_len = strlen(UE3_IMSI);
strcpy((char*)ue->imsi_bcd, UE3_IMSI);
ue->imsi_bcd_len = strlen(UE3_IMSI);
strcpy((char*)ue->msisdn_bcd, MSISDN);
ue->msisdn_bcd_len = strlen(MSISDN);
strcpy((char*)ue->mei_bcd, MEI);
ue->mei_bcd_len = strlen(MEI);
memcpy(ue->k, CORE_HEX(K, strlen(K), buf), HSS_KEY_LEN);
memcpy(ue->rand, CORE_HEX(UE3_RAND, strlen(UE3_RAND), buf),
RAND_LEN);
@ -125,14 +141,14 @@ status_t hss_ue_remove_all()
return CORE_OK;
}
hss_ue_t* hss_ue_find_by_imsi(c_uint8_t *imsi, c_uint8_t imsi_len)
hss_ue_t* hss_ue_find_by_imsi_bcd(c_uint8_t *imsi_bcd, c_uint8_t imsi_bcd_len)
{
hss_ue_t *ue = NULL;
ue = list_first(&self.ue_list);
while (ue)
{
if (memcmp(ue->imsi, imsi, imsi_len) == 0)
if (memcmp(ue->imsi_bcd, imsi_bcd, imsi_bcd_len) == 0)
break;
ue = list_next(ue);

View File

@ -15,8 +15,14 @@ extern "C" {
typedef struct _hss_ue_t {
lnode_t node; /**< A node of list_t */
c_uint8_t imsi[MAX_IMSI_LEN+1];
c_uint8_t imsi_len;
c_uint8_t imsi_bcd[MAX_IMSI_BCD_LEN+1];
int imsi_bcd_len;
c_uint8_t msisdn_bcd[MAX_MSISDN_BCD_LEN+1];
int msisdn_bcd_len;
c_uint8_t mei_bcd[MAX_MEI_BCD_LEN+1];
int mei_bcd_len;
plmn_id_t visited_plmn_id;
@ -42,8 +48,8 @@ CORE_DECLARE(hss_context_t*) hss_self(void);
CORE_DECLARE(hss_ue_t*) hss_ue_add(void);
CORE_DECLARE(status_t) hss_ue_remove(hss_ue_t *ue);
CORE_DECLARE(status_t) hss_ue_remove_all(void);
CORE_DECLARE(hss_ue_t*) hss_ue_find_by_imsi(
c_uint8_t *imsi, c_uint8_t imsi_len);
CORE_DECLARE(hss_ue_t*) hss_ue_find_by_imsi_bcd(
c_uint8_t *imsi_bcd, c_uint8_t imsi_bcd_len);
CORE_DECLARE(hss_ue_t*) hss_ue_first(void);
CORE_DECLARE(hss_ue_t*) hss_ue_next(hss_ue_t *ue);

View File

@ -60,13 +60,14 @@ static int hss_air_cb( struct msg **msg, struct avp *avp,
goto out,);
d_assert(fd_msg_avp_hdr(avp, &hdr) == 0 && hdr,,);
ue = hss_ue_find_by_imsi(
ue = hss_ue_find_by_imsi_bcd(
hdr->avp_value->os.data, hdr->avp_value->os.len);
if (!ue)
{
char imsi[MAX_IMSI_LEN];
strncpy(imsi, (char*)hdr->avp_value->os.data, hdr->avp_value->os.len);
d_warn("Cannot find IMSI:%s\n", imsi);
char imsi_bcd[MAX_IMSI_BCD_LEN+1];
strncpy(imsi_bcd,
(char*)hdr->avp_value->os.data, hdr->avp_value->os.len);
d_warn("Cannot find IMSI:%s\n", imsi_bcd);
goto out;
}
@ -90,7 +91,7 @@ static int hss_air_cb( struct msg **msg, struct avp *avp,
d_assert(fd_msg_rescode_set(ans, "DIAMETER_SUCCESS", NULL, NULL, 1) == 0,
goto out,);
/* Set the Auth-Session-Statee AVP */
/* Set the Auth-Session-State AVP */
d_assert(fd_msg_avp_new(s6a_auth_session_state, 0, &avp) == 0, goto out,);
val.i32 = 1;
d_assert(fd_msg_avp_setvalue(avp, &val) == 0, goto out,);
@ -155,6 +156,7 @@ static int hss_ulr_cb( struct msg **msg, struct avp *avp,
struct msg *ans, *qry;
#if 0
struct avp *avpch1, *avpch2;
struct avp *avpch1;
#endif
struct avp_hdr *hdr;
union avp_value val;
@ -172,13 +174,14 @@ static int hss_ulr_cb( struct msg **msg, struct avp *avp,
goto out,);
d_assert(fd_msg_avp_hdr(avp, &hdr) == 0 && hdr,,);
ue = hss_ue_find_by_imsi(
ue = hss_ue_find_by_imsi_bcd(
hdr->avp_value->os.data, hdr->avp_value->os.len);
if (!ue)
{
char imsi[MAX_IMSI_LEN];
strncpy(imsi, (char*)hdr->avp_value->os.data, hdr->avp_value->os.len);
d_warn("Cannot find IMSI:%s\n", imsi);
char imsi_bcd[MAX_IMSI_BCD_LEN+1];
strncpy(imsi_bcd,
(char*)hdr->avp_value->os.data, hdr->avp_value->os.len);
d_warn("Cannot find IMSI:%s\n", imsi_bcd);
goto out;
}
@ -200,6 +203,31 @@ static int hss_ulr_cb( struct msg **msg, struct avp *avp,
d_assert(fd_msg_avp_setvalue(avp, &val) == 0, goto out,);
d_assert(fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp) == 0, goto out,);
/* Set the ULA Flags */
d_assert(fd_msg_avp_new(s6a_ula_flags, 0, &avp) == 0, goto out,);
val.i32 = S6A_ULA_MME_REGISTERED_FOR_SMS;
d_assert(fd_msg_avp_setvalue(avp, &val) == 0, goto out,);
d_assert(fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp) == 0, goto out,);
d_assert(fd_msg_search_avp(qry, s6a_ulr_flags, &avp) == 0 &&
avp, goto out,);
d_assert(fd_msg_avp_hdr(avp, &hdr) == 0 && hdr,,);
if (hdr && hdr->avp_value &&
!(hdr->avp_value->u32 & S6A_ULR_SKIP_SUBSCRIBER_DATA))
{
/* Set the Subscription Data */
#if 0
d_assert(fd_msg_avp_new(s6a_subscription_data, 0, &avp) == 0,
goto out,);
d_assert(fd_msg_avp_new(s6a_msisdn, 0, &avpch1) == 0, goto out,);
d_assert(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avpch1) == 0,
goto out,);
d_assert(fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp) == 0,
goto out,);
#endif
}
/* Send the answer */
fd_msg_send(msg, NULL, NULL);

View File

@ -62,8 +62,11 @@ void emm_handle_attach_request(
{
case NAS_EPS_MOBILE_IDENTITY_IMSI:
{
memcpy(&ue->visited_plmn_id, &mme_self()->plmn_id, PLMN_ID_LEN);
nas_imsi_to_bcd(
&eps_mobile_identity->imsi, eps_mobile_identity->length,
ue->imsi_bcd, &ue->imsi_bcd_len);
memcpy(&ue->visited_plmn_id, &mme_self()->plmn_id, PLMN_ID_LEN);
if (attach_request->presencemask &
NAS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT)
{
@ -74,9 +77,6 @@ void emm_handle_attach_request(
&last_visited_registered_tai->plmn_id,
PLMN_ID_LEN);
}
nas_imsi_bcd_to_buffer(
&eps_mobile_identity->imsi, eps_mobile_identity->length,
ue->imsi, &ue->imsi_len);
memcpy(&ue->ue_network_capability,
&attach_request->ue_network_capability,
@ -85,8 +85,7 @@ void emm_handle_attach_request(
&attach_request->ms_network_capability,
sizeof(attach_request->ms_network_capability));
d_assert(ue->imsi, return,);
d_info("[NAS] Attach request : UE[%s] --> EMM", ue->imsi);
d_info("[NAS] Attach request : UE[%s] --> EMM", ue->imsi_bcd);
mme_s6a_send_air(ue);
break;
@ -128,8 +127,8 @@ void emm_handle_authentication_response(
return;
}
d_assert(ue->imsi, return, );
d_info("[NAS] Authentication response : UE[%s] --> EMM", ue->imsi);
d_info("[NAS] Authentication response : UE[%s] --> EMM",
ue->imsi_bcd);
memset(&message, 0, sizeof(message));
message.h.security_header_type =
@ -170,8 +169,7 @@ void emm_handle_authentication_response(
sendbuf,,);
mme_event_nas_to_s1ap(ue, sendbuf);
d_assert(ue->imsi, return,);
d_info("[NAS] Security mode command : UE[%s] <-- EMM", ue->imsi);
d_info("[NAS] Security mode command : UE[%s] <-- EMM", ue->imsi_bcd);
}
void emm_handle_security_mode_complete(mme_ue_t *ue)

View File

@ -64,9 +64,8 @@ void emm_state_operational(emm_sm_t *s, event_t *e)
mme_event_nas_to_s1ap(ue, pkbuf_copy(recvbuf));
d_assert(ue->imsi, return,);
d_info("[NAS] Authentication request : UE[%s] <-- EMM",
ue->imsi);
ue->imsi_bcd);
break;
}
case NAS_AUTHENTICATION_RESPONSE:
@ -77,9 +76,8 @@ void emm_state_operational(emm_sm_t *s, event_t *e)
}
case NAS_SECURITY_MODE_COMPLETE:
{
d_assert(ue->imsi, return,);
d_info("[NAS] Security mode complete : UE[%s] --> EMM",
ue->imsi);
ue->imsi_bcd);
mme_s6a_send_ulr(ue);
break;
}

View File

@ -100,8 +100,13 @@ typedef struct _mme_ue_t {
/* UE identity */
c_uint32_t enb_ue_s1ap_id; /** eNB-UE-S1AP-ID received from eNB */
c_uint32_t mme_ue_s1ap_id; /** MME-UE-S1AP-ID received from MME */
c_uint8_t imsi[MAX_IMSI_LEN+1];
#if 0
c_uint8_t imsi[MAX_IMSI_LEN];
c_uint8_t imsi_len;
#else
c_uint8_t imsi_bcd[MAX_IMSI_BCD_LEN+1];
c_uint8_t imsi_bcd_len;
#endif
/* UE Info */
plmn_id_t visited_plmn_id;

View File

@ -53,9 +53,8 @@ static void mme_s6a_aia_cb(void *data, struct msg **msg)
ue = mi->ue;
d_assert(ue, error++; goto out,);
d_assert(ue->imsi, error++; goto out,);
d_info("[S6A] Authentication-Information-Response : UE[%s] <-- HSS",
ue->imsi);
ue->imsi_bcd);
/* Value of Result Code */
d_assert(fd_msg_search_avp(*msg, s6a_result_code, &avp) == 0 && avp,
@ -206,8 +205,8 @@ int mme_s6a_send_air(mme_ue_t *ue)
/* Set the User-Name AVP */
d_assert(fd_msg_avp_new(s6a_user_name, 0, &avp) == 0, goto out,);
val.os.data = ue->imsi;
val.os.len = ue->imsi_len;
val.os.data = ue->imsi_bcd;
val.os.len = ue->imsi_bcd_len;
d_assert(fd_msg_avp_setvalue(avp, &val) == 0, goto out, );
d_assert(fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp) == 0, goto out,);
@ -251,9 +250,8 @@ int mme_s6a_send_air(mme_ue_t *ue)
s6a_config->stats.nb_sent++;
d_assert(pthread_mutex_unlock(&s6a_config->stats_lock) == 0,, );
d_assert(ue->imsi, return 0,);
d_info("[S6A] Authentication-Information-Request : UE[%s] --> HSS",
ue->imsi);
ue->imsi_bcd);
return 0;
@ -300,9 +298,8 @@ static void mme_s6a_ula_cb(void *data, struct msg **msg)
ue = mi->ue;
d_assert(ue, error++; goto out,);
d_assert(ue->imsi, error++; goto out,);
d_info("[S6A] Authentication-Information-Response : UE[%s] <-- HSS",
ue->imsi);
ue->imsi_bcd);
/* Value of Result Code */
d_assert(fd_msg_search_avp(*msg, s6a_result_code, &avp) == 0 && avp,
@ -454,8 +451,8 @@ int mme_s6a_send_ulr(mme_ue_t *ue)
/* Set the User-Name AVP */
d_assert(fd_msg_avp_new(s6a_user_name, 0, &avp) == 0, goto out,);
val.os.data = ue->imsi;
val.os.len = ue->imsi_len;
val.os.data = ue->imsi_bcd;
val.os.len = ue->imsi_bcd_len;
d_assert(fd_msg_avp_setvalue(avp, &val) == 0, goto out, );
d_assert(fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp) == 0, goto out,);
@ -473,20 +470,12 @@ int mme_s6a_send_ulr(mme_ue_t *ue)
#define S6A_RAT_TYPE_HRPD 2001
#define S6A_RAT_TYPE_UMB 2002
#define S6A_RAT_TYPE_EHRPD 2003
val.u32 = S6A_RAT_TYPE_EUTRAN;
d_assert(fd_msg_avp_setvalue(avp, &val) == 0, goto out,);
d_assert(fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp) == 0, goto out,);
/* Set the ULR-Flags */
d_assert(fd_msg_avp_new(s6a_ulr_flags, 0, &avp) == 0, goto out,);
#define S6A_ULR_SINGLE_REGISTRATION_IND (1)
#define S6A_ULR_S6A_S6D_INDICATOR (1 << 1)
#define S6A_ULR_SKIP_SUBSCRIBER_DATA (1 << 2)
#define S6A_ULR_GPRS_SUBSCRIPTION_DATA_IND (1 << 3)
#define S6A_ULR_NODE_TYPE_IND (1 << 4)
#define S6A_ULR_INITIAL_ATTACH_IND (1 << 5)
#define S6A_ULR_PS_LCS_SUPPORTED_BY_UE (1 << 6)
val.u32 = S6A_ULR_S6A_S6D_INDICATOR;
d_assert(fd_msg_avp_setvalue(avp, &val) == 0, goto out,);
d_assert(fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp) == 0, goto out,);
@ -500,15 +489,10 @@ int mme_s6a_send_ulr(mme_ue_t *ue)
/* Set the UE-SRVCC Capability */
d_assert(fd_msg_avp_new(s6a_ue_srvcc_cap, 0, &avp) == 0, goto out,);
#define S6A_UE_SRVCC_NOT_SUPPORTED (0)
#define S6A_UE_SRVCC_SUPPORTED (1)
val.u32 = S6A_UE_SRVCC_NOT_SUPPORTED;
d_assert(fd_msg_avp_setvalue(avp, &val) == 0, goto out,);
d_assert(fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp) == 0, goto out,);
/* FIXME : Supported-Features */
d_assert(clock_gettime(CLOCK_REALTIME, &mi->ts) == 0, goto out,);
/* Keep a pointer to the session data for debug purpose,
@ -526,9 +510,8 @@ int mme_s6a_send_ulr(mme_ue_t *ue)
s6a_config->stats.nb_sent++;
d_assert(pthread_mutex_unlock(&s6a_config->stats_lock) == 0,, );
d_assert(ue->imsi, return 0,);
d_info("[S6A] Update-Location-Request : UE[%s] --> HSS",
ue->imsi);
ue->imsi_bcd);
return 0;

View File

@ -4,33 +4,62 @@
#include "nas_conv.h"
void nas_imsi_bcd_to_buffer(
nas_mobile_identity_imsi_t *bcd, c_uint8_t bcd_len,
c_uint8_t *buf, c_uint8_t *buf_len)
void nas_imsi_to_bcd(
nas_mobile_identity_imsi_t *imsi, c_uint8_t imsi_len,
c_uint8_t *bcd, c_uint8_t *bcd_len)
{
buf[0] = '0' + bcd->digit1;
buf[1] = '0' + bcd->digit2;
buf[2] = '0' + bcd->digit3;
buf[3] = '0' + bcd->digit4;
buf[4] = '0' + bcd->digit5;
buf[5] = '0' + bcd->digit6;
buf[6] = '0' + bcd->digit7;
buf[7] = '0' + bcd->digit8;
buf[8] = '0' + bcd->digit9;
buf[9] = '0' + bcd->digit10;
buf[10] = '0' + bcd->digit11;
buf[11] = '0' + bcd->digit12;
buf[12] = '0' + bcd->digit13;
buf[13] = '0' + bcd->digit14;
buf[14] = '0' + bcd->digit15;
bcd[0] = '0' + imsi->digit1;
bcd[1] = '0' + imsi->digit2;
bcd[2] = '0' + imsi->digit3;
bcd[3] = '0' + imsi->digit4;
bcd[4] = '0' + imsi->digit5;
bcd[5] = '0' + imsi->digit6;
bcd[6] = '0' + imsi->digit7;
bcd[7] = '0' + imsi->digit8;
bcd[8] = '0' + imsi->digit9;
bcd[9] = '0' + imsi->digit10;
bcd[10] = '0' + imsi->digit11;
bcd[11] = '0' + imsi->digit12;
bcd[12] = '0' + imsi->digit13;
bcd[13] = '0' + imsi->digit14;
bcd[14] = '0' + imsi->digit15;
*buf_len = bcd_len * 2 - 1;
if (!bcd->odd_even) /* if bcd length is even */
*bcd_len = imsi_len * 2 - 1;
if (!imsi->odd_even) /* if bcd length is even */
{
if (buf[*buf_len] != 0xf)
d_warn("Spec warning : buf[%d] = 0x%x", *buf_len, buf[*buf_len]);
(*buf_len)--;
if (bcd[*bcd_len] != 0xf)
d_warn("Spec warning : bcd[%d] = 0x%x", *bcd_len, bcd[*bcd_len]);
(*bcd_len)--;
}
buf[*buf_len] = 0;
bcd[*bcd_len] = 0;
}
void nas_imsi_to_buffer(
nas_mobile_identity_imsi_t *imsi, c_uint8_t imsi_len,
c_uint8_t *buf, c_uint8_t *buf_len)
{
buf[0] = ((('0' + imsi->digit2) << 4) & 0xf0) |
(('0' + imsi->digit1) & 0x0f);
buf[1] = ((('0' + imsi->digit4) << 4) & 0xf0) |
(('0' + imsi->digit3) & 0x0f);
buf[2] = ((('0' + imsi->digit6) << 4) & 0xf0) |
(('0' + imsi->digit5) & 0x0f);
buf[3] = ((('0' + imsi->digit8) << 4) & 0xf0) |
(('0' + imsi->digit7) & 0x0f);
buf[4] = ((('0' + imsi->digit10) << 4) & 0xf0) |
(('0' + imsi->digit9) & 0x0f);
buf[5] = ((('0' + imsi->digit12) << 4) & 0xf0) |
(('0' + imsi->digit11) & 0x0f);
buf[6] = ((('0' + imsi->digit14) << 4) & 0xf0) |
(('0' + imsi->digit13) & 0x0f);
buf[7] = ((('0' + imsi->digit15)) & 0x0f);
*buf_len = imsi_len;
if (!imsi->odd_even) /* if imsi length is even */
{
(*buf_len)--;
if ((buf[*buf_len] & 0xf) != 0xf)
d_warn("Spec warning : buf[%d] = 0x%x", *buf_len, buf[*buf_len]);
}
}

View File

@ -7,10 +7,14 @@
extern "C" {
#endif /* __cplusplus */
CORE_DECLARE(void) nas_imsi_bcd_to_buffer(
nas_mobile_identity_imsi_t *bcd, c_uint8_t bcd_len,
CORE_DECLARE(void) nas_imsi_to_buffer(
nas_mobile_identity_imsi_t *imsi, c_uint8_t imsi_len,
c_uint8_t *buf, c_uint8_t *buf_len);
CORE_DECLARE(void) nas_imsi_to_bcd(
nas_mobile_identity_imsi_t *imsi, c_uint8_t imsi_len,
c_uint8_t *bcd, c_uint8_t *bcd_len);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -30,7 +30,7 @@ static void nas_sm_test1(abts_case *tc, void *data)
sock = tests1ap_enb_connect();
ABTS_PTR_NOTNULL(tc, sock);
d_log_set_level(D_MSG_TO_STDOUT, D_LOG_LEVEL_WARN);
d_log_set_level(D_MSG_TO_STDOUT, D_LOG_LEVEL_FULL);
/* Send S1-Setup Reqeust */
rv = tests1ap_build_setup_req(&sendbuf, 0x54f64);
ABTS_INT_EQUAL(tc, CORE_OK, rv);
@ -98,10 +98,6 @@ abts_suite *test_nas_sm(abts_suite *suite)
{
suite = ADD_SUITE(suite)
#if 1
d_log_set_level(D_MSG_TO_STDOUT, D_LOG_LEVEL_FULL);
#endif
abts_run_test(suite, nas_sm_test1, NULL);
return suite;