name changes
This commit is contained in:
parent
cb31d53af7
commit
a951e59436
|
@ -3,10 +3,10 @@
|
|||
noinst_LTLIBRARIES = libmessagenas.la
|
||||
|
||||
libmessagenas_la_SOURCES = \
|
||||
nas_message.h
|
||||
nas_message.h nas_ies.h
|
||||
|
||||
nodist_libmessagenas_la_SOURCES = \
|
||||
nas_message.c
|
||||
nas_message.c nas_ies.c
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/lib/core/include
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
#define TRACE_MODULE _nasies
|
||||
|
||||
#include "core_debug.h"
|
||||
#include "nas_ies.h"
|
||||
|
||||
status_t nas_decode_attach_info(
|
||||
nas_attach_info_t *attach_info, pkbuf_t *pkbuf)
|
||||
{
|
||||
c_uint16_t size = 0;
|
||||
|
||||
size = sizeof(nas_attach_info_t);
|
||||
d_assert(pkbuf->len >= size, return CORE_ERROR,
|
||||
"pkbuf->len(%d), size(%d)\n", pkbuf->len, size);
|
||||
memcpy(attach_info, pkbuf->payload, size);
|
||||
pkbuf_header(pkbuf, -size);
|
||||
|
||||
return CORE_OK;
|
||||
}
|
||||
|
||||
status_t nas_decode_eps_mobile_identity(
|
||||
nas_eps_mobile_identity_t *eps_mobile_identity, pkbuf_t *pkbuf)
|
||||
{
|
||||
c_uint16_t size = 0;
|
||||
nas_eps_mobile_identity_t *header = pkbuf->payload;
|
||||
|
||||
size = header->len + sizeof(header->len);
|
||||
d_assert(pkbuf->len >= size, return CORE_ERROR,
|
||||
"pkbuf->len(%d), size(%d)\n", pkbuf->len, size);
|
||||
memcpy(eps_mobile_identity, pkbuf->payload, size);
|
||||
|
||||
if (header->type_of_identity == NAS_EPS_MOBILE_IDENTITY_GUTI)
|
||||
{
|
||||
eps_mobile_identity->u.guti.mme_group_id =
|
||||
ntohs(eps_mobile_identity->u.guti.mme_group_id);
|
||||
eps_mobile_identity->u.guti.m_tmsi =
|
||||
ntohl(eps_mobile_identity->u.guti.m_tmsi);
|
||||
}
|
||||
|
||||
pkbuf_header(pkbuf, -size);
|
||||
|
||||
return CORE_OK;
|
||||
}
|
||||
|
||||
status_t nas_decode_ue_network_capability(
|
||||
nas_ue_network_capability_t *ue_network_capability, pkbuf_t *pkbuf)
|
||||
{
|
||||
c_uint16_t size = 0;
|
||||
nas_ue_network_capability_t *header = pkbuf->payload;
|
||||
|
||||
size = header->len + sizeof(header->len);
|
||||
d_assert(pkbuf->len >= size, return CORE_ERROR,
|
||||
"pkbuf->len(%d), size(%d)\n", pkbuf->len, size);
|
||||
memcpy(ue_network_capability, pkbuf->payload, size);
|
||||
pkbuf_header(pkbuf, -size);
|
||||
|
||||
return CORE_OK;
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
#ifndef _NAS_IES_H__
|
||||
#define _NAS_IES_H__
|
||||
|
||||
#include "core_pkbuf.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define NAS_KEY_SET_IDENTIFIER_NATIVE 0
|
||||
#define NAS_KEY_SET_IDENTIFIER_MAPPED 1
|
||||
#define NAS_KEY_SET_IDENTIFIER_NOT_AVAILABLE 0x111
|
||||
|
||||
#define NAS_ATTACH_TYPE_EPS_ATTACH 1
|
||||
#define NAS_ATTACH_TYPE_COMBINED_EPS_IMSI_ATTAACH 2
|
||||
#define NAS_ATTACH_TYPE_EPS_ERMERGENCY_ATTCH 3
|
||||
#define NAS_ATTACH_TYPE_RESERVED 4
|
||||
typedef struct _nas_attach_info_t {
|
||||
ED4(c_uint8_t tsc:1;,
|
||||
c_uint8_t nas_key_set_identifier:3;,
|
||||
c_uint8_t spare:1;,
|
||||
c_uint8_t attach_type:3;)
|
||||
} __attribute__ ((packed)) nas_attach_info_t;
|
||||
|
||||
CORE_DECLARE(status_t) nas_decode_attach_info(
|
||||
nas_attach_info_t *attach_info, pkbuf_t *pkbuf);
|
||||
|
||||
#define NAS_EPS_MOBILE_IDENTITY_IMSI 1
|
||||
#define NAS_EPS_MOBILE_IDENTITY_GUTI 6
|
||||
#define NAS_EPS_MOBILE_IDENTITY_IMEI 3
|
||||
|
||||
#define NAS_EPS_MOBILE_IDENTITY_EVEN 0
|
||||
#define NAS_EPS_MOBILE_IDENTITY_ODD 1
|
||||
typedef struct _nas_eps_mobile_identity_guti_t {
|
||||
ED2(c_uint8_t mcc_digit2:4;,
|
||||
c_uint8_t mcc_digit1:4;)
|
||||
ED2(c_uint8_t mnc_digit3:4;,
|
||||
c_uint8_t mcc_digit3:4;)
|
||||
ED2(c_uint8_t mnc_digit2:4;,
|
||||
c_uint8_t mnc_digit1:4;)
|
||||
c_uint16_t mme_group_id;
|
||||
c_uint8_t mme_code;
|
||||
c_uint32_t m_tmsi;
|
||||
} __attribute__ ((packed)) nas_eps_mobile_identity_guti_t;
|
||||
|
||||
typedef struct _nas_eps_mobile_identity_imsi_t {
|
||||
ED2(c_uint8_t digit2:4;,
|
||||
c_uint8_t digit3:4;)
|
||||
ED2(c_uint8_t digit4:4;,
|
||||
c_uint8_t digit5:4;)
|
||||
ED2(c_uint8_t digit6:4;,
|
||||
c_uint8_t digit7:4;)
|
||||
ED2(c_uint8_t digit8:4;,
|
||||
c_uint8_t digit9:4;)
|
||||
ED2(c_uint8_t digit10:4;,
|
||||
c_uint8_t digit11:4;)
|
||||
ED2(c_uint8_t digit12:4;,
|
||||
c_uint8_t digit13:4;)
|
||||
ED2(c_uint8_t digit14:4;,
|
||||
c_uint8_t digit15:4;)
|
||||
} __attribute__ ((packed)) nas_eps_mobile_identity_imsi_t;
|
||||
|
||||
typedef nas_eps_mobile_identity_imsi_t nas_eps_mobile_identity_imei_t;
|
||||
|
||||
typedef struct _nas_eps_mobile_identity_t {
|
||||
c_uint8_t len;
|
||||
ED3(c_uint8_t digit1:4;,
|
||||
c_uint8_t odd_even:1;,
|
||||
c_uint8_t type_of_identity:3;)
|
||||
union {
|
||||
nas_eps_mobile_identity_imsi_t imsi;
|
||||
nas_eps_mobile_identity_guti_t guti;
|
||||
nas_eps_mobile_identity_imei_t imei;
|
||||
} u;
|
||||
} __attribute__ ((packed)) nas_eps_mobile_identity_t;
|
||||
|
||||
CORE_DECLARE(status_t) nas_decode_eps_mobile_identity(
|
||||
nas_eps_mobile_identity_t *eps_mobile_identity, pkbuf_t *pkbuf);
|
||||
|
||||
typedef struct _nas_ue_network_capability_t {
|
||||
c_uint8_t len;
|
||||
ED8(c_uint8_t eea0:1;,
|
||||
c_uint8_t eea1:1;,
|
||||
c_uint8_t eea2:1;,
|
||||
c_uint8_t eea3:1;,
|
||||
c_uint8_t eea4:1;,
|
||||
c_uint8_t eea5:1;,
|
||||
c_uint8_t eea6:1;,
|
||||
c_uint8_t eea7:1;)
|
||||
ED8(c_uint8_t eia0:1;,
|
||||
c_uint8_t eia1:1;,
|
||||
c_uint8_t eia2:1;,
|
||||
c_uint8_t eia3:1;,
|
||||
c_uint8_t eia4:1;,
|
||||
c_uint8_t eia5:1;,
|
||||
c_uint8_t eia6:1;,
|
||||
c_uint8_t eia7:1;)
|
||||
ED8(c_uint8_t uea0:1;,
|
||||
c_uint8_t uea1:1;,
|
||||
c_uint8_t uea2:1;,
|
||||
c_uint8_t uea3:1;,
|
||||
c_uint8_t uea4:1;,
|
||||
c_uint8_t uea5:1;,
|
||||
c_uint8_t uea6:1;,
|
||||
c_uint8_t uea7:1;)
|
||||
ED8(c_uint8_t ucs2:1;,
|
||||
c_uint8_t uia1:1;,
|
||||
c_uint8_t uia2:1;,
|
||||
c_uint8_t uia3:1;,
|
||||
c_uint8_t uia4:1;,
|
||||
c_uint8_t uia5:1;,
|
||||
c_uint8_t uia6:1;,
|
||||
c_uint8_t uia7:1;)
|
||||
ED8(c_uint8_t prose_dd:1;,
|
||||
c_uint8_t prose:1;,
|
||||
c_uint8_t h_245_ash:1;,
|
||||
c_uint8_t acc_csfb:1;,
|
||||
c_uint8_t lpp:1;,
|
||||
c_uint8_t lcs:1;,
|
||||
c_uint8_t srvcc:1;,
|
||||
c_uint8_t nf:1;)
|
||||
ED8(c_uint8_t epco:1;,
|
||||
c_uint8_t hc_cp_ciot:1;,
|
||||
c_uint8_t erw_opdn:1;,
|
||||
c_uint8_t s1u_data:1;,
|
||||
c_uint8_t up_ciot:1;,
|
||||
c_uint8_t cp_ciot:1;,
|
||||
c_uint8_t prose_relay:1;,
|
||||
c_uint8_t prose_dc:1;)
|
||||
ED2(c_uint8_t spare:7;,
|
||||
c_uint8_t multiple_drb:1;)
|
||||
} __attribute__ ((packed)) nas_ue_network_capability_t;
|
||||
|
||||
CORE_DECLARE(status_t) nas_decode_ue_network_capability(
|
||||
nas_ue_network_capability_t *ue_network_capability, pkbuf_t *pkbuf);
|
||||
|
||||
typedef struct _nas_esm_message_container_t {
|
||||
c_uint16_t len;
|
||||
c_uint8_t *esm;
|
||||
} __attribute__ ((packed)) nas_esm_message_container_t;
|
||||
|
||||
typedef c_uint8_t nas_p_tmsi_signature_t;
|
||||
typedef c_uint8_t nas_tracking_area_identity_t;
|
||||
typedef c_uint8_t nas_drx_parameter_t;
|
||||
typedef c_uint8_t nas_ms_network_capability_t;
|
||||
typedef c_uint8_t nas_location_area_identification_t;
|
||||
typedef c_uint8_t nas_tmsi_status_t;
|
||||
typedef c_uint8_t nas_mobile_station_classmark_2_t;
|
||||
typedef c_uint8_t nas_mobile_station_classmark_3_t;
|
||||
typedef c_uint8_t nas_supported_codec_list_t;
|
||||
typedef c_uint8_t nas_additional_update_type_t;
|
||||
typedef c_uint8_t nas_voice_domain_preference_and_ue_usage_setting_t;
|
||||
typedef c_uint8_t nas_device_properties_t;
|
||||
typedef c_uint8_t nas_guti_type_t;
|
||||
typedef c_uint8_t nas_ms_network_feature_support__t;
|
||||
typedef c_uint8_t nas_network_resource_identifier_container_t;
|
||||
typedef c_uint8_t nas_gprs_timer_2_t;
|
||||
typedef c_uint8_t nas_gprs_timer_3_t;
|
||||
typedef c_uint8_t nas_extended_drx_parameters_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
||||
|
|
@ -3,59 +3,6 @@
|
|||
#include "core_debug.h"
|
||||
#include "nas_message.h"
|
||||
|
||||
status_t nas_decode_attach_info(
|
||||
nas_attach_info_t *attach_info, pkbuf_t *pkbuf)
|
||||
{
|
||||
c_uint16_t size = 0;
|
||||
|
||||
size = sizeof(nas_attach_info_t);
|
||||
d_assert(pkbuf->len >= size, return CORE_ERROR,
|
||||
"pkbuf->len(%d), size(%d)\n", pkbuf->len, size);
|
||||
memcpy(attach_info, pkbuf->payload, size);
|
||||
pkbuf_header(pkbuf, -size);
|
||||
|
||||
return CORE_OK;
|
||||
}
|
||||
|
||||
status_t nas_decode_eps_mobile_identity(
|
||||
nas_eps_mobile_identity_t *eps_mobile_identity, pkbuf_t *pkbuf)
|
||||
{
|
||||
c_uint16_t size = 0;
|
||||
nas_eps_mobile_identity_t *header = pkbuf->payload;
|
||||
|
||||
size = header->len + sizeof(header->len);
|
||||
d_assert(pkbuf->len >= size, return CORE_ERROR,
|
||||
"pkbuf->len(%d), size(%d)\n", pkbuf->len, size);
|
||||
memcpy(eps_mobile_identity, pkbuf->payload, size);
|
||||
|
||||
if (header->type_of_identity == NAS_EPS_MOBILE_IDENTITY_GUTI)
|
||||
{
|
||||
eps_mobile_identity->u.guti.mme_group_id =
|
||||
ntohs(eps_mobile_identity->u.guti.mme_group_id);
|
||||
eps_mobile_identity->u.guti.m_tmsi =
|
||||
ntohl(eps_mobile_identity->u.guti.m_tmsi);
|
||||
}
|
||||
|
||||
pkbuf_header(pkbuf, -size);
|
||||
|
||||
return CORE_OK;
|
||||
}
|
||||
|
||||
status_t nas_decode_ue_network_capability(
|
||||
nas_ue_network_capability_t *ue_network_capability, pkbuf_t *pkbuf)
|
||||
{
|
||||
c_uint16_t size = 0;
|
||||
nas_ue_network_capability_t *header = pkbuf->payload;
|
||||
|
||||
size = header->len + sizeof(header->len);
|
||||
d_assert(pkbuf->len >= size, return CORE_ERROR,
|
||||
"pkbuf->len(%d), size(%d)\n", pkbuf->len, size);
|
||||
memcpy(ue_network_capability, pkbuf->payload, size);
|
||||
pkbuf_header(pkbuf, -size);
|
||||
|
||||
return CORE_OK;
|
||||
}
|
||||
|
||||
status_t nas_decode_attach_request(nas_message_t *message, pkbuf_t *pkbuf)
|
||||
{
|
||||
nas_attach_request_t *attach_request = &message->emm.attach_request;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _NAS_MESSAGE_H__
|
||||
#define _NAS_MESSAGE_H__
|
||||
|
||||
#include "core_pkbuf.h"
|
||||
#include "nas_ies.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -9,6 +9,30 @@ extern "C" {
|
|||
|
||||
#define NAS_SDU_SIZE 2048
|
||||
|
||||
#define NAS_SECURITY_HEADER_PLAIN_NAS_MESSAGE 0
|
||||
#define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED 1
|
||||
#define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED 2
|
||||
#define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_NEW_SECURITY_CONTEXT 3
|
||||
#define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHTERD_WITH_NEW_INTEGRITY_CONTEXT 4
|
||||
#define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_PARTICALLY_CIPHTERD 5
|
||||
#define NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE 6
|
||||
|
||||
#define NAS_PROTOCOL_DISCRIMINATOR_ESM 0x2
|
||||
#define NAS_PROTOCOL_DISCRIMINATOR_EMM 0x7
|
||||
|
||||
typedef struct _nas_header_t {
|
||||
ED2(c_uint8_t security_header_type:4;,
|
||||
c_uint8_t protocol_discriminator:4;)
|
||||
c_uint8_t message_type;
|
||||
} __attribute__ ((packed)) nas_header_t;
|
||||
|
||||
typedef struct _nas_security_header_t {
|
||||
ED2(c_uint8_t security_header_type:4;,
|
||||
c_uint8_t protocol_discriminator:4;)
|
||||
c_uint32_t message_authentication_code;
|
||||
c_uint8_t sequence_number;
|
||||
} __attribute__ ((packed)) nas_security_header_t;
|
||||
|
||||
#define NAS_ATTACH_REQUEST 65
|
||||
#define NAS_ATTACH_ACCEPT 66
|
||||
#define NAS_ATTACH_COMPLETE 67
|
||||
|
@ -63,172 +87,6 @@ extern "C" {
|
|||
#define NAS_ESM_INFORMATION_RESPONSE 218
|
||||
#define NAS_ESM_STATUS 232
|
||||
|
||||
#define NAS_SECURITY_HEADER_PLAIN_NAS_MESSAGE 0
|
||||
#define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED 1
|
||||
#define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED 2
|
||||
#define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_NEW_SECURITY_CONTEXT 3
|
||||
#define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHTERD_WITH_NEW_INTEGRITY_CONTEXT 4
|
||||
#define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_PARTICALLY_CIPHTERD 5
|
||||
#define NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE 6
|
||||
|
||||
#define NAS_PROTOCOL_DISCRIMINATOR_ESM 0x2
|
||||
#define NAS_PROTOCOL_DISCRIMINATOR_EMM 0x7
|
||||
|
||||
typedef struct _nas_header_t {
|
||||
ED2(c_uint8_t security_header_type:4;,
|
||||
c_uint8_t protocol_discriminator:4;)
|
||||
c_uint8_t message_type;
|
||||
} __attribute__ ((packed)) nas_header_t;
|
||||
|
||||
typedef struct _nas_security_header_t {
|
||||
ED2(c_uint8_t security_header_type:4;,
|
||||
c_uint8_t protocol_discriminator:4;)
|
||||
c_uint32_t message_authentication_code;
|
||||
c_uint8_t sequence_number;
|
||||
} __attribute__ ((packed)) nas_security_header_t;
|
||||
|
||||
#define NAS_KEY_SET_IDENTIFIER_NATIVE 0
|
||||
#define NAS_KEY_SET_IDENTIFIER_MAPPED 1
|
||||
#define NAS_KEY_SET_IDENTIFIER_NOT_AVAILABLE 0x111
|
||||
|
||||
#define NAS_ATTACH_TYPE_EPS_ATTACH 1
|
||||
#define NAS_ATTACH_TYPE_COMBINED_EPS_IMSI_ATTAACH 2
|
||||
#define NAS_ATTACH_TYPE_EPS_ERMERGENCY_ATTCH 3
|
||||
#define NAS_ATTACH_TYPE_RESERVED 4
|
||||
typedef struct _nas_attach_info_t {
|
||||
ED4(c_uint8_t tsc:1;,
|
||||
c_uint8_t nas_key_set_identifier:3;,
|
||||
c_uint8_t spare:1;,
|
||||
c_uint8_t attach_type:3;)
|
||||
} __attribute__ ((packed)) nas_attach_info_t;
|
||||
|
||||
#define NAS_EPS_MOBILE_IDENTITY_IMSI 1
|
||||
#define NAS_EPS_MOBILE_IDENTITY_GUTI 6
|
||||
#define NAS_EPS_MOBILE_IDENTITY_IMEI 3
|
||||
|
||||
#define NAS_EPS_MOBILE_IDENTITY_EVEN 0
|
||||
#define NAS_EPS_MOBILE_IDENTITY_ODD 1
|
||||
typedef struct _nas_eps_mobile_identity_guti_t {
|
||||
ED2(c_uint8_t mcc_digit2:4;,
|
||||
c_uint8_t mcc_digit1:4;)
|
||||
ED2(c_uint8_t mnc_digit3:4;,
|
||||
c_uint8_t mcc_digit3:4;)
|
||||
ED2(c_uint8_t mnc_digit2:4;,
|
||||
c_uint8_t mnc_digit1:4;)
|
||||
c_uint16_t mme_group_id;
|
||||
c_uint8_t mme_code;
|
||||
c_uint32_t m_tmsi;
|
||||
} __attribute__ ((packed)) nas_eps_mobile_identity_guti_t;
|
||||
|
||||
typedef struct _nas_eps_mobile_identity_imsi_t {
|
||||
ED2(c_uint8_t digit2:4;,
|
||||
c_uint8_t digit3:4;)
|
||||
ED2(c_uint8_t digit4:4;,
|
||||
c_uint8_t digit5:4;)
|
||||
ED2(c_uint8_t digit6:4;,
|
||||
c_uint8_t digit7:4;)
|
||||
ED2(c_uint8_t digit8:4;,
|
||||
c_uint8_t digit9:4;)
|
||||
ED2(c_uint8_t digit10:4;,
|
||||
c_uint8_t digit11:4;)
|
||||
ED2(c_uint8_t digit12:4;,
|
||||
c_uint8_t digit13:4;)
|
||||
ED2(c_uint8_t digit14:4;,
|
||||
c_uint8_t digit15:4;)
|
||||
} __attribute__ ((packed)) nas_eps_mobile_identity_imsi_t;
|
||||
|
||||
typedef nas_eps_mobile_identity_imsi_t nas_eps_mobile_identity_imei_t;
|
||||
|
||||
typedef struct _nas_eps_mobile_identity_t {
|
||||
c_uint8_t len;
|
||||
ED3(c_uint8_t digit1:4;,
|
||||
c_uint8_t odd_even:1;,
|
||||
c_uint8_t type_of_identity:3;)
|
||||
union {
|
||||
nas_eps_mobile_identity_imsi_t imsi;
|
||||
nas_eps_mobile_identity_guti_t guti;
|
||||
nas_eps_mobile_identity_imei_t imei;
|
||||
} u;
|
||||
} __attribute__ ((packed)) nas_eps_mobile_identity_t;
|
||||
|
||||
typedef struct _nas_ue_network_capability_t {
|
||||
c_uint8_t len;
|
||||
ED8(c_uint8_t eea0:1;,
|
||||
c_uint8_t eea1:1;,
|
||||
c_uint8_t eea2:1;,
|
||||
c_uint8_t eea3:1;,
|
||||
c_uint8_t eea4:1;,
|
||||
c_uint8_t eea5:1;,
|
||||
c_uint8_t eea6:1;,
|
||||
c_uint8_t eea7:1;)
|
||||
ED8(c_uint8_t eia0:1;,
|
||||
c_uint8_t eia1:1;,
|
||||
c_uint8_t eia2:1;,
|
||||
c_uint8_t eia3:1;,
|
||||
c_uint8_t eia4:1;,
|
||||
c_uint8_t eia5:1;,
|
||||
c_uint8_t eia6:1;,
|
||||
c_uint8_t eia7:1;)
|
||||
ED8(c_uint8_t uea0:1;,
|
||||
c_uint8_t uea1:1;,
|
||||
c_uint8_t uea2:1;,
|
||||
c_uint8_t uea3:1;,
|
||||
c_uint8_t uea4:1;,
|
||||
c_uint8_t uea5:1;,
|
||||
c_uint8_t uea6:1;,
|
||||
c_uint8_t uea7:1;)
|
||||
ED8(c_uint8_t ucs2:1;,
|
||||
c_uint8_t uia1:1;,
|
||||
c_uint8_t uia2:1;,
|
||||
c_uint8_t uia3:1;,
|
||||
c_uint8_t uia4:1;,
|
||||
c_uint8_t uia5:1;,
|
||||
c_uint8_t uia6:1;,
|
||||
c_uint8_t uia7:1;)
|
||||
ED8(c_uint8_t prose_dd:1;,
|
||||
c_uint8_t prose:1;,
|
||||
c_uint8_t h_245_ash:1;,
|
||||
c_uint8_t acc_csfb:1;,
|
||||
c_uint8_t lpp:1;,
|
||||
c_uint8_t lcs:1;,
|
||||
c_uint8_t srvcc:1;,
|
||||
c_uint8_t nf:1;)
|
||||
ED8(c_uint8_t epco:1;,
|
||||
c_uint8_t hc_cp_ciot:1;,
|
||||
c_uint8_t erw_opdn:1;,
|
||||
c_uint8_t s1u_data:1;,
|
||||
c_uint8_t up_ciot:1;,
|
||||
c_uint8_t cp_ciot:1;,
|
||||
c_uint8_t prose_relay:1;,
|
||||
c_uint8_t prose_dc:1;)
|
||||
ED2(c_uint8_t spare:7;,
|
||||
c_uint8_t multiple_drb:1;)
|
||||
} __attribute__ ((packed)) nas_ue_network_capability_t;
|
||||
|
||||
typedef struct _nas_esm_message_container_t {
|
||||
c_uint16_t len;
|
||||
c_uint8_t *esm;
|
||||
} __attribute__ ((packed)) nas_esm_message_container_t;
|
||||
|
||||
typedef c_uint8_t nas_p_tmsi_signature_t;
|
||||
typedef c_uint8_t nas_tracking_area_identity_t;
|
||||
typedef c_uint8_t nas_drx_parameter_t;
|
||||
typedef c_uint8_t nas_ms_network_capability_t;
|
||||
typedef c_uint8_t nas_location_area_identification_t;
|
||||
typedef c_uint8_t nas_tmsi_status_t;
|
||||
typedef c_uint8_t nas_mobile_station_classmark_2_t;
|
||||
typedef c_uint8_t nas_mobile_station_classmark_3_t;
|
||||
typedef c_uint8_t nas_supported_codec_list_t;
|
||||
typedef c_uint8_t nas_additional_update_type_t;
|
||||
typedef c_uint8_t nas_voice_domain_preference_and_ue_usage_setting_t;
|
||||
typedef c_uint8_t nas_device_properties_t;
|
||||
typedef c_uint8_t nas_guti_type_t;
|
||||
typedef c_uint8_t nas_ms_network_feature_support__t;
|
||||
typedef c_uint8_t nas_network_resource_identifier_container_t;
|
||||
typedef c_uint8_t nas_gprs_timer_2_t;
|
||||
typedef c_uint8_t nas_gprs_timer_3_t;
|
||||
typedef c_uint8_t nas_extended_drx_parameters_t;
|
||||
|
||||
#define NAS_ATTACH_REQUEST_OLD_PTMSI_SIGNATURE_PRESENT (1<<0)
|
||||
#define NAS_ATTACH_REQUEST_ADDITIONAL_GUTI_PRESENT (1<<1)
|
||||
#define NAS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT (1<<2)
|
||||
|
@ -298,7 +156,6 @@ typedef union _nas_message_t {
|
|||
|
||||
CORE_DECLARE(int) nas_decode_pdu(nas_message_t *message, pkbuf_t *pkbuf);
|
||||
CORE_DECLARE(int) nas_encode_pdu(pkbuf_t **pkbuf, nas_message_t *message);
|
||||
CORE_DECLARE(int) nas_free_pdu(nas_message_t *message);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "core_debug.h"
|
||||
#include "core_lib.h"
|
||||
#include "s1ap_codecs.h"
|
||||
#include "s1ap_message.h"
|
||||
|
||||
static int s1ap_decode_initiating(s1ap_message *message,
|
||||
S1ap_InitiatingMessage_t *initiating_p);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "core_debug.h"
|
||||
#include "core_lib.h"
|
||||
#include "s1ap_codecs.h"
|
||||
#include "s1ap_message.h"
|
||||
|
||||
static inline int s1ap_encode_initiating_message(
|
||||
s1ap_message *message_p, pkbuf_t *pkbuf);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define TRACE_MODULE _s1free
|
||||
|
||||
#include "core_debug.h"
|
||||
#include "s1ap_codecs.h"
|
||||
#include "s1ap_message.h"
|
||||
|
||||
static inline int s1ap_free_initiating_message(s1ap_message *message_p);
|
||||
static inline int s1ap_free_successfull_outcome(s1ap_message *message_p);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _S1AP_CODECS_H__
|
||||
#define _S1AP_CODECS_H__
|
||||
#ifndef _S1AP_MESSAGE_H__
|
||||
#define _S1AP_MESSAGE_H__
|
||||
|
||||
#include "core_pkbuf.h"
|
||||
#include "s1ap_ies_defs.h"
|
|
@ -3,12 +3,12 @@
|
|||
noinst_LTLIBRARIES = libcellwire.la
|
||||
|
||||
libcellwire_la_SOURCES = \
|
||||
cellwire.h event.h context.h s1ap_message.h s1ap_conv.h s1ap_path.h \
|
||||
cellwire.h event.h context.h s1ap_contents.h s1ap_conv.h s1ap_path.h \
|
||||
sm.h
|
||||
|
||||
|
||||
nodist_libcellwire_la_SOURCES = \
|
||||
init.c event.c context.c s1ap_message.c s1ap_conv.c s1ap_path.c \
|
||||
init.c event.c context.c s1ap_contents.c s1ap_conv.c s1ap_path.c \
|
||||
mme_sm.c enb_s1_sm.c
|
||||
|
||||
libcellwire_la_DEPENDENCIES = \
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define TRACE_MODULE _enb_s1_sm
|
||||
#include "core_debug.h"
|
||||
|
||||
#include "s1ap_message.h"
|
||||
#include "s1ap_contents.h"
|
||||
#include "s1ap_conv.h"
|
||||
#include "s1ap_path.h"
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#define TRACE_MODULE _s1msg
|
||||
#define TRACE_MODULE _s1contents
|
||||
|
||||
#include "core_debug.h"
|
||||
#include "context.h"
|
||||
#include "s1ap_message.h"
|
||||
#include "s1ap_contents.h"
|
||||
#include "s1ap_conv.h"
|
||||
|
||||
status_t s1ap_build_setup_rsp(pkbuf_t **pkbuf)
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _S1AP_MESSAGE_H__
|
||||
#define _S1AP_MESSAGE_H__
|
||||
#ifndef _S1AP_CONTENTS_H__
|
||||
#define _S1AP_CONTENTS_H__
|
||||
|
||||
#include "s1ap_codecs.h"
|
||||
#include "s1ap_message.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _S1AP_CONV_H__
|
||||
#define _S1AP_CONV_H__
|
||||
|
||||
#include "s1ap_codecs.h"
|
||||
#include "s1ap_message.h"
|
||||
#include "context.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "core_debug.h"
|
||||
#include "core_net.h"
|
||||
|
||||
#include "s1ap_codecs.h"
|
||||
#include "s1ap_message.h"
|
||||
|
||||
#include "event.h"
|
||||
#include "s1ap_path.h"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "testutil.h"
|
||||
|
||||
#include "s1ap_message.h"
|
||||
#include "s1ap_contents.h"
|
||||
#include "s1ap_enb_message.h"
|
||||
#include "s1ap_conv.h"
|
||||
#include "s1ap_path.h"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "core_debug.h"
|
||||
#include "core_pkbuf.h"
|
||||
#include "context.h"
|
||||
#include "s1ap_message.h"
|
||||
#include "s1ap_contents.h"
|
||||
#include "s1ap_conv.h"
|
||||
|
||||
status_t s1ap_build_setup_req(pkbuf_t **pkbuf, c_uint32_t enb_id)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _S1AP_ENB_MESSAGE_H__
|
||||
#define _S1AP_ENB_MESSAGE_H__
|
||||
|
||||
#include "s1ap_codecs.h"
|
||||
#include "s1ap_message.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "testutil.h"
|
||||
|
||||
#include "s1ap_message.h"
|
||||
#include "s1ap_contents.h"
|
||||
#include "s1ap_enb_message.h"
|
||||
#include "s1ap_conv.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue