*
* Copyright 2008 - 2010, Anders Broman <anders.broman@ericsson.com>
*
- * $Id$
- *
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * References: 3GPP TS 24.301 V9.6.0 (2011-03)
+ * References: 3GPP TS 24.301 V11.5.0 (2012-12)
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
#include <glib.h>
#include <epan/packet.h>
#include <epan/asn1.h>
+#include <epan/prefs.h>
+#include <epan/wmem/wmem.h>
#include "packet-gsm_map.h"
#include "packet-gsm_a_common.h"
#include "packet-e212.h"
#include "packet-lcsap.h"
+void proto_register_nas_eps(void);
+void proto_reg_handoff_nas_eps(void);
+
#define PNAME "Non-Access-Stratum (NAS)PDU"
#define PSNAME "NAS-EPS"
#define PFNAME "nas-eps"
static int hf_nas_eps_emm_nonce = -1;
static int hf_nas_eps_emm_paging_id = -1;
static int hf_nas_eps_emm_eps_att_type = -1;
-static int hf_nas_eps_emm_cs_lcs_type = -1;
-static int hf_nas_eps_emm_epc_lcs_type = -1;
-static int hf_nas_eps_emm_emc_bs_type = -1;
-static int hf_nas_eps_emm_ims_vops_type = -1;
+static int hf_nas_eps_emm_esr_ps = -1;
+static int hf_nas_eps_emm_cs_lcs = -1;
+static int hf_nas_eps_emm_epc_lcs = -1;
+static int hf_nas_eps_emm_emc_bs = -1;
+static int hf_nas_eps_emm_ims_vops = -1;
static int hf_nas_eps_emm_nas_key_set_id = -1;
static int hf_nas_eps_tsc = -1;
static int hf_nas_eps_emm_odd_even = -1;
static int hf_nas_eps_emm_gea5 = -1;
static int hf_nas_eps_emm_gea6 = -1;
static int hf_nas_eps_emm_gea7 = -1;
+static int hf_nas_eps_emm_h245_ash_cap = -1;
+static int hf_nas_eps_emm_acc_csfb_cap = -1;
static int hf_nas_eps_emm_lpp_cap = -1;
static int hf_nas_eps_emm_lcs_cap = -1;
static int hf_nas_eps_emm_1xsrvcc_cap = -1;
static int hf_nas_eps_emm_nf_cap = -1;
-static int hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg;
+static int hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg = -1;
static int hf_nas_eps_emm_ss_code = -1;
static int hf_nas_eps_emm_lcs_ind = -1;
static int hf_nas_eps_emm_gen_msg_cont_type = -1;
static int hf_nas_eps_emm_apn_ambr_dl_ext = -1;
static int hf_nas_eps_emm_apn_ambr_ul_ext2 = -1;
static int hf_nas_eps_emm_apn_ambr_dl_ext2 = -1;
-
+static int hf_nas_eps_emm_guti_type = -1;
static int hf_nas_eps_emm_switch_off = -1;
static int hf_nas_eps_emm_detach_type_UL = -1;
static int hf_nas_eps_emm_detach_type_DL = -1;
static int hf_nas_eps_esm_cause = -1;
static int hf_nas_eps_esm_eit = -1;
-static int hf_nas_eps_esm_lnkd_eps_bearer_id = -1;
static int hf_nas_eps_esm_notif_ind = -1;
static int hf_nas_eps_esm_pdn_type = -1;
static int hf_nas_eps_esm_pdn_ipv4 = -1;
static int hf_nas_eps_gen_msg_cont = -1;
static int hf_nas_eps_cmn_add_info = -1;
+static int hf_nas_eps_esm_request_type = -1;
/* ESM */
static int hf_nas_eps_msg_esm_type = -1;
static int ett_nas_eps_cmn_add_info = -1;
/* Global variables */
-static packet_info *gpinfo;
+static gboolean g_nas_eps_dissect_plain = FALSE;
guint8 eps_nas_gen_msg_cont_type = 0;
{ 0x52, "Authentication request"},
{ 0x53, "Authentication response"},
{ 0x54, "Authentication reject"},
- { 0x5c, "Authentication failure"},
{ 0x55, "Identity request"},
{ 0x56, "Identity response"},
+ { 0x5c, "Authentication failure"},
{ 0x5d, "Security mode command"},
{ 0x5e, "Security mode complete"},
{ 0x5f, "Security mode reject"},
{ 0x61, "EMM information"},
{ 0x62, "Downlink NAS transport"},
{ 0x63, "Uplink NAS transport"},
- { 0x64, "CS Service notification"},
+ { 0x64, "CS service notification"},
{ 0x68, "Downlink generic NAS transport"},
{ 0x69, "Uplink generic NAS transport"},
{ 0, NULL }
};
+static value_string_ext nas_msg_emm_strings_ext = VALUE_STRING_EXT_INIT(nas_msg_emm_strings);
/* Table 9.8.2: Message types for EPS session management */
{ 0xe8, "ESM status"},
{ 0, NULL }
};
+static value_string_ext nas_msg_esm_strings_ext = VALUE_STRING_EXT_INIT(nas_msg_esm_strings);
static const value_string security_header_type_vals[] = {
{ 0, "Plain NAS message, not security protected"},
{ 9, "Reserved"},
{ 10, "Reserved"},
{ 11, "Reserved"},
- { 12, "Security header for the SERVICE REQUEST message "},
- { 13, "These values are not used in this version of the protocol. If received they shall be interpreted as \"1100\""},
- { 14, "These values are not used in this version of the protocol. If received they shall be interpreted as \"1100\""},
- { 15, "These values are not used in this version of the protocol. If received they shall be interpreted as \"1100\""},
+ { 12, "Security header for the SERVICE REQUEST message"},
+ { 13, "These values are not used in this version of the protocol."
+ " If received they shall be interpreted as security header for the SERVICE REQUEST message"},
+ { 14, "These values are not used in this version of the protocol."
+ " If received they shall be interpreted as Security header for the SERVICE REQUEST message"},
+ { 15, "These values are not used in this version of the protocol."
+ " If received they shall be interpreted as Security header for the SERVICE REQUEST message"},
{ 0, NULL }
};
static value_string_ext security_header_type_vals_ext = VALUE_STRING_EXT_INIT(security_header_type_vals);
-const value_string nas_eps_common_elem_strings[] = {
- { 0x00, "Additional information" }, /* 9.9.2.0 Additional information */
- { 0x00, "EPS bearer context status" }, /* 9.9.2.1 EPS bearer context status */
- { 0x00, "Location area identification" }, /* 9.9.2.2 Location area identification */
- { 0x00, "Mobile identity" }, /* 9.9.2.3 Mobile identity */
- { 0x00, "Mobile station classmark 2" }, /* 9.9.2.4 Mobile station classmark 2 */
- { 0x00, "Mobile station classmark 3" }, /* 9.9.2.5 Mobile station classmark 3 */
- { 0x00, "NAS security parameters from E-UTRA" }, /* 9.9.2.6 NAS security parameters from E-UTRA */
- { 0x00, "NAS security parameters to E-UTRA" }, /* 9.9.2.7 NAS security parameters to E-UTRA */
- { 0x00, "PLMN list" }, /* 9.9.2.8 PLMN list */
- /* 9.9.2.9 Spare half octet */
- { 0x00, "Supported codec list" }, /* 9.9.2.10 Supported codec list */
+typedef enum
+{
+ DE_EPS_CMN_ADD_INFO, /* 9.9.2.0 Additional information */
+ DE_EPS_CMN_DEVICE_PROPERTIES, /* 9.9.2.0A Device properties */
+ DE_EPS_CMN_EPS_BE_CTX_STATUS, /* 9.9.2.1 EPS bearer context status */
+ DE_EPS_CMN_LOC_AREA_ID, /* 9.9.2.2 Location area identification */
+ DE_EPS_CMN_MOB_ID, /* 9.9.2.3 Mobile identity */
+ DE_EPS_MS_CM_2, /* 9.9.2.4 Mobile station classmark 2 */
+ DE_EPS_MS_CM_3, /* 9.9.2.5 Mobile station classmark 3 */
+ DE_EPS_NAS_SEC_PAR_FROM_EUTRA, /* 9.9.2.6 NAS security parameters from E-UTRA */
+ DE_EPS_NAS_SEC_PAR_TO_EUTRA, /* 9.9.2.7 NAS security parameters to E-UTRA */
+
+ DE_EPS_CMN_PLM_LST, /* 9.9.2.8 PLMN list */
+ DE_EPS_CMN_SUP_CODEC_LST, /* 9.9.2.6 9.9.2.10 Supported codec list */
+ DE_EPS_COMMON_NONE /* NONE */
+}
+nas_eps_common_elem_idx_t;
+
+static const value_string nas_eps_common_elem_strings[] = {
+ { DE_EPS_CMN_ADD_INFO, "Additional information" }, /* 9.9.2.0 Additional information */
+ { DE_EPS_CMN_DEVICE_PROPERTIES, "Device properties" }, /* 9.9.2.0A Device properties */
+ { DE_EPS_CMN_EPS_BE_CTX_STATUS, "EPS bearer context status" }, /* 9.9.2.1 EPS bearer context status */
+ { DE_EPS_CMN_LOC_AREA_ID, "Location area identification" }, /* 9.9.2.2 Location area identification */
+ { DE_EPS_CMN_MOB_ID, "Mobile identity" }, /* 9.9.2.3 Mobile identity */
+ { DE_EPS_MS_CM_2, "Mobile station classmark 2" }, /* 9.9.2.4 Mobile station classmark 2 */
+ { DE_EPS_MS_CM_3, "Mobile station classmark 3" }, /* 9.9.2.5 Mobile station classmark 3 */
+ { DE_EPS_NAS_SEC_PAR_FROM_EUTRA, "NAS security parameters from E-UTRA" },/* 9.9.2.6 NAS security parameters from E-UTRA */
+ { DE_EPS_NAS_SEC_PAR_TO_EUTRA, "NAS security parameters to E-UTRA" }, /* 9.9.2.7 NAS security parameters to E-UTRA */
+ { DE_EPS_CMN_PLM_LST, "PLMN list" }, /* 9.9.2.8 PLMN list */
+ /* 9.9.2.9 Spare half octet */
+ { DE_EPS_CMN_SUP_CODEC_LST, "Supported codec list" }, /* 9.9.2.10 Supported codec list */
{ 0, NULL }
};
+value_string_ext nas_eps_common_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_eps_common_elem_strings);
+
/* Utility functions */
static guint16
-calc_bitrate(guint8 value){
+calc_bitrate(guint8 value) {
guint16 return_value = value;
- if (value > 63 && value <= 127) {
+ if ((value > 63) && (value <= 127)) {
return_value = 64 + (value - 64) * 8;
}
- else if (value > 127 && value <= 254) {
+ else if ((value > 127) && (value <= 254)) {
return_value = 576 + (value - 128) * 64;
}
- else if (value==0xff) {
+ else if (value == 0xff) {
return_value = 0;
}
return return_value;
}
static guint32
-calc_bitrate_ext(guint8 value){
+calc_bitrate_ext(guint8 value) {
guint32 return_value = 0;
- if (value > 0 && value <= 0x4a) {
+ if ((value > 0) && (value <= 0x4a)) {
return_value = 8600 + value * 100;
}
- else if (value > 0x4a && value <= 0xba) {
+ else if ((value > 0x4a) && (value <= 0xba)) {
return_value = 16 + (value-0x4a);
}
- else if (value > 0xba && value <= 0xfa) {
+ else if ((value > 0xba) && (value <= 0xfa)) {
return_value = 128 + (value-0xba)*2;
}
else {
return return_value;
}
+static guint32
+calc_bitrate_ext2(guint8 value) {
+ guint32 return_value = 0;
+
+ if ((value > 0) && (value <= 0x3d)) {
+ return_value = 256 + value * 4;
+ }
+ else if ((value > 0x3d) && (value <= 0xa1)) {
+ return_value = 500 + (value-0x3d) * 10;
+ }
+ else if ((value > 0xa1) && (value <= 0xf6)) {
+ return_value = 1500 + (value-0xa1) * 100;
+ }
+ else {
+ return_value = 10000;
+ }
+
+ return return_value;
+}
#define NUM_NAS_EPS_COMMON_ELEM (sizeof(nas_eps_common_elem_strings)/sizeof(value_string))
gint ett_nas_eps_common_elem[NUM_NAS_EPS_COMMON_ELEM];
-typedef enum
-{
- DE_EPS_CMN_ADD_INFO, /* 9.9.2.0 Additional information */
- DE_EPS_CMN_EPS_BE_CTX_STATUS, /* 9.9.2.1 EPS bearer context status */
- DE_EPS_CMN_LOC_AREA_ID, /* 9.9.2.2 Location area identification */
- DE_EPS_CMN_MOB_ID, /* 9.9.2.3 Mobile identity */
- DE_EPS_MS_CM_2, /* 9.9.2.4 Mobile station classmark 2 */
- DE_EPS_MS_CM_3, /* 9.9.2.5 Mobile station classmark 3 */
- DE_EPS_NAS_SEC_PAR_FROM_EUTRA, /* 9.9.2.6 NAS security parameters from E-UTRA */
- DE_EPS_NAS_SEC_PAR_TO_EUTRA, /* 9.9.2.7 NAS security parameters to E-UTRA */
-
- DE_EPS_CMN_PLM_LST, /* 9.9.2.8 PLMN list */
- DE_EPS_CMN_SUP_CODEC_LST, /* 9.9.2.6 9.9.2.10 Supported codec list */
- DE_EPS_COMMON_NONE /* NONE */
-}
-nas_eps_common_elem_idx_t;
/*
* 9.9.2 Common information elements
*/
/* 9.9.2.0 Additional information */
static guint16
-de_eps_cmn_add_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+de_eps_cmn_add_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
+ guint32 offset, guint len,
+ gchar *add_string _U_, int string_len _U_)
{
proto_item *item;
proto_tree *sub_tree;
- tvbuff_t *new_tvb;
+ tvbuff_t *new_tvb;
- item = proto_tree_add_item(tree, hf_nas_eps_cmn_add_info, tvb, offset, len, ENC_NA);
+ item = proto_tree_add_item(tree, hf_nas_eps_cmn_add_info, tvb, offset, len, ENC_NA);
sub_tree = proto_item_add_subtree(item, ett_nas_eps_cmn_add_info);
new_tvb = tvb_new_subset(tvb, offset, len, len);
switch (eps_nas_gen_msg_cont_type) {
- case 1:
- /* LPP */
- dissect_lcsap_Correlation_ID_PDU(new_tvb, pinfo, sub_tree);
- break;
- default:
- break;
+ case 1:
+ /* LPP */
+ dissect_lcsap_Correlation_ID_PDU(new_tvb, pinfo, sub_tree, NULL);
+ break;
+ default:
+ break;
}
return(len);
};
static guint16
-de_eps_cmn_eps_be_ctx_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_eps_cmn_eps_be_ctx_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
/* EBI(7) EBI(6) EBI(5) EBI(4) EBI(3) EBI(2) EBI(1) EBI(0) octet 3 */
- proto_tree_add_item(tree, hf_nas_eps_emm_ebi7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_nas_eps_emm_ebi6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_nas_eps_emm_ebi5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nas_eps_emm_ebi7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nas_eps_emm_ebi6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nas_eps_emm_ebi5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* EBI(0) - EBI(4): Bits 0 to 4 of octet 3 are spare and shall be coded as zero. */
- proto_tree_add_item(tree, hf_nas_eps_emm_ebi4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_nas_eps_emm_ebi3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_nas_eps_emm_ebi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_nas_eps_emm_ebi1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_nas_eps_emm_ebi0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nas_eps_emm_ebi4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nas_eps_emm_ebi3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nas_eps_emm_ebi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nas_eps_emm_ebi1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nas_eps_emm_ebi0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
/* EBI(15) EBI(14) EBI(13) EBI(12) EBI(11) EBI(10) EBI(9) EBI(8) octet 4 */
proto_tree_add_item(tree, hf_nas_eps_emm_ebi15, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi12, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi11, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi10, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_nas_eps_emm_ebi9, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_nas_eps_emm_ebi8, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nas_eps_emm_ebi9, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nas_eps_emm_ebi8, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
return len;
}
* 9.9.2.6 NAS security parameters from E-UTRA
*/
guint16
-de_emm_sec_par_from_eutra(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_sec_par_from_eutra(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
* 9.9.2.7 NAS security parameters to E-UTRA
*/
guint16
-de_emm_sec_par_to_eutra(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_sec_par_to_eutra(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
* Dissected in packet-gsm_a_dtap.c
*/
-guint16 (*nas_eps_common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*nas_eps_common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
+ guint32 offset, guint len,
+ gchar *add_string, int string_len) = {
/* 9.9.2 Common information elements */
de_eps_cmn_add_info, /* 9.9.2.0 Additional information */
+ NULL, /* 9.9.2.0A Device properties */
de_eps_cmn_eps_be_ctx_status, /* 9.9.2.1 EPS bearer context status */
de_lai, /* 9.9.2.2 Location area identification */
de_mid, /* 9.9.2.3 Mobile identity See subclause 10.5.1.4 in 3GPP TS 24.008*/
NULL, /* NONE */
};
-const value_string nas_emm_elem_strings[] = {
+static const value_string nas_emm_elem_strings[] = {
/* 9.9.3 EPS Mobility Management (EMM) information elements */
- { 0x00, "Additional update result" }, /* 9.9.3.0A Additional update result */
- { 0x00, "Additional update type" }, /* 9.9.3.0B Additional update type */
- { 0x00, "Authentication failure parameter" }, /* 9.9.3.1 Authentication failure parameter */
- { 0x00, "Authentication parameter AUTN" }, /* 9.9.3.2 Authentication parameter AUTN */
- { 0x00, "Authentication parameter RAND" }, /* 9.9.3.3 Authentication parameter RAND */
- { 0x00, "Authentication response parameter" }, /* 9.9.3.4 Authentication response parameter */
- { 0x00, "CSFB response" }, /* 9.9.3.5 CSFB response */
- { 0x00, "Daylight saving time" }, /* 9.9.3.6 Daylight saving time */
- { 0x00, "Detach type" }, /* 9.9.3.7 Detach type */
- { 0x00, "DRX parameter" }, /* 9.9.3.8 DRX parameter */
- { 0x00, "EMM cause" }, /* 9.9.3.9 EMM cause */
- { 0x00, "EPS attach result" }, /* 9.9.3.10 EPS attach result */
- { 0x00, "EPS attach type" }, /* 9.9.3.11 EPS attach type */
- { 0x00, "EPS mobile identity" }, /* 9.9.3.12 EPS mobile identity */
- { 0x00, "EPS network feature support" }, /* 9.9.3.12 EPS mobile identity */
- { 0x00, "EPS update result" }, /* 9.9.3.13 EPS update result */
- { 0x00, "EPS update type" }, /* 9.9.3.14 EPS update type */
- { 0x00, "ESM message container" }, /* 9.9.3.15 ESM message conta */
- { 0x00, "GPRS timer" }, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
- { 0x00, "Identity type 2" }, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
- { 0x00, "IMEISV request" }, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
- { 0x00, "KSI and sequence number" }, /* 9.9.3.19 KSI and sequence number */
- { 0x00, "MS network capability" }, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
- { 0x00, "NAS key set identifier" }, /* 9.9.3.21 NAS key set identifier */
- { 0x00, "NAS message container" }, /* 9.9.3.22 NAS message container */
- { 0x00, "NAS security algorithms" }, /* 9.9.3.23 NAS security algorithms */
- { 0x00, "Network name" }, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
- { 0x00, "Nonce" }, /* 9.9.3.25 Nonce */
- { 0x00, "Paging identity" }, /* 9.9.3.25A Paging identity */
- { 0x00, "P-TMSI signature" }, /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
- { 0x00, "Service type" }, /* 9.9.3.27 Service type ,See subclause 10.5.5.15 in 3GPP TS 24.008 [6]. */
- { 0x00, "Short MAC" }, /* 9.9.3.28 Short MAC */
- { 0x00, "Time zone" }, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
- { 0x00, "Time zone and time" }, /* 9.9.3.30 Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. */
- { 0x00, "TMSI status" }, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
- { 0x00, "Tracking area identity" }, /* 9.9.3.32 Tracking area identity */
- { 0x00, "Tracking area identity list" }, /* 9.9.3.33 Tracking area identity list */
- { 0x00, "UE network capability" }, /* 9.9.3.34 UE network capability */
- { 0x00, "UE radio capability information update needed" }, /* 9.9.3.35 UE radio capability information update needed */
- { 0x00, "UE security capability" }, /* 9.9.3.36 UE security capability */
- { 0x00, "Emergency Number List" }, /* 9.9.3.37 Emergency Number List */
- { 0x00, "CLI" }, /* 9.9.3.38 CLI */
- { 0x00, "SS Code" }, /* 9.9.3.39 SS Code */
- { 0x00, "LCS indicator" }, /* 9.9.3.40 LCS indicator */
- { 0x00, "LCS client identity" }, /* 9.9.3.41 LCS client identity */
- { 0x00, "Generic message container type" }, /* 9.9.3.42 Generic message container type */
- { 0x00, "Generic message container" }, /* 9.9.3.43 Generic message container */
- { 0x00, "Voice domain preference and UEs usage setting" }, /* 9.9.3.44 Voice domain preference and UEs usage setting */
+ { DE_EMM_ADD_UPD_RES, "Additional update result" }, /* 9.9.3.0A Additional update result */
+ { DE_EMM_ADD_UPD_TYPE, "Additional update type" }, /* 9.9.3.0B Additional update type */
+ { DE_EMM_AUTH_FAIL_PAR, "Authentication failure parameter" }, /* 9.9.3.1 Authentication failure parameter */
+ { DE_EMM_AUTN, "Authentication parameter AUTN" }, /* 9.9.3.2 Authentication parameter AUTN */
+ { DE_EMM_AUTH_PAR_RAND, "Authentication parameter RAND" }, /* 9.9.3.3 Authentication parameter RAND */
+ { DE_EMM_AUTH_RESP_PAR, "Authentication response parameter" }, /* 9.9.3.4 Authentication response parameter */
+ { DE_EMM_CSFB_RESP, "CSFB response" }, /* 9.9.3.5 CSFB response */
+ { DE_EMM_DAYL_SAV_T, "Daylight saving time" }, /* 9.9.3.6 Daylight saving time */
+ { DE_EMM_DET_TYPE, "Detach type" }, /* 9.9.3.7 Detach type */
+ { DE_EMM_DRX_PAR, "DRX parameter" }, /* 9.9.3.8 DRX parameter */
+ { DE_EMM_CAUSE, "EMM cause" }, /* 9.9.3.9 EMM cause */
+ { DE_EMM_ATT_RES, "EPS attach result" }, /* 9.9.3.10 EPS attach result */
+ { DE_EMM_ATT_TYPE, "EPS attach type" }, /* 9.9.3.11 EPS attach type */
+ { DE_EMM_EPS_MID, "EPS mobile identity" }, /* 9.9.3.12 EPS mobile identity */
+ { DE_EMM_EPS_NET_FEATURE_SUP, "EPS network feature support" }, /* 9.9.3.12A EPS network feature support */
+ { DE_EMM_EPS_UPD_RES, "EPS update result" }, /* 9.9.3.13 EPS update result */
+ { DE_EMM_EPS_UPD_TYPE, "EPS update type" }, /* 9.9.3.14 EPS update type */
+ { DE_EMM_ESM_MSG_CONT, "ESM message container" }, /* 9.9.3.15 ESM message conta */
+ { DE_EMM_GPRS_TIMER, "GPRS timer" }, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
+ { DE_EMM_GPRS_TIMER_2, "GPRS timer 2" }, /* 9.9.3.16A GPRS timer 2, See subclause 10.5.7.4 in 3GPP TS 24.008. */
+ { DE_EMM_GPRS_TIMER_3, "GPRS timer 3" }, /* 9.9.3.16B GPRS timer 3, See subclause 10.5.7.4a in 3GPP TS 24.008. */
+ { DE_EMM_ID_TYPE_2, "Identity type 2" }, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
+ { DE_EMM_IMEISV_REQ, "IMEISV request" }, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
+ { DE_EMM_KSI_AND_SEQ_NO, "KSI and sequence number" }, /* 9.9.3.19 KSI and sequence number */
+ { DE_EMM_MS_NET_CAP, "MS network capability" }, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
+ { DE_EMM_MS_NET_FEAT_SUP, "MS network feature support" }, /* 9.9.3.20A MS network feature support, See subclause 10.5.1.15 in 3GPP TS 24.008. */
+ { DE_EMM_NAS_KEY_SET_ID, "NAS key set identifier" }, /* 9.9.3.21 NAS key set identifier */
+ { DE_EMM_NAS_MSG_CONT, "NAS message container" }, /* 9.9.3.22 NAS message container */
+ { DE_EMM_NAS_SEC_ALGS, "NAS security algorithms" }, /* 9.9.3.23 NAS security algorithms */
+ { DE_EMM_NET_NAME, "Network name" }, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
+ { DE_EMM_NONCE, "Nonce" }, /* 9.9.3.25 Nonce */
+ { DE_EMM_PAGING_ID, "Paging identity" }, /* 9.9.3.25A Paging identity */
+ { DE_EMM_P_TMSI_SIGN, "P-TMSI signature" }, /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
+ { DE_EMM_SERV_TYPE, "Service type" }, /* 9.9.3.27 Service type ,See subclause 10.5.5.15 in 3GPP TS 24.008 [6]. */
+ { DE_EMM_SHORT_MAC, "Short MAC" }, /* 9.9.3.28 Short MAC */
+ { DE_EMM_TZ, "Time zone" }, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
+ { DE_EMM_TZ_AND_T, "Time zone and time" }, /* 9.9.3.30 Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. */
+ { DE_EMM_TMSI_STAT, "TMSI status" }, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
+ { DE_EMM_TRAC_AREA_ID, "Tracking area identity" }, /* 9.9.3.32 Tracking area identity */
+ { DE_EMM_TRAC_AREA_ID_LST, "Tracking area identity list" }, /* 9.9.3.33 Tracking area identity list */
+ { DE_EMM_UE_NET_CAP, "UE network capability" }, /* 9.9.3.34 UE network capability */
+ { DE_EMM_UE_RA_CAP_INF_UPD_NEED, "UE radio capability information update needed" },/* 9.9.3.35 UE radio capability information update needed */
+ { DE_EMM_UE_SEC_CAP, "UE security capability" }, /* 9.9.3.36 UE security capability */
+ { DE_EMM_EMERG_NUM_LST, "Emergency Number List" }, /* 9.9.3.37 Emergency Number List */
+ { DE_EMM_CLI, "CLI" }, /* 9.9.3.38 CLI */
+ { DE_EMM_SS_CODE, "SS Code" }, /* 9.9.3.39 SS Code */
+ { DE_EMM_LCS_IND, "LCS indicator" }, /* 9.9.3.40 LCS indicator */
+ { DE_EMM_LCS_CLIENT_ID, "LCS client identity" }, /* 9.9.3.41 LCS client identity */
+ { DE_EMM_GEN_MSG_CONT_TYPE, "Generic message container type" }, /* 9.9.3.42 Generic message container type */
+ { DE_EMM_GEN_MSG_CONT, "Generic message container" }, /* 9.9.3.43 Generic message container */
+ { DE_EMM_VOICE_DMN_PREF, "Voice domain preference and UEs usage setting" },/* 9.9.3.44 Voice domain preference and UEs usage setting */
+ { DE_EMM_GUTI_TYPE, "GUTI type" }, /* 9.9.3.45 GUTI type */
{ 0, NULL }
};
+value_string_ext nas_emm_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_emm_elem_strings);
+
#define NUM_NAS_EMM_ELEM (sizeof(nas_emm_elem_strings)/sizeof(value_string))
gint ett_nas_eps_emm_elem[NUM_NAS_EMM_ELEM];
#if 0
-This enum has been moved to packet-gsm_a_common to
+/* This enum has been moved to packet-gsm_a_common to
make it possible to use element dissection from this dissector
in other dissectors.
It is left here as a comment for easier reference.
-
+*/
+/*
Note this enum must be of the same size as the element decoding list
-
+*/
typedef enum
{
- /. 9.9.3 EPS Mobility Management (EMM) information elements ./
- DE_EMM_ADD_UPD_RES, /. 9.9.3.0A Additional update result ./
- DE_EMM_ADD_UPD_TYPE, /. 9.9.3.0B Additional update type ./
- DE_EMM_AUTH_FAIL_PAR, /. 9.9.3.1 Authentication failure parameter (dissected in packet-gsm_a_dtap.c)./
- DE_EMM_AUTN, /. 9.9.3.2 Authentication parameter AUTN ./
- DE_EMM_AUTH_PAR_RAND, /. 9.9.3.3 Authentication parameter RAND ./
- DE_EMM_AUTH_RESP_PAR, /. 9.9.3.4 Authentication response parameter ./
- DE_EMM_CSFB_RESP, /. 9.9.3.5 CSFB response ./
- DE_EMM_DAYL_SAV_T, /. 9.9.3.6 Daylight saving time ./
- DE_EMM_DET_TYPE, /. 9.9.3.7 Detach type ./
- DE_EMM_DRX_PAR, /. 9.9.3.8 DRX parameter (dissected in packet-gsm_a_gm.c)./
- DE_EMM_CAUSE, /. 9.9.3.9 EMM cause ./
- DE_EMM_ATT_RES, /. 9.9.3.10 EPS attach result (Coded inline ./
- DE_EMM_ATT_TYPE, /. 9.9.3.11 EPS attach type (Coded Inline)./
- DE_EMM_EPS_MID, /. 9.9.3.12 EPS mobile identity ./
- DE_EMM_EPS_NET_FEATURE_SUP, /. 9.9.3.12A EPS network feature support ./
- DE_EMM_EPS_UPD_RES, /. 9.9.3.13 EPS update result ( Coded inline)./
- DE_EMM_EPS_UPD_TYPE, /. 9.9.3.14 EPS update type ./
- DE_EMM_ESM_MSG_CONT, /. 9.9.3.15 ESM message conta ./
- DE_EMM_GPRS_TIMER, /. 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. ./
- DE_EMM_ID_TYPE_2, /. 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. ./
- DE_EMM_IMEISV_REQ, /. 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. ./
- DE_EMM_KSI_AND_SEQ_NO, /. 9.9.3.19 KSI and sequence number ./
- DE_EMM_MS_NET_CAP, /. 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. ./
- DE_EMM_NAS_KEY_SET_ID, /. 9.9.3.21 NAS key set identifier (coded inline)./
- DE_EMM_NAS_MSG_CONT, /. 9.9.3.22 NAS message container ./
- DE_EMM_NAS_SEC_ALGS, /. 9.9.3.23 NAS security algorithms ./
- DE_EMM_NET_NAME, /. 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. ./
- DE_EMM_NONCE, /. 9.9.3.25 Nonce ./
- DE_EMM_PAGING_ID, /. 9.9.3.25A Paging identity ./
- DE_EMM_P_TMSI_SIGN, /. 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. ./
- DE_EMM_SERV_TYPE, /. 9.9.3.27 Service type ./
- DE_EMM_SHORT_MAC, /. 9.9.3.28 Short MAC ./
- DE_EMM_TZ, /. 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. ./
- DE_EMM_TZ_AND_T, /. 9.9.3.30 Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. ./
- DE_EMM_TMSI_STAT, /. 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. ./
- DE_EMM_TRAC_AREA_ID, /. 9.9.3.32 Tracking area identity ./
- DE_EMM_TRAC_AREA_ID_LST, /. 9.9.3.33 Tracking area identity list ./
- DE_EMM_UE_NET_CAP, /. 9.9.3.34 UE network capability ./
- DE_EMM_UE_RA_CAP_INF_UPD_NEED, /. 9.9.3.35 UE radio capability information update needed ./
- DE_EMM_UE_SEC_CAP, /. 9.9.3.36 UE security capability ./
- DE_EMM_EMERG_NUM_LST, /. 9.9.3.37 Emergency Number List ./
- DE_EMM_CLI, /. 9.9.3.38 CLI ./
- DE_EMM_SS_CODE, /. 9.9.3.39 SS Code ./
- DE_EMM_LCS_IND, /. 9.9.3.40 LCS indicator ./
- DE_EMM_LCS_CLIENT_ID, /. 9.9.3.41 LCS client identity ./
- DE_EMM_GEN_MSG_CONT_TYPE, /. 9.9.3.42 Generic message container type ./
- DE_EMM_GEN_MSG_CONT, /. 9.9.3.43 Generic message container ./
- DE_EMM_VOICE_DMN_PREF, /. 9.9.3.44 Voice domain preference and UEs usage setting ./
- DE_EMM_NONE /. NONE ./
-
+ /* 9.9.3 EPS Mobility Management (EMM) information elements */
+ DE_EMM_ADD_UPD_RES, /* 9.9.3.0A Additional update result */
+ DE_EMM_ADD_UPD_TYPE, /* 9.9.3.0B Additional update type */
+ DE_EMM_AUTH_FAIL_PAR, /* 9.9.3.1 Authentication failure parameter (dissected in packet-gsm_a_dtap.c)*/
+ DE_EMM_AUTN, /* 9.9.3.2 Authentication parameter AUTN */
+ DE_EMM_AUTH_PAR_RAND, /* 9.9.3.3 Authentication parameter RAND */
+ DE_EMM_AUTH_RESP_PAR, /* 9.9.3.4 Authentication response parameter */
+ DE_EMM_CSFB_RESP, /* 9.9.3.5 CSFB response */
+ DE_EMM_DAYL_SAV_T, /* 9.9.3.6 Daylight saving time */
+ DE_EMM_DET_TYPE, /* 9.9.3.7 Detach type */
+ DE_EMM_DRX_PAR, /* 9.9.3.8 DRX parameter (dissected in packet-gsm_a_gm.c)*/
+ DE_EMM_CAUSE, /* 9.9.3.9 EMM cause */
+ DE_EMM_ATT_RES, /* 9.9.3.10 EPS attach result (Coded inline */
+ DE_EMM_ATT_TYPE, /* 9.9.3.11 EPS attach type (Coded Inline)*/
+ DE_EMM_EPS_MID, /* 9.9.3.12 EPS mobile identity */
+ DE_EMM_EPS_NET_FEATURE_SUP, /* 9.9.3.12A EPS network feature support */
+ DE_EMM_EPS_UPD_RES, /* 9.9.3.13 EPS update result ( Coded inline)*/
+ DE_EMM_EPS_UPD_TYPE, /* 9.9.3.14 EPS update type */
+ DE_EMM_ESM_MSG_CONT, /* 9.9.3.15 ESM message conta */
+ DE_EMM_GPRS_TIMER, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
+ DE_EMM_GPRS_TIMER_2, /* 9.9.3.16A GPRS timer 2, See subclause 10.5.7.4 in 3GPP TS 24.008. */
+ DE_EMM_GPRS_TIMER_3, /* 9.9.3.16B GPRS timer 3, See subclause 10.5.7.4a in 3GPP TS 24.008. */
+ DE_EMM_ID_TYPE_2, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
+ DE_EMM_IMEISV_REQ, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
+ DE_EMM_KSI_AND_SEQ_NO, /* 9.9.3.19 KSI and sequence number */
+ DE_EMM_MS_NET_CAP, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
+ DE_EMM_MS_NET_FEAT_SUP, /* 9.9.3.20A MS network feature support, See subclause 10.5.1.15 in 3GPP TS 24.008. */
+ DE_EMM_NAS_KEY_SET_ID, /* 9.9.3.21 NAS key set identifier (coded inline)*/
+ DE_EMM_NAS_MSG_CONT, /* 9.9.3.22 NAS message container */
+ DE_EMM_NAS_SEC_ALGS, /* 9.9.3.23 NAS security algorithms */
+ DE_EMM_NET_NAME, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
+ DE_EMM_NONCE, /* 9.9.3.25 Nonce */
+ DE_EMM_PAGING_ID, /* 9.9.3.25A Paging identity */
+ DE_EMM_P_TMSI_SIGN, /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
+ DE_EMM_SERV_TYPE, /* 9.9.3.27 Service type */
+ DE_EMM_SHORT_MAC, /* 9.9.3.28 Short MAC */
+ DE_EMM_TZ, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
+ DE_EMM_TZ_AND_T, /* 9.9.3.30 Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. */
+ DE_EMM_TMSI_STAT, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
+ DE_EMM_TRAC_AREA_ID, /* 9.9.3.32 Tracking area identity */
+ DE_EMM_TRAC_AREA_ID_LST, /* 9.9.3.33 Tracking area identity list */
+ DE_EMM_UE_NET_CAP, /* 9.9.3.34 UE network capability */
+ DE_EMM_UE_RA_CAP_INF_UPD_NEED, /* 9.9.3.35 UE radio capability information update needed */
+ DE_EMM_UE_SEC_CAP, /* 9.9.3.36 UE security capability */
+ DE_EMM_EMERG_NUM_LST, /* 9.9.3.37 Emergency Number List */
+ DE_EMM_CLI, /* 9.9.3.38 CLI */
+ DE_EMM_SS_CODE, /* 9.9.3.39 SS Code */
+ DE_EMM_LCS_IND, /* 9.9.3.40 LCS indicator */
+ DE_EMM_LCS_CLIENT_ID, /* 9.9.3.41 LCS client identity */
+ DE_EMM_GEN_MSG_CONT_TYPE, /* 9.9.3.42 Generic message container type */
+ DE_EMM_GEN_MSG_CONT, /* 9.9.3.43 Generic message container */
+ DE_EMM_VOICE_DMN_PREF, /* 9.9.3.44 Voice domain preference and UEs usage setting */
+ DE_EMM_GUTI_TYPE, /* 9.9.3.45 GUTI type */
+ DE_EMM_NONE /* NONE */
}
nas_emm_elem_idx_t;
-
#endif
+
/* TODO: Update to latest spec */
/* 9.9.3 EPS Mobility Management (EMM) information elements
*/
{ 0, NULL }
};
static guint16
-de_emm_add_upd_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_add_upd_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
curr_offset = offset;
- bit_offset = (curr_offset<<3)+4;
+ bit_offset = (curr_offset<<3)+4;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
bit_offset += 2;
* 9.9.3.0B Additional update type
*/
static const value_string nas_eps_emm_add_upd_type_vals[] = {
- { 0x0, "no additional information (shall be interpreted as request for combined attach or combined tracking area updating)"},
+ { 0x0, "no additional information (shall be interpreted as request for"
+ " combined attach or combined tracking area updating)"},
{ 0x1, "SMS only"},
{ 0, NULL }
};
static guint16
-de_emm_add_upd_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_add_upd_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
curr_offset = offset;
- bit_offset = (curr_offset<<3)+4;
+ bit_offset = (curr_offset<<3)+4;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
bit_offset += 3;
* 9.9.3.4 Authentication response parameter
*/
static guint16
-de_emm_auth_resp_par(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_auth_resp_par(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
};
static guint16
-de_emm_csfb_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_csfb_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
/* Type of detach (octet 1)
* In the UE to network direction:
*/
-static const value_string nas_eps_emm_type_of_dtatch_UL_vals[] = {
+static const value_string nas_eps_emm_type_of_detach_UL_vals[] = {
{ 0x1, "EPS detach"},
{ 0x2, "IMSI detach"},
{ 0x3, "Combined EPS/IMSI detach"},
- { 0x4, "Combined EPS/IMSI detach"}, /* All other values are interpreted as "combined EPS/IMSI detach" in this version of the protocol.*/
+ { 0x4, "Combined EPS/IMSI detach"}, /* All other values are interpreted as
+ "combined EPS/IMSI detach" in this version of the protocol.*/
{ 0x5, "Combined EPS/IMSI detach"}, /* -"- */
{ 0x6, "Reserved"},
{ 0x7, "Reserved"},
* In the network to UE direction:
*/
-static const value_string nas_eps_emm_type_of_dtatch_DL_vals[] = {
+static const value_string nas_eps_emm_type_of_detach_DL_vals[] = {
{ 0x1, "Re-attach required"},
{ 0x2, "Re-attach not required"},
{ 0x3, "IMSI detach"},
- { 0x4, "Re-attach not required"}, /* All other values are interpreted as "re-attach not required" in this version of the protocol.*/
+ { 0x4, "Re-attach not required"}, /* All other values are interpreted as
+ "re-attach not required" in this version of the protocol.*/
{ 0x5, "Re-attach not required"}, /* -"- */
{ 0x6, "Reserved"},
{ 0x7, "Reserved"},
/*
* 9.9.3.9 EMM cause
*/
-static const value_string nas_eps_emm_cause_values[] = {
+const value_string nas_eps_emm_cause_values[] = {
{ 0x2, "IMSI unknown in HSS"},
{ 0x3, "Illegal UE"},
{ 0x5, "IMEI not accepted"},
{ 0x18, "Security mode rejected, unspecified"},
{ 0x19, "Not authorized for this CSG"},
{ 0x1a, "Non-EPS authentication unacceptable"},
- { 0x27, "CS domain temporarily not available"},
+ { 0x23, "Requested service option not authorized in this PLMN"},
+ { 0x27, "CS service temporarily not available"},
{ 0x28, "No EPS bearer context activated"},
+ { 0x2a, "Severe network failure"},
{ 0x5f, "Semantically incorrect message"},
{ 0x60, "Invalid mandatory information"},
{ 0x61, "Message type non-existent or not implemented"},
{ 0x6f, "Protocol error, unspecified"},
{ 0, NULL }
};
+value_string_ext nas_eps_emm_cause_values_ext = VALUE_STRING_EXT_INIT(nas_eps_emm_cause_values);
static guint16
-de_emm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
proto_tree_add_item(tree, hf_nas_eps_emm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
- return curr_offset-offset;}
+ return curr_offset-offset;
+}
+
/*
* 9.9.3.10 EPS attach result
*/
static const value_string nas_eps_emm_eps_att_type_vals[] = {
{ 0, "EPS attach(unused)"},
{ 1, "EPS attach"},
- { 2, "Combined handover EPS/IMSI attach"},
+ { 2, "Combined EPS/IMSI attach"},
{ 3, "EPS attach(unused)"},
{ 4, "EPS attach(unused)"},
{ 5, "EPS attach(unused)"},
static char *
unpack_eps_mid_digits(tvbuff_t *tvb) {
- int length;
- guint8 octet;
- int i=0;
- int offset = 0;
- char *digit_str;
+ int length;
+ guint8 octet;
+ int i = 0;
+ int offset = 0;
+ char *digit_str;
length = tvb_length(tvb);
- digit_str = ep_alloc(length*2);
+ digit_str = (char *)wmem_alloc(wmem_packet_scope(), length*2);
/* Get identity digit 1 */
octet = tvb_get_guint8(tvb,offset);
offset++;
/* Loop on following octets to retrieve other identity digits */
- while ( offset < length ){
+ while ( offset < length ) {
octet = tvb_get_guint8(tvb,offset);
digit_str[i] = ((octet & 0x0f) + '0');
{ 0, NULL }
};
static guint16
-de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
- guint8 octet;
- char *digit_str;
+ guint32 curr_offset;
+ guint8 octet;
+ char *digit_str;
tvbuff_t *new_tvb;
curr_offset = offset;
/* Type of identity (octet 3) */
proto_tree_add_item(tree, hf_nas_eps_emm_odd_even, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_type_of_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- switch (octet&0x7){
+ switch (octet&0x7) {
case 1:
/* IMSI */
new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
case 6:
/* GUTI */
curr_offset++;
- curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
/* MME Group ID octet 7 - 8 */
proto_tree_add_item(tree, hf_nas_eps_emm_mme_grp_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
curr_offset++;
/* M-TMSI Octet 10 - 13 */
proto_tree_add_item(tree, hf_nas_eps_emm_m_tmsi, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
- curr_offset+=4;
+ /*curr_offset+=4;*/
break;
default:
proto_tree_add_text(tree, tvb, curr_offset, len - 1, "Type of identity not known");
/*
* 9.9.3.12A EPS network feature support
*/
+static const true_false_string nas_eps_emm_esr_ps_value = {
+ "network supports use of EXTENDED SERVICE REQUEST to request for packet services",
+ "network does not support use of EXTENDED SERVICE REQUEST to request for packet services"
+};
static const value_string nas_eps_emm_cs_lcs_vals[] = {
{ 0, "no information about support of location services via CS domain is available"},
{ 1, "location services via CS domain not supported"},
};
static guint16
-de_emm_eps_net_feature_sup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_eps_net_feature_sup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
curr_offset = offset;
bit_offset = curr_offset << 3;
- proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
- bit_offset += 3;
- proto_tree_add_bits_item(tree, hf_nas_eps_emm_cs_lcs_type, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
bit_offset += 2;
- proto_tree_add_bits_item(tree, hf_nas_eps_emm_epc_lcs_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_bits_item(tree, hf_nas_eps_emm_esr_ps, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset += 1;
- proto_tree_add_bits_item(tree, hf_nas_eps_emm_emc_bs_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_bits_item(tree, hf_nas_eps_emm_cs_lcs, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
+ bit_offset += 2;
+ proto_tree_add_bits_item(tree, hf_nas_eps_emm_epc_lcs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset += 1;
- proto_tree_add_bits_item(tree, hf_nas_eps_emm_ims_vops_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_bits_item(tree, hf_nas_eps_emm_emc_bs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset += 1;
+ proto_tree_add_bits_item(tree, hf_nas_eps_emm_ims_vops, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
+ /*bit_offset += 1;*/
return len;
}
* 9.9.3.15 ESM message container
*/
static guint16
-de_emm_esm_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+de_emm_esm_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
+ guint32 offset, guint len,
+ gchar *add_string _U_, int string_len _U_)
{
proto_item *item;
proto_tree *sub_tree;
- tvbuff_t *new_tvb;
- guint32 curr_offset;
+ tvbuff_t *new_tvb;
+ guint32 curr_offset;
curr_offset = offset;
/* This IE can contain any ESM PDU as defined in subclause 8.3. */
new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
/* Plain NAS message */
- disect_nas_eps_esm_msg(new_tvb, gpinfo, sub_tree, 0/* offset */);
+ disect_nas_eps_esm_msg(new_tvb, pinfo, sub_tree, 0/* offset */);
return(len);
}
* See subclause 10.5.7.3 in 3GPP TS 24.008 [6].
* packet-gsm_a_gm.c
*/
+/*
+ * 9.9.3.16A GPRS timer 2
+ * See subclause 10.5.7.4 in 3GPP TS 24.008.
+ * packet-gsm_a_gm.c
+ */
+/*
+ * 9.9.3.16B GPRS timer 3
+ * See subclause 10.5.7.4a in 3GPP TS 24.008.
+ * packet-gsm_a_gm.c
+ */
/*
* 9.9.3.17 Identity type 2
* See subclause 10.5.5.9 in 3GPP TS 24.008 [6].
{ 0, NULL }
};
static guint16
-de_emm_nas_imeisv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_nas_imeisv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
- int bit_offset;
+ int bit_offset;
curr_offset = offset;
* 9.9.3.19 KSI and sequence number
*/
static guint16
-de_emm_nas_ksi_and_seq_no(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_nas_ksi_and_seq_no(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
- int bit_offset;
+ int bit_offset;
curr_offset = offset;
bit_offset = curr_offset<<3;
/*
* 9.9.3.20 MS network capability
* See subclause 10.5.5.12 in 3GPP TS 24.008 [6].
+ * packet-gsm_a_gm.c
+ */
+/*
+ * 9.9.3.20A MS network feature support
+ * See subclause 10.5.1.15 in 3GPP TS 24.008.
+ * packet-gsm_a_gm.c
*/
/*
* 9.9.3.21 NAS key set identifier
/*
* Type of security context flag (TSC) (octet 1)
*/
-static const value_string nas_eps_tsc_vals[] = {
- { 0, "Native security context (for KSIasme)"},
- { 1, "Mapped security context (for KSIsgsn)"},
- { 0, NULL }
+static const true_false_string nas_eps_tsc_value = {
+ "Mapped security context (for KSIsgsn)",
+ "Native security context (for KSIasme)"
};
/* NAS key set identifier (octet 1) Bits 3 2 1 */
bit_offset++;
/* NAS key set identifier (octet 1) */
item = proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
- if(add_string){
+ if (add_string) {
proto_item_append_text(item, "%s", add_string);
}
- bit_offset+=3;
+ /*bit_offset+=3;*/
}
/*
* Note used for TV Short
*/
static guint16
-de_emm_nas_key_set_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_nas_key_set_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
bit_offset++;
/* NAS key set identifier (octet 1) */
proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
- bit_offset+=3;
+ /*bit_offset+=3;*/
curr_offset++;
return(curr_offset - offset);
* 9.9.3.22 NAS message container
*/
static guint16
-de_emm_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
proto_item *item;
proto_tree *sub_tree;
- tvbuff_t *new_tvb;
- guint32 curr_offset;
+ tvbuff_t *new_tvb;
+ guint32 curr_offset;
curr_offset = offset;
sub_tree = proto_item_add_subtree(item, ett_nas_eps_nas_msg_cont);
new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
- if(gsm_a_dtap_handle)
- call_dissector(gsm_a_dtap_handle, new_tvb, gpinfo, sub_tree);
+ if (gsm_a_dtap_handle)
+ call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, sub_tree);
return(len);
}
{ 0, "EPS integrity algorithm EIA0 (null integrity protection algorithm)"},
{ 1, "EPS integrity algorithm 128-EIA1"},
{ 2, "EPS integrity algorithm 128-EIA2"},
- { 3, "EPS integrity algorithm EIA3"},
+ { 3, "EPS integrity algorithm 128-EIA3"},
{ 4, "EPS integrity algorithm EIA4"},
{ 5, "EPS integrity algorithm EIA5"},
{ 6, "EPS integrity algorithm EIA6"},
{ 0, "EPS encryption algorithm EEA0 (null ciphering algorithm)"},
{ 1, "EPS encryption algorithm 128-EEA1"},
{ 2, "EPS encryption algorithm 128-EEA2"},
- { 3, "EPS encryption algorithm EEA3"},
+ { 3, "EPS encryption algorithm 128-EEA3"},
{ 4, "EPS encryption algorithm EEA4"},
{ 5, "EPS encryption algorithm EEA5"},
{ 6, "EPS encryption algorithm EEA6"},
{ 0, NULL }
};
static guint16
-de_emm_nas_sec_alsgs(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_nas_sec_alsgs(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
- int bit_offset;
+ int bit_offset;
guint32 curr_offset;
curr_offset = offset;
* 9.9.3.25 Nonce
*/
static guint16
-de_emm_nonce(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_nonce(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
proto_tree_add_item(tree, hf_nas_eps_emm_nonce, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
curr_offset+=4;
- return(len);
+ return(curr_offset-offset);
}
/*
* 9.9.3.25A Paging identity
};
static guint16
-de_emm_paging_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_paging_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
proto_tree_add_bits_item(tree, hf_nas_eps_emm_paging_id, tvb, (curr_offset<<3)+7, 1, ENC_BIG_ENDIAN);
- curr_offset+=len;
+ /*curr_offset+=1;*/
- return(len);
+ return(1);
}
/*
* 9.9.3.26 P-TMSI signature
/*
* 9.9.3.27 Service type
*/
-static const value_string nas_eps_service_type_vals[] = {
- { 0, "Mobile originating CS fallback or 1xCS fallback"},
- { 1, "Mobile terminating CS fallback or 1xCS fallback"},
- { 2, "Mobile originating CS fallback emergency call or 1xCS fallback emergency call"},
- { 0, NULL }
+static const range_string nas_eps_service_type_vals[] = {
+ { 0, 0, "Mobile originating CS fallback or 1xCS fallback"},
+ { 1, 1, "Mobile terminating CS fallback or 1xCS fallback"},
+ { 2, 2, "Mobile originating CS fallback emergency call or 1xCS fallback emergency call"},
+ { 3, 4, "Mobile originating CS fallback or 1xCS fallback"},
+ { 8, 11, "packet services via S1"},
+ { 0, 0, NULL }
};
/*
* 9.9.3.28 Short MAC
*/
static guint16
-de_emm_nas_short_mac(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_nas_short_mac(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
*/
guint16
-de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
- curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
};
static guint16
-de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
proto_item *item;
guint32 curr_offset;
tol = octet >> 5;
n_elem = (octet & 0x1f)+1;
item = proto_tree_add_item(tree, hf_nas_eps_emm_tai_n_elem, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- if(n_elem<16)
+ if (n_elem<16)
proto_item_append_text(item, " [+1 = %u element(s)]", n_elem);
curr_offset++;
- if (tol>2){
+ if (tol>2) {
proto_tree_add_text(tree, tvb, curr_offset, len-(curr_offset-offset) , "Unknown type of list ( Not in 3GPP TS 24.301 version 8.1.0 Release 8 )");
return len;
}
- switch(tol){
+ switch (tol) {
case 0:
/* MCC digit 2 MCC digit 1 octet 2
* MNC digit 3 MCC digit 3 octet 3
* MNC digit 2 MNC digit 1 octet 4
*/
- curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
/* type of list = "000" */
/* TAC 1 octet 5
* TAC 1 (continued) octet 6
* TAC k octet 2k+3*
* TAC k (continued) octet 2k+4*
*/
- if (len < (guint)(4+(n_elem*2))){
+ if (len < (guint)(4+(n_elem*2))) {
proto_tree_add_text(tree, tvb, curr_offset, len-1 , "[Wrong number of elements?]");
return len;
}
* MNC digit 3 MCC digit 3 octet 3
* MNC digit 2 MNC digit 1 octet 4
*/
- curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
break;
case 2:
- if (len< (guint)(1+(n_elem*5))){
+ if (len< (guint)(1+(n_elem*5))) {
proto_tree_add_text(tree, tvb, curr_offset, len-1 , "[Wrong number of elements?]");
return len;
}
- for (i=0; i < n_elem; i++){
+ for (i=0; i < n_elem; i++) {
/* type of list = "001" */
/* MCC digit 2 MCC digit 1 octet 2
* MNC digit 3 MCC digit 3 octet 3
* MNC digit 2 MNC digit 1 octet 4
*/
- curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
}
"The UE has no preference between the use of the default alphabet and the use of UCS2",
"The UE has a preference for the default alphabet"
};
+/* H.245-ASH capability (octet 7, bit 6) */
+static const true_false_string nas_eps_emm_h245_ash_cap_flg = {
+ "H.245 after SRVCC handover capability supported",
+ "H.245 after SRVCC handover capability not supported"
+};
+/* ACC-CSFB capability (octet 7, bit 5) */
+static const true_false_string nas_eps_emm_acc_csfb_cap_flg = {
+ "eNodeB-based access class control for CSFB supported",
+ "eNodeB-based access class control for CSFB not supported"
+};
/* LPP capability (octet 7, bit 4) */
static const true_false_string nas_eps_emm_lpp_cap_flg = {
"LTE Positioning Protocol supported",
};
guint16
-de_emm_ue_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+de_emm_ue_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
proto_tree_add_item(tree, hf_nas_eps_emm_128eea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* EPS encryption algorithm 128-EEA3 supported (octet 3, bit 5) */
proto_tree_add_item(tree, hf_nas_eps_emm_eea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS encryption algorithm 128-EEA4 supported (octet 3, bit 4) */
+ /* EPS encryption algorithm EEA4 supported (octet 3, bit 4) */
proto_tree_add_item(tree, hf_nas_eps_emm_eea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS encryption algorithm 128-EEA5 supported (octet 3, bit 5) */
+ /* EPS encryption algorithm EEA5 supported (octet 3, bit 3) */
proto_tree_add_item(tree, hf_nas_eps_emm_eea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS encryption algorithm 128-EEA6 supported (octet 3, bit 6) */
+ /* EPS encryption algorithm EEA6 supported (octet 3, bit 2) */
proto_tree_add_item(tree, hf_nas_eps_emm_eea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS encryption algorithm 128-EEA7 supported (octet 3, bit 7) */
+ /* EPS encryption algorithm EEA7 supported (octet 3, bit 1) */
proto_tree_add_item(tree, hf_nas_eps_emm_eea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
proto_tree_add_item(tree, hf_nas_eps_emm_128eia1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* EPS integrity algorithm 128-EIA2 supported (octet 4, bit 6) */
proto_tree_add_item(tree, hf_nas_eps_emm_128eia2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS integrity algorithm EIA3 supported (octet 4, bit 5) */
+ /* EPS integrity algorithm 128-EIA3 supported (octet 4, bit 5) */
proto_tree_add_item(tree, hf_nas_eps_emm_eia3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* EPS integrity algorithm EIA4 supported (octet 4, bit 4) */
proto_tree_add_item(tree, hf_nas_eps_emm_eia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
*/
/* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 8) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 7) */
+ /* UMTS encryption algorithm 128-UEA1 supported (octet 5, bit 7) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 6) */
+ /* UMTS encryption algorithm 128-UEA2 supported (octet 5, bit 6) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 5) */
+ /* UMTS encryption algorithm 128-UEA3 supported (octet 5, bit 5) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS encryption algorithm 128-UEA0 supported (octet 5, bit 4) */
+ /* UMTS encryption algorithm 128-UEA4 supported (octet 5, bit 4) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 5) */
+ /* UMTS encryption algorithm 128-UEA5 supported (octet 5, bit 3) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 6) */
+ /* UMTS encryption algorithm 128-UEA6 supported (octet 5, bit 2) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS encryption algorithm 128-UEA0 supported (octet 5, bit 7) */
+ /* UMTS encryption algorithm 128-UEA7 supported (octet 5, bit 1) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
/* UMTS integrity algorithms supported (octet 6) */
/* UMTS integrity algorithm UIA1 supported (octet 6, bit 7) */
proto_tree_add_item(tree, hf_nas_eps_emm_uia1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS integrity algorithm UIA1 supported (octet 6, bit 6) */
+ /* UMTS integrity algorithm UIA2 supported (octet 6, bit 6) */
proto_tree_add_item(tree, hf_nas_eps_emm_uia2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS integrity algorithm UIA1 supported (octet 6, bit 5) */
+ /* UMTS integrity algorithm UIA3 supported (octet 6, bit 5) */
proto_tree_add_item(tree, hf_nas_eps_emm_uia3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS integrity algorithm UIA1 supported (octet 6, bit 4) */
+ /* UMTS integrity algorithm UIA4 supported (octet 6, bit 4) */
proto_tree_add_item(tree, hf_nas_eps_emm_uia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS integrity algorithm UIA1 supported (octet 6, bit 3) */
+ /* UMTS integrity algorithm UIA5 supported (octet 6, bit 3) */
proto_tree_add_item(tree, hf_nas_eps_emm_uia5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS integrity algorithm UIA1 supported (octet 6, bit 2) */
+ /* UMTS integrity algorithm UIA6 supported (octet 6, bit 2) */
proto_tree_add_item(tree, hf_nas_eps_emm_uia6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS integrity algorithm UIA1 supported (octet 6, bit 1) */
+ /* UMTS integrity algorithm UIA7 supported (octet 6, bit 1) */
proto_tree_add_item(tree, hf_nas_eps_emm_uia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
if ((curr_offset - offset) >= len)
return (len);
- /* Bits 8 to 5 of octet 7 are spare and shall be coded as zero. */
- proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
+ /* Bits 8 to 7 of octet 7 are spare and shall be coded as zero. */
+ proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 2, ENC_BIG_ENDIAN);
+ /* H.245-ASH capability (octet 7, bit 6) */
+ proto_tree_add_item(tree, hf_nas_eps_emm_h245_ash_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
+ /* ACC-CSFB capability (octet 7, bit 5) */
+ proto_tree_add_item(tree, hf_nas_eps_emm_acc_csfb_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* LPP capability (octet 7, bit 4) */
proto_tree_add_item(tree, hf_nas_eps_emm_lpp_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* LCS capability (octet 7, bit 3) */
proto_tree_add_item(tree, hf_nas_eps_emm_nf_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
+ while ((curr_offset - offset) < len) {
+ proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 8, ENC_BIG_ENDIAN);
+ curr_offset++;
+ }
+
return(len);
}
/* UE radio capability information update needed flag (URC upd) (octet 1) */
*/
static guint16
-de_emm_ue_ra_cap_inf_upd_need(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_ue_ra_cap_inf_upd_need(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
+ proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3)+4, 3, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
return(len);
*/
static guint16
-de_emm_ue_sec_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_ue_sec_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
proto_tree_add_item(tree, hf_nas_eps_emm_128eea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* EPS encryption algorithm 128-EEA3 supported (octet 3, bit 5) */
proto_tree_add_item(tree, hf_nas_eps_emm_eea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS encryption algorithm 128-EEA4 supported (octet 3, bit 4) */
+ /* EPS encryption algorithm EEA4 supported (octet 3, bit 4) */
proto_tree_add_item(tree, hf_nas_eps_emm_eea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS encryption algorithm 128-EEA5 supported (octet 3, bit 5) */
+ /* EPS encryption algorithm EEA5 supported (octet 3, bit 3) */
proto_tree_add_item(tree, hf_nas_eps_emm_eea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS encryption algorithm 128-EEA6 supported (octet 3, bit 6) */
+ /* EPS encryption algorithm EEA6 supported (octet 3, bit 2) */
proto_tree_add_item(tree, hf_nas_eps_emm_eea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS encryption algorithm 128-EEA7 supported (octet 3, bit 7) */
+ /* EPS encryption algorithm EEA7 supported (octet 3, bit 1) */
proto_tree_add_item(tree, hf_nas_eps_emm_eea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
proto_tree_add_item(tree, hf_nas_eps_emm_128eia1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* EPS integrity algorithm 128-EIA2 supported (octet 4, bit 6) */
proto_tree_add_item(tree, hf_nas_eps_emm_128eia2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS integrity algorithm EIA3 supported (octet 4, bit 5) */
+ /* EPS integrity algorithm 128-EIA3 supported (octet 4, bit 5) */
proto_tree_add_item(tree, hf_nas_eps_emm_eia3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* EPS integrity algorithm EIA4 supported (octet 4, bit 4) */
proto_tree_add_item(tree, hf_nas_eps_emm_eia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* Octets 5, 6, and 7 are optional. If octet 5 is included,
* then also octet 6 shall be included and octet 7 may be included.
*/
- if(len==2)
+ if (len == 2)
return(len);
/* UMTS encryption algorithms supported (octet 5) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* UMTS encryption algorithm UEA3 supported (octet 5, bit 5) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* EPS encryption algorithm UEA4 supported (octet 5, bit 4) */
+ /* UMTS encryption algorithm UEA4 supported (octet 5, bit 4) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS encryption algorithm UEA5 supported (octet 5, bit 5) */
+ /* UMTS encryption algorithm UEA5 supported (octet 5, bit 3) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS encryption algorithm UEA6 supported (octet 5, bit 6) */
+ /* UMTS encryption algorithm UEA6 supported (octet 5, bit 2) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
- /* UMTS encryption algorithm UEA7 supported (octet 5, bit 7) */
+ /* UMTS encryption algorithm UEA7 supported (octet 5, bit 1) */
proto_tree_add_item(tree, hf_nas_eps_emm_uea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
proto_tree_add_item(tree, hf_nas_eps_emm_uia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
- if(len==4)
+ if (len == 4)
return(len);
/* Bit 8 of octet 7 is spare and shall be coded as zero. */
* 9.9.3.39 SS Code
*/
static guint16
-de_emm_ss_code(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_ss_code(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
static guint16
-de_emm_lcs_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_lcs_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
* 9.9.3.41 LCS client identity
*/
static guint16
-de_emm_lcs_client_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_lcs_client_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
+ guint32 curr_offset;
tvbuff_t *new_tvb;
curr_offset = offset;
* in subclause 17.7.13 of 3GPP TS 29.002 [15B](GSM MAP).
*/
new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
- dissect_gsm_map_lcs_LCS_ClientID_PDU( new_tvb, gpinfo, tree );
+ dissect_gsm_map_lcs_LCS_ClientID_PDU( new_tvb, pinfo, tree, NULL );
return(len);
}
/*
* 9.9.3.42 Generic message container type
*/
-static const value_string nas_eps_emm_gen_msg_cont_type_vals[] = {
- { 0, "Reserved"},
- { 1, "LTE Positioning Protocol (LPP) message container"},
- { 2, "Location services message container "},
- { 0, NULL }
+static const range_string nas_eps_emm_gen_msg_cont_type_vals[] = {
+ { 0, 0, "Reserved"},
+ { 1, 1, "LTE Positioning Protocol (LPP) message container"},
+ { 2, 2, "Location services message container"},
+ { 3, 127, "Unused"},
+ { 128, 255, "Reserved"},
+ { 0, 0, NULL }
};
static guint16
-de_emm_gen_msg_cont_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_emm_gen_msg_cont_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
* 9.9.3.43 Generic message container
*/
static guint16
-de_emm_gen_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+de_emm_gen_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
+ guint32 offset, guint len,
+ gchar *add_string _U_, int string_len _U_)
{
proto_item *item;
proto_tree *sub_tree;
- tvbuff_t *new_tvb;
+ tvbuff_t *new_tvb;
item = proto_tree_add_item(tree, hf_nas_eps_gen_msg_cont, tvb, offset, len, ENC_NA);
sub_tree = proto_item_add_subtree(item, ett_nas_eps_gen_msg_cont);
new_tvb = tvb_new_subset(tvb, offset, len, len);
switch (eps_nas_gen_msg_cont_type) {
- case 1:
- /* LPP */
- if (lpp_handle) {
- call_dissector(lpp_handle, new_tvb, pinfo, sub_tree);
- }
- break;
- case 2:
- /* Location services */
- if (gsm_a_dtap_handle) {
- call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, sub_tree);
- }
- break;
- default:
- break;
+ case 1:
+ /* LPP */
+ if (lpp_handle) {
+ call_dissector(lpp_handle, new_tvb, pinfo, sub_tree);
+ }
+ break;
+ case 2:
+ /* Location services */
+ if (gsm_a_dtap_handle) {
+ call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, sub_tree);
+ }
+ break;
+ default:
+ break;
}
return(len);
* See subclause 10.5.5.28 in 3GPP TS 24.008 [13].
* packet-gsm_a_dtap.c
*/
+/*
+ * 9.9.3.45 GUTI type
+ */
+static const true_false_string nas_eps_emm_guti_type_value = {
+ "Mapped GUTI",
+ "Native GUTI"
+};
+
+static guint16
+de_emm_guti_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
+{
+ guint32 curr_offset, bit_offset;
+
+ curr_offset = offset;
+ bit_offset = (curr_offset<<3)+4;
+
+ proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
+ bit_offset += 3;
+ proto_tree_add_bits_item(tree, hf_nas_eps_emm_guti_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
+ curr_offset++;
+
+ return (curr_offset - offset);
+}
/*
* 9.9.4 EPS Session Management (ESM) information elements
*/
static guint16
-de_esm_apn_aggr_max_br(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_esm_apn_aggr_max_br(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
- guint8 octet;
+ guint8 octet;
guint32 dl_total = 0;
guint32 ul_total = 0;
- guint32 bitrate = 0;
+ guint32 bitrate = 0;
curr_offset = offset;
/* APN-AMBR for downlink octet 3 */
octet = tvb_get_guint8(tvb,curr_offset);
- if(octet==0){
+ if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl, tvb, curr_offset, 1, octet,
"Reserved");
- }else{
+ } else {
bitrate = calc_bitrate(octet);
dl_total += bitrate;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl, tvb, curr_offset, 1, octet,
- "APN-AMBR for downlink : %u kbps", bitrate);
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_dl, tvb, curr_offset, 1, octet,
+ "%u kbps", bitrate);
}
curr_offset++;
/* APN-AMBR for uplink octet 4 */
octet = tvb_get_guint8(tvb,curr_offset);
- if(octet==0){
+ if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul, tvb, curr_offset, 1, octet,
"Reserved");
- }else{
+ } else {
bitrate = calc_bitrate(octet);
ul_total += bitrate;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul, tvb, curr_offset, 1, octet,
- "APN-AMBR for uplink : %u kbps", bitrate);
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_ul, tvb, curr_offset, 1, octet,
+ "%u kbps", bitrate);
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* APN-AMBR for downlink (extended) octet 5 */
octet = tvb_get_guint8(tvb,curr_offset);
- if(octet==0){
+ if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext, tvb, curr_offset, 1, octet,
"Use the value indicated by the APN-AMBR for downlink");
- }else{
+ } else {
bitrate = calc_bitrate_ext(octet);
dl_total += (octet > 0x4a) ? bitrate*1000 : bitrate;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext, tvb, curr_offset, 1, octet,
- "APN-AMBR for downlink (extended) : %u %s",
- bitrate,
- (octet > 0x4a) ? "Mbps" : "kbps");
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_dl_ext, tvb, curr_offset, 1, octet,
+ "%u %s", bitrate, (octet > 0x4a) ? "Mbps" : "kbps");
}
if (len < 5) {
/* APN-AMBR for downlink (extended-2) is not present; display total now */
return(len);
/* APN-AMBR for uplink (extended) octet 6 */
octet = tvb_get_guint8(tvb,curr_offset);
- if(octet==0){
+ if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext, tvb, curr_offset, 1, octet,
"Use the value indicated by the APN-AMBR for uplink");
- }else{
+ } else {
bitrate = calc_bitrate_ext(octet);
ul_total += (octet > 0x4a) ? bitrate*1000 : bitrate;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext, tvb, curr_offset, 1, octet,
- "APN-AMBR for uplink (extended) : %u %s",
- bitrate,
- (octet > 0x4a) ? "Mbps" : "kbps");
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_ul_ext, tvb, curr_offset, 1, octet,
+ "%u %s", bitrate, (octet > 0x4a) ? "Mbps" : "kbps");
}
if (len < 6) {
/* APN-AMBR for uplink (extended-2) is not present; display total now */
return(len);
/* APN-AMBR for downlink (extended-2) octet 7 */
octet = tvb_get_guint8(tvb,curr_offset);
- if((octet==0)||(octet==0xff)){
+ if ((octet == 0)||(octet == 0xff)) {
proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext2, tvb, curr_offset, 1, octet,
"Use the value indicated by the APN-AMBR for downlink and APN-AMBR for downlink (extended)");
- }else{
+ } else {
dl_total += octet*256*1000;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext2, tvb, curr_offset, 1, octet,
- "APN-AMBR for downlink (extended-2) : %u Mbps",
- (octet* 256));
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_dl_ext2, tvb, curr_offset, 1, octet,
+ "%u Mbps", (octet* 256));
}
proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for downlink : %.3f Mbps", (gfloat)dl_total / 1000);
curr_offset++;
return(len);
/* APN-AMBR for uplink (extended-2) octet 8 */
octet = tvb_get_guint8(tvb,curr_offset);
- if((octet==0)||(octet==0xff)){
+ if ((octet == 0)||(octet == 0xff)) {
proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext2, tvb, curr_offset, 1, octet,
- "Use the value indicated by the APN-AMBR for uplink and APN-AMBR for downlink (extended)");
- }else{
+ "Use the value indicated by the APN-AMBR for uplink and APN-AMBR for uplink (extended)");
+ } else {
ul_total += octet*256*1000;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext2, tvb, curr_offset, 1, octet,
- "APN-AMBR for uplink (extended-2) : %u Mbps",
- (octet* 256));
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_ul_ext2, tvb, curr_offset, 1, octet,
+ "%u Mbps", (octet* 256));
}
proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for uplink : %.3f Mbps", (gfloat)ul_total / 1000);
curr_offset++;
return(len);
}
+/*
+ * 9.9.4.2A Connectivity type
+ * See subclause 10.5.6.19 in 3GPP TS 24.008.
+ * packet-gsm_a_gm.c
+ */
/*
* 9.9.4.3 EPS quality of service
*/
/* Quality of Service Class Identifier (QCI), octet 3 (see 3GPP TS 23.203 [7]) */
-static const value_string nas_eps_qci_vals[] = {
- { 0, "UE -> NW Network selects the QCI / NW -> UE Reserved"},
- { 1, "QCI 1"},
- { 2, "QCI 2"},
- { 3, "QCI 3"},
- { 4, "QCI 4"},
- { 5, "QCI 5"},
- { 6, "QCI 6"},
- { 7, "QCI 7"},
- { 8, "QCI 8"},
- { 9, "QCI 9"},
- { 0, NULL }
+static const range_string nas_eps_qci_vals[] = {
+ { 0x00, 0x00, "UE -> NW Network selects the QCI / NW -> UE Reserved"},
+ { 0x01, 0x01, "QCI 1"},
+ { 0x02, 0x02, "QCI 2"},
+ { 0x03, 0x03, "QCI 3"},
+ { 0x04, 0x04, "QCI 4"},
+ { 0x05, 0x05, "QCI 5"},
+ { 0x06, 0x06, "QCI 6"},
+ { 0x07, 0x07, "QCI 7"},
+ { 0x08, 0x08, "QCI 8"},
+ { 0x09, 0x09, "QCI 9"},
+ { 0x0A, 0x7F, "Reserved"},
+ { 0x80, 0xFE, "Operator-specific QCI"},
+ { 0xFF, 0xFF, "Reserved"},
+ { 0, 0, NULL }
};
-static guint16
-de_esm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+guint16
+de_esm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
- guint8 octet;
+ guint8 octet;
curr_offset = offset;
return(len);
/* Maximum bit rate for uplink octet 4 */
octet = tvb_get_guint8(tvb,curr_offset);
- if(octet==0){
+ if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_mbr_ul, tvb, curr_offset, 1, octet,
"UE->NW Subscribed maximum bit rate for uplink/ NW->UE Reserved");
- }else{
- proto_tree_add_uint_format(tree, hf_nas_eps_mbr_ul, tvb, curr_offset, 1, octet,
- "Maximum bit rate for uplink : %u kbps", calc_bitrate(octet));
+ } else {
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_mbr_ul, tvb, curr_offset, 1, octet,
+ "%u kbps", calc_bitrate(octet));
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Maximum bit rate for downlink octet 5 */
octet = tvb_get_guint8(tvb,curr_offset);
- if(octet==0){
+ if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_mbr_dl, tvb, curr_offset, 1, octet,
"UE->NW Subscribed maximum bit rate for downlink/ NW->UE Reserved");
- }else{
- proto_tree_add_uint_format(tree, hf_nas_eps_mbr_dl, tvb, curr_offset, 1, octet,
- "Maximum bit rate for downlink : %u kbps", calc_bitrate(octet));
+ } else {
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_mbr_dl, tvb, curr_offset, 1, octet,
+ "%u kbps", calc_bitrate(octet));
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Guaranteed bit rate for uplink octet 6 */
octet = tvb_get_guint8(tvb,curr_offset);
- proto_tree_add_uint_format(tree, hf_nas_eps_gbr_ul, tvb, curr_offset, 1, octet,
- "Guaranteed bit rate for uplink : %u kbps", calc_bitrate(octet));
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_gbr_ul, tvb, curr_offset, 1, octet,
+ "%u kbps", calc_bitrate(octet));
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Guaranteed bit rate for downlink octet 7 */
octet = tvb_get_guint8(tvb,curr_offset);
- proto_tree_add_uint_format(tree, hf_nas_eps_gbr_ul, tvb, curr_offset, 1, octet,
- "Guaranteed bit rate for downlink : %u kbps", calc_bitrate(octet));
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_gbr_dl, tvb, curr_offset, 1, octet,
+ "%u kbps", calc_bitrate(octet));
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Maximum bit rate for uplink (extended) octet 8 */
octet = tvb_get_guint8(tvb,curr_offset);
- if(octet==0){
+ if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
- "Use the value indicated by the maximum bit rate for uplink in octet 4.");
- }else{
+ "Use the value indicated by the maximum bit rate for uplink in octet 4");
+ } else {
proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
- "Maximum bit rate for uplink(extended) : %u %s",
+ "Maximum bit rate for uplink (extended) : %u %s",
calc_bitrate_ext(octet),
(octet > 0x4a) ? "Mbps" : "kbps");
}
return(len);
/* Maximum bit rate for downlink (extended) octet 9 */
octet = tvb_get_guint8(tvb,curr_offset);
- if(octet==0){
- proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
- "Use the value indicated by the maximum bit rate for downlink in octet 5.");
- }else{
- proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
- "Maximum bit rate for downlink(extended) : %u %s",
+ if (octet == 0) {
+ proto_tree_add_uint_format(tree, hf_nas_eps_embr_dl, tvb, curr_offset, 1, octet,
+ "Use the value indicated by the maximum bit rate for downlink in octet 5");
+ } else {
+ proto_tree_add_uint_format(tree, hf_nas_eps_embr_dl, tvb, curr_offset, 1, octet,
+ "Maximum bit rate for downlink (extended) : %u %s",
calc_bitrate_ext(octet),
(octet > 0x4a) ? "Mbps" : "kbps");
}
return(len);
/* Guaranteed bit rate for uplink (extended) octet 10 */
octet = tvb_get_guint8(tvb,curr_offset);
- if(octet==0){
- proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
- "Use the value indicated by the Guaranteed bit rate for uplink in octet 6.");
- }else{
- proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
- "Guaranteed bit rate for uplink(extended) : %u %s",
+ if (octet == 0) {
+ proto_tree_add_uint_format(tree, hf_nas_eps_egbr_ul, tvb, curr_offset, 1, octet,
+ "Use the value indicated by the guaranteed bit rate for uplink in octet 6");
+ } else {
+ proto_tree_add_uint_format(tree, hf_nas_eps_egbr_ul, tvb, curr_offset, 1, octet,
+ "Guaranteed bit rate for uplink (extended) : %u %s",
calc_bitrate_ext(octet),
(octet > 0x4a) ? "Mbps" : "kbps");
}
return(len);
/* Guaranteed bit rate for downlink (extended) octet 11 */
octet = tvb_get_guint8(tvb,curr_offset);
- if(octet==0){
- proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
- "Use the value indicated by the Guaranteed bit rate for downlink in octet 7.");
- }else{
- proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
- "Guaranteed bit rate for downlink(extended) : %u %s",
+ if (octet == 0) {
+ proto_tree_add_uint_format(tree, hf_nas_eps_egbr_dl, tvb, curr_offset, 1, octet,
+ "Use the value indicated by the guaranteed bit rate for downlink in octet 7");
+ } else {
+ proto_tree_add_uint_format(tree, hf_nas_eps_egbr_dl, tvb, curr_offset, 1, octet,
+ "Guaranteed bit rate for downlink (extended) : %u %s",
calc_bitrate_ext(octet),
(octet > 0x4a) ? "Mbps" : "kbps");
}
curr_offset++;
+ if ((curr_offset - offset) >= len)
+ return(len);
+ /* Maximum bit rate for uplink (extended-2) octet 12 */
+ octet = tvb_get_guint8(tvb,curr_offset);
+ if (octet == 0) {
+ proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
+ "Use the value indicated by the maximum bit rate for uplink in octet 4 and octet 8");
+ } else {
+ proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet,
+ "Maximum bit rate for uplink (extended-2) : %u Mbps",
+ calc_bitrate_ext2(octet));
+ }
+ curr_offset++;
+ /* Maximum bit rate for downlink (extended-2) octet 13 */
+ octet = tvb_get_guint8(tvb,curr_offset);
+ if (octet == 0) {
+ proto_tree_add_uint_format(tree, hf_nas_eps_embr_dl, tvb, curr_offset, 1, octet,
+ "Use the value indicated by the maximum bit rate for downlink in octet 5 and octet 9");
+ } else {
+ proto_tree_add_uint_format(tree, hf_nas_eps_embr_dl, tvb, curr_offset, 1, octet,
+ "Maximum bit rate for downlink (extended-2) : %u Mbps",
+ calc_bitrate_ext2(octet));
+ }
+ curr_offset++;
+ /* Guaranteed bit rate for uplink (extended-2) octet 14 */
+ octet = tvb_get_guint8(tvb,curr_offset);
+ if (octet == 0) {
+ proto_tree_add_uint_format(tree, hf_nas_eps_egbr_ul, tvb, curr_offset, 1, octet,
+ "Use the value indicated by the guaranted bit rate for uplink in octet 6 and octet 10");
+ } else {
+ proto_tree_add_uint_format(tree, hf_nas_eps_egbr_ul, tvb, curr_offset, 1, octet,
+ "Guaranteed bit rate for uplink (extended-2) : %u Mbps",
+ calc_bitrate_ext2(octet));
+ }
+ curr_offset++;
+ /* Guaranted bit rate for downlink (extended-2) octet 15 */
+ octet = tvb_get_guint8(tvb,curr_offset);
+ if (octet == 0) {
+ proto_tree_add_uint_format(tree, hf_nas_eps_egbr_dl, tvb, curr_offset, 1, octet,
+ "Use the value indicated by the guaranteed bit rate for downlink in octet 7 and octet 11");
+ } else {
+ proto_tree_add_uint_format(tree, hf_nas_eps_egbr_dl, tvb, curr_offset, 1, octet,
+ "Guaranteed bit rate for downlink (extended-2) : %u Mbps",
+ calc_bitrate_ext2(octet));
+ }
return(len);
}
static const value_string nas_eps_esm_cause_vals[] = {
{ 0x08, "Operator Determined Barring"},
{ 0x1a, "Insufficient resources"},
- { 0x1b, "Unknown or missing APN"},
+ { 0x1b, "Missing or unknown APN"},
{ 0x1c, "Unknown PDN type"},
{ 0x1d, "User authentication failed"},
{ 0x1e, "Request rejected by Serving GW or PDN GW"},
{ 0x2b, "Invalid EPS bearer identity"},
{ 0x2c, "Semantic errors in packet filter(s)"},
{ 0x2d, "Syntactical errors in packet filter(s)"},
- { 0x2e, "EPS bearer context without TFT already activated"},
+ { 0x2e, "Unused"},
{ 0x2f, "PTI mismatch"},
{ 0x31, "Last PDN disconnection not allowed"},
{ 0x32, "PDN type IPv4 only allowed"},
{ 0x37, "Multiple PDN connections for a given APN not allowed"},
{ 0x38, "Collision with network initiated request"},
{ 0x3b, "Unsupported QCI value"},
+ { 0x3c, "Bearer handling not supported"},
+ { 0x41, "Maximum number of EPS bearers reached"},
+ { 0x42, "Requested APN not supported in current RAT and PLMN combination"},
{ 0x51, "Invalid PTI value"},
{ 0x5f, "Semantically incorrect message"},
{ 0x60, "Invalid mandatory information"},
{ 0x70, "APN restriction value incompatible with active EPS bearer context"},
{ 0, NULL }
};
+static value_string_ext nas_eps_esm_cause_vals_ext = VALUE_STRING_EXT_INIT(nas_eps_esm_cause_vals);
static guint16
-de_esm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_esm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
"Security protected ESM information transfer not required"
};
static guint16
-de_esm_inf_trf_flg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_esm_inf_trf_flg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
{ 0, NULL }
};
-
-
-static guint16
-de_esm_lnkd_eps_bearer_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
-{
- guint32 curr_offset;
-
- curr_offset = offset;
-
- proto_tree_add_item(tree, hf_nas_eps_esm_lnkd_eps_bearer_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
-
- return(len);
-}
-
/*
* 9.9.4.7 LLC service access point identifier
* See subclause 10.5.6.9 in 3GPP TS 24.008
};
static guint16
-de_esm_notif_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_esm_notif_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
* 9.9.4.9 PDN address
*/
static guint16
-de_esm_pdn_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_esm_pdn_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+ guint32 offset, guint len _U_,
+ gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
- guint8 pdn_type;
+ guint8 pdn_type;
curr_offset = offset;
proto_tree_add_item(tree, hf_nas_eps_esm_pdn_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
- switch(pdn_type){
+ switch (pdn_type) {
case 1:
/* IPv4 */
proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
/*
* 9.9.4.12 Quality of service
* See subclause 10.5.6.5 in 3GPP TS 24.008
+ * Coded inline 1/2 octet
*/
/*
* 9.9.4.13 Radio priority
* 9.9.4.14 Request type
* See subclause 10.5.6.17 in 3GPP TS 24.008
*/
+static const value_string nas_eps_esm_request_type_values[] = {
+ { 0x1, "initial request" },
+ { 0x2, "Handover" },
+ { 0x3, "Unused; shall be interpreted as initial request if received by the network" },
+ { 0x4, "emergency" },
+ { 0, NULL }
+ };
+
/*
* 9.9.4.15 Traffic flow aggregate description
* The Traffic flow aggregate description information element is encoded using the same format as the Traffic flow
* The coding of the TI flag, the TI value and the EXT bit is defined in 3GPP TS 24.007[20].
*/
-guint16 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len) = {
/* 9.9.3 EPS Mobility Management (EMM) information elements */
de_emm_add_upd_res, /* 9.9.3.0A Additional update result */
de_emm_add_upd_type, /* 9.9.3.0B Additional update type */
NULL, /* 9.9.3.14 EPS update type (Inline)*/
de_emm_esm_msg_cont, /* 9.9.3.15 ESM message conta */
NULL, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. (packet-gsm_a_gm.c)*/
+ NULL, /* 9.9.3.16A GPRS timer 2, See subclause 10.5.7.4 in 3GPP TS 24.008. (packet-gsm_a_gm.c)*/
+ NULL, /* 9.9.3.16B GPRS timer 3, See subclause 10.5.7.4a in 3GPP TS 24.008. (packet-gsm_a_gm.c)*/
NULL, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
de_emm_nas_imeisv_req, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
de_emm_nas_ksi_and_seq_no, /* 9.9.3.19 KSI and sequence number */
NULL, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6].(packet-gsm_a_gm.c) */
+ NULL, /* 9.9.3.20A MS network feature support, See subclause 10.5.1.15 in 3GPP TS 24.008.(packet-gsm_a_gm.c) */
de_emm_nas_key_set_id, /* 9.9.3.21 NAS key set identifier (Coded Inline) */
de_emm_nas_msg_cont, /* 9.9.3.22 NAS message container */
de_emm_nas_sec_alsgs, /* 9.9.3.23 NAS security algorithms */
de_emm_gen_msg_cont_type, /* 9.9.3.42 Generic message container type */
de_emm_gen_msg_cont, /* 9.9.3.43 Generic message container */
NULL, /* 9.9.3.44 Voice domain preference and UE's usage setting */
+ de_emm_guti_type, /* 9.9.3.45 GUTI type */
NULL, /* NONE */
};
/* 9.9.4 EPS Session Management (ESM) information elements */
-const value_string nas_esm_elem_strings[] = {
- { 0x00, "Access point name" }, /* 9.9.4.1 Access point name */
- { 0x00, "APN aggregate maximum bit rate" }, /* 9.9.4.2 APN aggregate maximum bit rate */
- { 0x00, "EPS quality of service" }, /* 9.9.4.3 EPS quality of service */
- { 0x00, "ESM cause" }, /* 9.9.4.4 ESM cause */
- { 0x00, "ESM information transfer flag" }, /* 9.9.4.5 ESM information transfer flag */
- { 0x00, "Linked EPS bearer identity" }, /* 9.9.4.6 Linked EPS bearer identity */
- { 0x00, "LLC service access point identifier" }, /* 9.9.4.7 LLC service access point identifier */
- { 0x00, "Notification indicator" }, /* 9.9.4.7a Notification indicator */
- { 0x00, "Packet flow identifier" }, /* 9.9.4.8 Packet flow identifier */
- { 0x00, "PDN address" }, /* 9.9.4.9 PDN address */
- { 0x00, "PDN type" }, /* 9.9.4.10 PDN type */
- { 0x00, "Protocol configuration options" }, /* 9.9.4.11 Protocol configuration options */
- { 0x00, "Quality of service" }, /* 9.9.4.12 Quality of service */
- { 0x00, "Radio priority" }, /* 9.9.4.13 Radio priority */
- { 0x00, "Request type" }, /* 9.9.4.14 Request type */
- { 0x00, "Traffic flow aggregate description" }, /* 9.9.4.15 Traffic flow aggregate description */
- { 0x00, "Traffic flow templat" }, /* 9.9.4.16 Traffic flow template */
- { 0x00, "Transaction identifier" }, /* 9.9.4.17 Transaction identifier */
- { 0, NULL }
-};
-
-
-#define NUM_NAS_ESM_ELEM (sizeof(nas_esm_elem_strings)/sizeof(value_string))
-gint ett_nas_eps_esm_elem[NUM_NAS_ESM_ELEM];
-
typedef enum
{
DE_ESM_APN, /* 9.9.4.1 Access point name */
DE_ESM_APN_AGR_MAX_BR, /* 9.9.4.2 APN aggregate maximum bit rate */
+ DE_ESM_CONNECTIVITY_TYPE, /* 9.9.4.2A Connectivity type */
DE_ESM_EPS_QOS, /* 9.9.4.3 EPS quality of service */
DE_ESM_CAUSE, /* 9.9.4.4 ESM cause */
DE_ESM_INF_TRF_FLG, /* 9.9.4.5 ESM information transfer flag */
DE_ESM_TID, /* 9.9.4.17 Transaction identifier */
DE_ESM_NONE /* NONE */
}
-
nas_esm_elem_idx_t;
-guint16 (*esm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
+static const value_string nas_esm_elem_strings[] = {
+ { DE_ESM_APN, "Access point name" }, /* 9.9.4.1 Access point name */
+ { DE_ESM_APN_AGR_MAX_BR, "APN aggregate maximum bit rate" }, /* 9.9.4.2 APN aggregate maximum bit rate */
+ { DE_ESM_CONNECTIVITY_TYPE, "Connectivity type" }, /* 9.9.4.2A Connectivity type */
+ { DE_ESM_EPS_QOS, "EPS quality of service" }, /* 9.9.4.3 EPS quality of service */
+ { DE_ESM_CAUSE, "ESM cause" }, /* 9.9.4.4 ESM cause */
+ { DE_ESM_INF_TRF_FLG, "ESM information transfer flag" }, /* 9.9.4.5 ESM information transfer flag */
+ { DE_ESM_LNKED_EPS_B_ID, "Linked EPS bearer identity" }, /* 9.9.4.6 Linked EPS bearer identity */
+ { DE_ESM_LLC_SAPI, "LLC service access point identifier" }, /* 9.9.4.7 LLC service access point identifier */
+ { DE_ESM_NOTIF_IND, "Notification indicator" }, /* 9.9.4.7a Notification indicator */
+ { DE_ESM_P_FLW_ID, "Packet flow identifier" }, /* 9.9.4.8 Packet flow identifier */
+ { DE_ESM_PDN_ADDR, "PDN address" }, /* 9.9.4.9 PDN address */
+ { DE_ESM_PDN_TYPE, "PDN type" }, /* 9.9.4.10 PDN type */
+ { DE_ESM_PROT_CONF_OPT, "Protocol configuration options" }, /* 9.9.4.11 Protocol configuration options */
+ { DE_ESM_QOS, "Quality of service" }, /* 9.9.4.12 Quality of service */
+ { DE_ESM_RA_PRI, "Radio priority" }, /* 9.9.4.13 Radio priority */
+ { DE_ESM_REQ_TYPE, "Request type" }, /* 9.9.4.14 Request type */
+ { DE_ESM_TRAF_FLOW_AGR_DESC, "Traffic flow aggregate description" },/* 9.9.4.15 Traffic flow aggregate description */
+ { DE_ESM_TRAF_FLOW_TEMPL, "Traffic flow template" }, /* 9.9.4.16 Traffic flow template */
+ { DE_ESM_TID, "Transaction identifier" }, /* 9.9.4.17 Transaction identifier */
+ { 0, NULL }
+};
+value_string_ext nas_esm_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_esm_elem_strings);
+
+#define NUM_NAS_ESM_ELEM (sizeof(nas_esm_elem_strings)/sizeof(value_string))
+gint ett_nas_eps_esm_elem[NUM_NAS_ESM_ELEM];
+
+guint16 (*esm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len) = {
NULL, /* 9.9.4.1 Access point name */
de_esm_apn_aggr_max_br, /* 9.9.4.2 APN aggregate maximum bit rate */
+ NULL, /* 9.9.4.2A Connectivity type */
de_esm_qos, /* 9.9.4.3 EPS quality of service */
de_esm_cause, /* 9.9.4.4 ESM cause */
de_esm_inf_trf_flg, /* 9.9.4.5 ESM information transfer flag */
- de_esm_lnkd_eps_bearer_id, /* 9.9.4.6 Linked EPS bearer identity */
+ NULL, /* 9.9.4.6 Linked EPS bearer identity */
NULL, /* 9.9.4.7 LLC service access point identifier */
de_esm_notif_ind, /* 9.9.4.7a Notification indicator */
NULL, /* 9.9.4.8 Packet flow identifier */
*/
static void
-nas_emm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_EPS_attach_result, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
- bit_offset+=3;
+ /*bit_offset+=3;*/
/* Fix up the lengths */
curr_len--;
curr_offset++;
ELEM_OPT_TLV(0x64, NAS_PDU_TYPE_EMM, DE_EMM_EPS_NET_FEATURE_SUP, NULL);
/* F- Additional update result Additional update result 9.9.3.0A O TV 1 */
ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_RES, NULL );
+ /* 5E T3412 extended value GPRS timer 3 9.9.3.16B O TLV 3 */
+ ELEM_OPT_TLV(0x5E, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3412 extended value");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
* 8.2.2 Attach complete
*/
static void
-nas_emm_attach_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_attach_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* ESM message container ESM message container 9.9.3.15 M LV-E 2-n */
ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
* 8.2.3 Attach reject
*/
static void
-nas_emm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* * EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
/* 78 ESM message container ESM message container 9.9.3.15 O TLV-E 4-n */
ELEM_OPT_TLV_E(0x78, NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
+ /* 5F T3346 value GPRS timer 2 9.9.3.16A O TLV 3 */
+ ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
+ /* 16 T3402 value GPRS timer 2 9.9.3.16A O TLV 3 */
+ ELEM_OPT_TLV(0x16, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3402 value");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
* 8.2.4 Attach request
*/
static void
-nas_emm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_eps_att_type, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
- bit_offset+=3;
+ /*bit_offset+=3;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
/* Old GUTI or IMSI EPS mobile identity 9.9.3.12 M LV 5-12 */
- ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Old GUTI or IMSI");
+ ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, NULL);
/* UE network capability UE network capability 9.9.3.34 M LV 3-14 */
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
/* ESM message container ESM message container 9.9.3.15 M LV-E 2-n */
ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_TYPE, NULL );
/* 5D Voice domain preference and UE's usage setting Voice domain preference and UE's usage setting 9.9.3.44 O TLV 3 */
ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
+ /* D- Device properties Device properties 9.9.2.0A O TV 1 */
+ ELEM_OPT_TV_SHORT(0xD0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
+ /* E- Old GUTI type GUTI type 9.9.3.45 O TV 1 */
+ ELEM_OPT_TV_SHORT(0xE0 , NAS_PDU_TYPE_EMM, DE_EMM_GUTI_TYPE, " - Old GUTI type");
+ /* C- MS network feature support MS network feature support 9.9.3.20A 0 TV 1 */
+ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_COMMON, DE_MS_NET_FEAT_SUP, NULL);
+ /* 10 TMSI based NRI container Network resource identifier container 9.9.3.24A 0 TLV 4 */
+ ELEM_OPT_TLV(0x10, GSM_A_PDU_TYPE_GM, DE_NET_RES_ID_CONT, " - TMSI based NRI container");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
* 8.2.5 Authentication failure
*/
static void
-nas_emm_attach_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_auth_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
*/
static void
-nas_emm_auth_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_auth_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
bit_offset = curr_offset<<3;
/* H1 */
* NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2
*/
de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME");
- bit_offset+=4;
+ /*bit_offset+=4;*/
/* Fix the lengths */
curr_len--;
* 8.2.8 Authentication response
*/
static void
-nas_emm_auth_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_auth_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/*
* Authentication response parameter 9.9.3.4 M LV 5-17
*/
static void
-nas_emm_cs_serv_not(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_cs_serv_not(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
-
- consumed = 0;
+ curr_len = len;
/* Paging identity Paging identity 9.9.3.25A M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_PAGING_ID, NULL);
/* 60 CLI CLI 9.9.3.38 O TLV 3-12 */
- ELEM_OPT_TLV(0x60, GSM_A_PDU_TYPE_DTAP, DE_CLD_PARTY_BCD_NUM, " - CLI");
+ ELEM_OPT_TLV(0x60, GSM_A_PDU_TYPE_DTAP, DE_CLG_PARTY_BCD_NUM, " - CLI");
/* 61 SS Code SS Code 9.9.3.39 O TV 2 */
ELEM_OPT_TV(0x61, NAS_PDU_TYPE_EMM, DE_EMM_SS_CODE, NULL);
/* 62 LCS indicator LCS indicator 9.9.3.40 O TV 2 */
*/
static void
-nas_emm_detach_req_UL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_detach_req_UL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset,bit_offset;
guint32 consumed;
guint curr_len;
+ guint64 switch_off;
+ guint64 detach_type;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
- proto_tree_add_text(tree, tvb, curr_offset, len,"Up link");
+ proto_tree_add_text(tree, tvb, curr_offset, len, "Uplink");
/* NAS key set identifier NAS key set identifier 9.9.3.21 M V 1/2 */
bit_offset = curr_offset<<3;
de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
bit_offset+=4;
/* Detach type Detach type 9.9.3.6 M V 1/2 */
- proto_tree_add_bits_item(tree, hf_nas_eps_emm_switch_off, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_switch_off, tvb, bit_offset, 1, &switch_off, ENC_BIG_ENDIAN);
bit_offset++;
- proto_tree_add_bits_item(tree, hf_nas_eps_emm_detach_type_UL, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
- bit_offset+=3;
+ proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_detach_type_UL, tvb, bit_offset, 3, &detach_type, ENC_BIG_ENDIAN);
+ /* bit_offset+=3;*/
+ /* Show detach reason in Info column. TODO: expert info ? */
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s%s)",
+ val_to_str_const((guint32)detach_type, nas_eps_emm_type_of_detach_UL_vals, "Unknown"),
+ (switch_off==0) ? "" : " / switch-off");
/* Fix the lengths */
curr_len--;
curr_offset++;
/* GUTI or IMSI EPS mobile identity 9.9.3.12 M LV 5-12 */
- ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI or IMSI");
-
- return;
+ ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, NULL);
}
/*
* 8.2.11.2 Detach request (UE terminated detach)
*/
static void
-nas_emm_detach_req_DL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_detach_req_DL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
+ guint64 detach_type;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
- proto_tree_add_text(tree, tvb, curr_offset, len,"Down link");
+ proto_tree_add_text(tree, tvb, curr_offset, len, "Downlink");
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
/* In the network to UE direction bit 4 is spare. The network shall set this bit to zero. */
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
- proto_tree_add_bits_item(tree, hf_nas_eps_emm_detach_type_DL, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
- bit_offset+=3;
+ proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_detach_type_DL, tvb, bit_offset, 3, &detach_type, ENC_BIG_ENDIAN);
+ /*bit_offset+=3;*/
+ /* Show detach reason in Info column. TODO: expert info ? */
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
+ val_to_str_const((guint32)detach_type, nas_eps_emm_type_of_detach_DL_vals, "Unknown"));
/* Fix the lengths */
curr_len--;
curr_offset++;
/* No more mandatory elements */
- if (curr_len==0)
+ if (curr_len == 0)
return;
/* EMM cause EMM cause 9.9.3.9 O TV 2 */
ELEM_OPT_TV(0x53, NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0);
-
- return;
}
static void
nas_emm_detach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
- guint32 curr_offset;
- /*guint curr_len;*/
-
- curr_offset = offset;
- /*curr_len = len;*/
-
- if (pinfo){
- if(pinfo->link_dir==P2P_DIR_UL){
- nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
- return;
- }else if(pinfo->link_dir==P2P_DIR_DL){
- nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
- return;
- }
+ if (pinfo->link_dir == P2P_DIR_UL) {
+ nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
+ return;
+ }else if (pinfo->link_dir == P2P_DIR_DL) {
+ nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
+ return;
}
- proto_tree_add_text(tree, tvb, curr_offset, len,"UL/DL not known, can't properly dissect");
- proto_tree_add_text(tree, tvb, curr_offset, len,"Trying to dissect as UE terminated detach");
- nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
- proto_tree_add_text(tree, tvb, curr_offset, len,"Trying to dissect as UE originating detach");
- nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
-
- return;
+ if (len >= 8) {
+ nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
+ } else {
+ nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
+ }
}
/*
* 8.2.12 Downlink NAS Transport
*/
static void
-nas_emm_dl_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_dl_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
* 8.2.13 EMM information
*/
static void
-nas_emm_emm_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_emm_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* 43 Full name for network Network name 9.9.3.24 O TLV 3-? */
ELEM_OPT_TLV(0x43, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full name for network");
* 8.2.14 EMM status
*/
static void
-nas_emm_emm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_emm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
* 8.2.15 Extended service request
*/
static void
-nas_emm_ext_serv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_ext_serv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset,bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
bit_offset = curr_offset<<3;
bit_offset+=4;
/* Service type Service type 9.9.3.27 M V 1/2 Service type*/
proto_tree_add_bits_item(tree, hf_nas_eps_service_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
- bit_offset+=4;
+ /*bit_offset+=4;*/
/* Fix up the lengths */
curr_len--;
curr_offset++;
ELEM_OPT_TV_SHORT(0xb0, NAS_PDU_TYPE_EMM, DE_EMM_CSFB_RESP, NULL);
/* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
+ /* D- Device properties Device properties 9.9.2.0A O TV 1 */
+ ELEM_OPT_TV_SHORT(0xD0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
* 8.2.16 GUTI reallocation command
*/
static void
-nas_emm_guti_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_guti_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* GUTI EPS mobile identity 9.9.3.12 M LV 12 */
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI");
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
bit_offset=curr_offset<<3;
/* Identity type Identity type 2 9.9.3.17 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_emm_id_type2, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
- bit_offset+=4;
+ /*bit_offset+=4;*/
/*consumed = 1;*/
* 8.2.19 Identity response
*/
static void
-nas_emm_id_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_id_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* Mobile identity Mobile identity 9.9.2.3 M LV 4-10 */
ELEM_MAND_LV(NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, NULL);
* 8.2.20 Security mode command
*/
static void
-nas_emm_sec_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_sec_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* Selected NAS security algorithms NAS security algorithms 9.9.3.23 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_NAS_SEC_ALGS, " - Selected NAS security algorithms");
bit_offset+=4;
/* NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2 */
de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME");
- bit_offset+=4;
+ /*bit_offset+=4;*/
/* Fix up the lengths */
curr_len--;
/* C- IMEISV request IMEISV request 9.9.3.18 O TV 1 */
ELEM_OPT_TV_SHORT( 0xC0 , NAS_PDU_TYPE_EMM, DE_EMM_IMEISV_REQ , NULL );
/* 55 Replayed NonceUE Nonce 9.9.3.25 O TV 5 */
- ELEM_OPT_TV(0x55, GSM_A_PDU_TYPE_GM, DE_EMM_NONCE, " - Replayed NonceUE");
+ ELEM_OPT_TV(0x55, NAS_PDU_TYPE_EMM, DE_EMM_NONCE, " - Replayed NonceUE");
/* 56 NonceMME Nonce 9.9.3.25 O TV 5 */
- ELEM_OPT_TV(0x56, GSM_A_PDU_TYPE_GM, DE_EMM_NONCE, " - NonceMME");
+ ELEM_OPT_TV(0x56, NAS_PDU_TYPE_EMM, DE_EMM_NONCE, " - NonceMME");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
* 8.2.21 Security mode complete
*/
static void
-nas_emm_sec_mode_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_sec_mode_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
if (curr_len == 0)
return;
* 8.2.22 Security mode reject
*/
static void
-nas_emm_sec_mode_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_sec_mode_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
*/
#if 0
static int
-nas_emm_sec_prot_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_sec_prot_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint curr_len;
guint8 security_header_type;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* Security header type Security header type 9.3.1 M V 1/2 */
security_header_type = tvb_get_guint8(tvb,offset)>>4;
proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, ENC_BIG_ENDIAN);
offset++;
/* Message authentication code Message authentication code 9.5 M V 4 */
- if (security_header_type !=0){
+ if (security_header_type != 0) {
/* Message authentication code */
proto_tree_add_item(tree, hf_nas_eps_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
offset+=4;
- if ((security_header_type==2)||(security_header_type==4)){
+ if ((security_header_type == 2)||(security_header_type == 4)) {
/* Integrity protected and ciphered = 2, Integrity protected and ciphered with new EPS security context = 4 */
proto_tree_add_text(tree, tvb, offset, len-5,"Ciphered message");
return offset;
}
- }else{
+ } else {
proto_tree_add_text(tree, tvb, offset, len,"Not a security protected message");
return offset;
}
* 8.2.24 Service reject
*/
static void
-nas_emm_serv_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_serv_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
-
/* 5B T3442 value GPRS timer 9.9.3.16 C TV 2 */
ELEM_OPT_TV(0x5b, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3442 value");
+ /* 5F T3346 value GPRS timer 2 9.9.3.16A O TLV 3 */
+ ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
* Message authentication code (short) Short MAC 9.9.3.28 M V 2
*/
static void
-nas_emm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* KSI and sequence number 9.9.3.19 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_KSI_AND_SEQ_NO, NULL);
* 8.2.26 Tracking area update accept
*/
static void
-nas_emm_trac_area_upd_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_trac_area_upd_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_eps_update_result_value, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
- bit_offset+=3;
+ /*bit_offset+=3;*/
/* Fix up the lengths */
curr_len--;
curr_offset++;
/* No more mandatory elements */
- if (curr_len==0)
+ if (curr_len == 0)
return;
/* 5A T3412 value GPRS timer 9.9.3.16 O TV 2 */
ELEM_OPT_TV(0x5a, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3412 value");
ELEM_OPT_TLV(0x64, NAS_PDU_TYPE_EMM, DE_EMM_EPS_NET_FEATURE_SUP, NULL);
/* F- Additional update result Additional update result 9.9.3.0A O TV 1 */
ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_RES, NULL );
+ /* 5E T3412 extended value GPRS timer 3 9.9.3.16B O TLV 3 */
+ ELEM_OPT_TLV(0x5E, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3412 extended value");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
* 8.2.28 Tracking area update reject
*/
static void
-nas_emm_trac_area_upd_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_trac_area_upd_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
+ /* 5F T3346 value GPRS timer 2 9.9.3.16A O TLV 3 */
+ ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
* 8.2.29 Tracking area update request
*/
static void
-nas_emm_trac_area_upd_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_trac_area_upd_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_active_flg, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_eps_update_type_value, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
- bit_offset+=3;
+ /*bit_offset+=3;*/
/* Fix the lengths */
curr_len--;
/* 50 Additional GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Additional GUTI");
/* 55 NonceUE Nonce 9.9.3.25 O TV 5 */
- ELEM_OPT_TV(0x55, GSM_A_PDU_TYPE_GM, DE_EMM_NONCE, " - NonceUE");
+ ELEM_OPT_TV(0x55, NAS_PDU_TYPE_EMM, DE_EMM_NONCE, " - NonceUE");
/* 58 UE network capability UE network capability 9.9.3.34 O TLV 4-15 */
ELEM_OPT_TLV(0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
/* 52 Last visited registered TAI Tracking area identity 9.9.3.32 O TV 6 */
ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_TYPE, NULL );
/* 5D Voice domain preference and UE's usage setting Voice domain preference and UE's usage setting 9.9.3.44 O TLV 3 */
ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
+ /* E- Old GUTI type GUTI type 9.9.3.45 O TV 1 */
+ ELEM_OPT_TV_SHORT(0xE0 , NAS_PDU_TYPE_EMM, DE_EMM_GUTI_TYPE, " - Old GUTI type");
+ /* D- Device properties Device properties 9.9.2.0A O TV 1 */
+ ELEM_OPT_TV_SHORT(0xD0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
+ /* C- MS network feature support MS network feature support 9.9.3.20A 0 TV 1 */
+ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_COMMON, DE_MS_NET_FEAT_SUP, NULL);
+ /* 10 TMSI based NRI container Network resource identifier container 9.9.3.24A 0 TLV 4 */
+ ELEM_OPT_TLV(0x10, GSM_A_PDU_TYPE_GM, DE_NET_RES_ID_CONT, " - TMSI based NRI container");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
* 8.2.30 Uplink NAS Transport
*/
static void
-nas_emm_ul_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_ul_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
* 8.2.31 Downlink generic NAS transport
*/
static void
-nas_emm_dl_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_dl_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
* 8.2.32 Uplink generic NAS transport
*/
static void
-nas_emm_ul_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_ul_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
guint32 consumed;
guint curr_len;
- if(len==0)
+ if (len == 0)
return;
curr_offset = offset;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* This message is sent by UE to the network to reject activation of a dedicated EPS bearer context */
pinfo->link_dir = P2P_DIR_UL;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* This message is sent by the network to the UE to request activation of a dedicated EPS bearer context... */
pinfo->link_dir = P2P_DIR_DL;
bit_offset+=4;
/* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
- bit_offset+=4;
+ /*bit_offset+=4;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
- if(len==0)
+ if (len == 0)
return;
/* This message is sent by the UE to the network to acknowledge activation of a default EPS bearer context */
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* This message is sent by UE to the network to reject activation of a default EPS bearer context. */
pinfo->link_dir = P2P_DIR_UL;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* This message is sent by the network to the UE to request activation of a default EPS bearer context. */
pinfo->link_dir = P2P_DIR_DL;
ELEM_OPT_TV( 0x58 , NAS_PDU_TYPE_ESM, DE_ESM_CAUSE , NULL );
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
+ /* B- Connectivity type Connectivity type 9.9.4.2A 0 TV 1 */
+ ELEM_OPT_TV_SHORT(0xB0 , GSM_A_PDU_TYPE_GM, DE_SM_CONNECTIVITY_TYPE, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* This message is sent by the network to the UE to reject the allocation of a dedicated bearer resource. */
pinfo->link_dir = P2P_DIR_DL;
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
+ /* 37 T3396 value GPRS timer 3 9.9.3.16B O TLV 3 */
+ ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* This message is sent by the UE to the network to request the allocation of a dedicated bearer resource. */
pinfo->link_dir = P2P_DIR_UL;
bit_offset+=4;
/* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
- bit_offset+=4;
+ /*bit_offset+=4;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS, " - Required traffic flow QoS");
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
+ /* C- Device properties Device properties 9.9.2.0A O TV 1 */
+ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* This message is sent by the network to the UE to reject the modification of a dedicated bearer resource. */
pinfo->link_dir = P2P_DIR_DL;
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
+ /* 37 T3396 value GPRS timer 3 9.9.3.16B O TLV 3 */
+ ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* This message is sent by the UE to the network to request the modification of a dedicated bearer resource. */
pinfo->link_dir = P2P_DIR_UL;
bit_offset+=4;
/* EPS bearer identity for packet filter Linked EPS bearer identity 9.9.4.6 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
- bit_offset+=4;
+ /*bit_offset+=4;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
ELEM_OPT_TV( 0x58 , NAS_PDU_TYPE_ESM, DE_ESM_CAUSE , NULL );
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
+ /* C- Device properties Device properties 9.9.2.0A O TV 1 */
+ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
- if(len==0)
+ if (len == 0)
return;
/* This message is sent by the UE to acknowledge deactivation of the EPS bearer context... */
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* This message is sent by the network to request deactivation of an active EPS bearer context. */
pinfo->link_dir = P2P_DIR_DL;
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
+ /* 37 T3396 value GPRS timer 3 9.9.3.16B O TLV 3 */
+ ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
- if(len==0)
+ if (len == 0)
return;
/* This message is sent by the UE to the network in response to an ESM INFORMATION REQUEST... */
* 8.3.15 ESM status
*/
static void
-nas_esm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_esm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* ESM cause ESM cause 9.9.4.4 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
- if(len==0)
+ if (len == 0)
return;
/* This message is sent by the UE to the network to acknowledge the modification of an active EPS bearer context. */
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* This message is sent by the UE or the network to reject a modification of an active EPS bearer context. */
pinfo->link_dir = P2P_DIR_UL;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
- if(len==0)
+ if (len == 0)
return;
/*This message is sent by the network to inform the UE about events which are relevant for the upper layer... */
* 8.3.18A Notification
*/
static void
-nas_esm_notification(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_esm_notification(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* Notification indicator Notification indicator 9.9.4.7A M LV 2 */
ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_NOTIF_IND, NULL);
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/*This message is sent by the network to the UE to reject establishment of a PDN connection. */
pinfo->link_dir = P2P_DIR_DL;
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
+ /* 37 T3396 value GPRS timer 3 9.9.3.16B O TLV 3 */
+ ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
/*
* 8.3.20 PDN connectivity request
*/
-static void
+void
nas_esm_pdn_con_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
+ int bit_offset;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/*This message is sent by the UE to the network to initiate establishment of a PDN connection. */
pinfo->link_dir = P2P_DIR_UL;
/* PDN type PDN type 9.9.4.10 M V 1/2 */
- proto_tree_add_bits_item(tree, hf_nas_eps_esm_pdn_type, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
+ bit_offset = curr_offset<<3;
+ proto_tree_add_bits_item(tree, hf_nas_eps_esm_pdn_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
+ bit_offset+=4;
/* Request type 9.9.4.14 M V 1/2 */
- ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_REQ_TYPE, NULL);
+ proto_tree_add_bits_item(tree, hf_nas_eps_esm_request_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
+ /*bit_offset+=4;*/
+ /* Fix the lengths */
+ curr_len--;
+ curr_offset++;
+ if (curr_len == 0)
+ return;
/* D- ESM information transfer flag 9.9.4.5 O TV 1 */
ELEM_OPT_TV_SHORT( 0xd0 , NAS_PDU_TYPE_ESM, DE_ESM_INF_TRF_FLG , NULL );
ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
/* 27 Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
+ /* C- Device properties Device properties 9.9.2.0A O TV 1 */
+ ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/*This message is sent by the UE to the network to initiate establishment of a PDN connection. */
pinfo->link_dir = P2P_DIR_UL;
guint curr_len;
curr_offset = offset;
- curr_len = len;
+ curr_len = len;
/* This message is sent by the network to the UE to reject release of a PDN connection. */
pinfo->link_dir = P2P_DIR_DL;
bit_offset+=4;
/* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
- bit_offset+=4;
+ /*bit_offset+=4;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
#define NUM_NAS_MSG_ESM (sizeof(nas_msg_esm_strings)/sizeof(value_string))
static gint ett_nas_msg_esm[NUM_NAS_MSG_ESM];
-static void (*nas_msg_esm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
+static void (*nas_msg_esm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
nas_esm_act_def_eps_bearer_ctx_req, /* Activate default EPS bearer context request*/
nas_esm_act_def_eps_bearer_ctx_acc, /* Activate default EPS bearer context accept*/
nas_esm_act_def_eps_bearer_ctx_rej, /* Activate default EPS bearer context reject*/
{
gint idx;
- *msg_str = match_strval_idx((guint32) (oct & 0xff), nas_msg_esm_strings, &idx);
- *ett_tree = ett_nas_msg_esm[idx];
- *hf_idx = hf_nas_eps_msg_esm_type;
- *msg_fcn_p = nas_msg_esm_fcn[idx];
+ *msg_str = try_val_to_str_idx_ext((guint32) (oct & 0xff), &nas_msg_esm_strings_ext, &idx);
+ *hf_idx = hf_nas_eps_msg_esm_type;
+ if (*msg_str != NULL) {
+ *ett_tree = ett_nas_msg_esm[idx];
+ *msg_fcn_p = nas_msg_esm_fcn[idx];
+ }
return;
}
#define NUM_NAS_MSG_EMM (sizeof(nas_msg_emm_strings)/sizeof(value_string))
static gint ett_nas_msg_emm[NUM_NAS_MSG_EMM];
-static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
+static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
nas_emm_attach_req, /* Attach request */
nas_emm_attach_acc, /* Attach accept */
nas_emm_attach_comp, /* Attach complete */
nas_emm_auth_req, /* Authentication request */
nas_emm_auth_resp, /* Authentication response */
NULL, /* Authentication reject (No IE:s)*/
- nas_emm_attach_fail, /* Authentication failure */
nas_emm_id_req, /* Identity request */
nas_emm_id_res, /* Identity response */
+ nas_emm_auth_fail, /* Authentication failure */
nas_emm_sec_mode_cmd, /* Security mode command */
nas_emm_sec_mode_comp, /* Security mode complete */
nas_emm_sec_mode_rej, /* Security mode reject */
{
gint idx;
- *msg_str = match_strval_idx((guint32) (oct & 0xff), nas_msg_emm_strings, &idx);
- *ett_tree = ett_nas_msg_emm[idx];
- *hf_idx = hf_nas_eps_msg_emm_type;
- *msg_fcn_p = nas_msg_emm_fcn[idx];
+ *msg_str = try_val_to_str_idx_ext((guint32) (oct & 0xff), &nas_msg_emm_strings_ext, &idx);
+ *hf_idx = hf_nas_eps_msg_emm_type;
+ if (*msg_str != NULL) {
+ *ett_tree = ett_nas_msg_emm[idx];
+ *msg_fcn_p = nas_msg_emm_fcn[idx];
+ }
return;
}
+static const value_string nas_eps_esm_bearer_id_vals[] = {
+ { 0x0, "No EPS bearer identity assigned"},
+ { 0x1, "Reserved"},
+ { 0x2, "Reserved"},
+ { 0x3, "Reserved"},
+ { 0x4, "Reserved"},
+ { 0x5, "EPS bearer identity value 5"},
+ { 0x6, "EPS bearer identity value 6"},
+ { 0x7, "EPS bearer identity value 7"},
+ { 0x8, "EPS bearer identity value 8"},
+ { 0x9, "EPS bearer identity value 9"},
+ { 0xa, "EPS bearer identity value 10"},
+ { 0xb, "EPS bearer identity value 11"},
+ { 0xc, "EPS bearer identity value 12"},
+ { 0xd, "EPS bearer identity value 13"},
+ { 0xe, "EPS bearer identity value 14"},
+ { 0xf, "EPS bearer identity value 15"},
+ { 0, NULL }
+};
+
/*
* EPS session management messages.
* A plain NAS message is pased to this function
static void
disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- const gchar *msg_str;
- guint32 len;
- gint ett_tree;
- int hf_idx;
- void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len);
- guint8 oct;
+ const gchar *msg_str;
+ guint32 len;
+ gint ett_tree;
+ int hf_idx;
+ void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
+ guint8 oct;
len = tvb_length(tvb);
/*
get_nas_esm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
- if(msg_str){
+ if (msg_str) {
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, msg_str);
- }else{
+ } else {
proto_tree_add_text(tree, tvb, offset, 1,"Unknown message 0x%x",oct);
return;
}
static void
dissect_nas_eps_emm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean second_header)
{
- const gchar *msg_str;
- guint32 len;
- gint ett_tree;
- int hf_idx;
- void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len);
- guint8 security_header_type, oct;
+ const gchar *msg_str;
+ guint32 len;
+ gint ett_tree;
+ int hf_idx;
+ void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
+ guint8 security_header_type, oct;
len = tvb_length(tvb);
/* 9.3.1 Security header type */
- if(second_header){
+ if (second_header) {
security_header_type = tvb_get_guint8(tvb,offset)>>4;
proto_tree_add_item(tree, hf_nas_eps_security_header_type, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- if (security_header_type !=0){
+ if (security_header_type != 0) {
/* Message authentication code */
proto_tree_add_item(tree, hf_nas_eps_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
offset+=4;
/* Sequence number */
proto_tree_add_item(tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- if ((security_header_type==2)||(security_header_type==4))
+ if ((security_header_type == 2)||(security_header_type == 4))
/* Integrity protected and ciphered = 2, Integrity protected and ciphered with new EPS security context = 4 */
return;
proto_tree_add_item(tree, hf_nas_eps_security_header_type, tvb, offset, 1, ENC_BIG_ENDIAN);
get_nas_emm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
- if(msg_str){
+ if (msg_str) {
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, msg_str);
- }else{
+ } else {
proto_tree_add_text(tree, tvb, offset, 1,"Unknown message 0x%x",oct);
return;
}
}
}
+
+static void
+dissect_nas_eps_plain(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ proto_item *item;
+ proto_tree *nas_eps_tree;
+ guint8 pd;
+ int offset = 0;
+
+ /* make entry in the Protocol column on summary display */
+ col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NAS-EPS");
+
+ item = proto_tree_add_item(tree, proto_nas_eps, tvb, 0, -1, ENC_NA);
+ nas_eps_tree = proto_item_add_subtree(item, ett_nas_eps);
+
+ /* SERVICE REQUEST (security header type equal to 12 or greater) is not a plain NAS message */
+ pd = tvb_get_guint8(tvb,offset);
+ if (((pd&0x0f) == 0x07) && ((pd&0xf0) >= 0xc0)) {
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Service request");
+ /* Security header type Security header type 9.3.1 M V 1/2 */
+ proto_tree_add_item(nas_eps_tree, hf_nas_eps_security_header_type, tvb, 0, 1, ENC_BIG_ENDIAN);
+ /* Protocol discriminator Protocol discriminator 9.2 M V 1/2 */
+ proto_tree_add_item(nas_eps_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, ENC_BIG_ENDIAN);
+ offset++;
+ nas_emm_service_req(tvb, nas_eps_tree, pinfo, offset, tvb_length(tvb)-offset);
+ return;
+ }
+
+ pd &= 0x0f;
+ switch (pd) {
+ case 2:
+ /* EPS session management messages.
+ * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
+ */
+ disect_nas_eps_esm_msg(tvb, pinfo, nas_eps_tree, offset);
+ break;
+ case 7:
+ /* EPS mobility management messages.
+ * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
+ */
+ dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, TRUE);
+ break;
+ case 15:
+ /* Special conformance testing functions for User Equipment messages.
+ * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
+ */
+ if (gsm_a_dtap_handle) {
+ tvbuff_t *new_tvb = tvb_new_subset_remaining(tvb, offset);
+ call_dissector(gsm_a_dtap_handle, new_tvb,pinfo, nas_eps_tree);
+ break;
+ } /* else fall through default */
+ default:
+ proto_tree_add_text(nas_eps_tree, tvb, offset, -1, "Not a NAS EPS PD %u(%s)",
+ pd,
+ val_to_str_const(pd, protocol_discriminator_vals, "unknown"));
+ break;
+ }
+
+}
+
/* TS 24.301 8.2.1
* 9 General message format and information elements coding
* 9.1 Overview
static void
dissect_nas_eps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_item *item;
- proto_tree *nas_eps_tree;
+ proto_item *item;
+ proto_tree *nas_eps_tree;
guint8 pd, security_header_type;
- int offset = 0;
+ int offset = 0;
guint32 len;
guint32 msg_auth_code;
- /* Save pinfo */
- gpinfo = pinfo;
len = tvb_length(tvb);
+ /* The protected NAS message header is 6 octets long, and the NAS message header is at least 2 octets long. */
+ /* If the length of the tvbuffer is less than 8 octets, we can safely conclude the message is not protected. */
+ if (len < 8) {
+ dissect_nas_eps_plain(tvb, pinfo, tree);
+ return;
+ }
+
+ if (g_nas_eps_dissect_plain) {
+ dissect_nas_eps_plain(tvb, pinfo, tree);
+ return;
+ }
/* make entry in the Protocol column on summary display */
- col_append_str(pinfo->cinfo, COL_PROTOCOL, "/NAS-EPS");
+ col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NAS-EPS");
item = proto_tree_add_item(tree, proto_nas_eps, tvb, 0, -1, ENC_NA);
nas_eps_tree = proto_item_add_subtree(item, ett_nas_eps);
pd = tvb_get_guint8(tvb,offset)&0x0f;
offset++;
/* Message authentication code Message authentication code 9.5 M V 4 */
- if (security_header_type == 0){
- if(pd==7){
+ if (security_header_type == 0) {
+ if (pd == 7) {
/* Plain EPS mobility management messages. */
- dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, ENC_BIG_ENDIAN);
+ dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, FALSE);
return;
- }else{
- proto_tree_add_text(tree, tvb, offset, len, "All ESM messages should be integrity protected");
+ } else {
+ proto_tree_add_text(nas_eps_tree, tvb, offset, len, "All ESM / Test Procedures messages should be integrity protected");
return;
}
- }else{
- /* SERVICE REQUEST (12) is not a plain NAS message treat separately */
- if (security_header_type == 12){
- col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "SERVICE REQUEST");
+ } else {
+ /* SERVICE REQUEST (12 or greater) is not a plain NAS message treat separately */
+ if (security_header_type >= 12) {
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Service request");
nas_emm_service_req(tvb, nas_eps_tree, pinfo, offset, len-offset);
return;
}
proto_tree_add_item(nas_eps_tree, hf_nas_eps_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
msg_auth_code = tvb_get_ntohl(tvb, offset);
offset+=4;
- if ((security_header_type==2)||(security_header_type==4)){
+ if ((security_header_type == 2)||(security_header_type == 4)) {
/* Possible ciphered message */
- if(msg_auth_code!=0){
+ if (msg_auth_code != 0) {
/* Sequence number Sequence number 9.6 M V 1 */
proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Integrity protected and ciphered = 2, Integrity protected and ciphered with new EPS security context = 4 */
- pd = tvb_get_guint8(tvb,offset)&0x0f;
-#if 0
- /* Does not work see Bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6348
- * 9.2 Protocol discriminator
- * :
- * The protocol discriminator in the header (see 3GPP TS 24.007 [12]) of a
- * security protected NAS message is encoded as "EPS mobility management messages".
- * XXX Should we check for PD == 7?
- */
+ /* Read security_header_type / EPS bearer id AND pd */
+ pd = tvb_get_guint8(tvb,offset);
/* If pd is in plaintext this message probably isn't ciphered */
- if((pd!=7)&&(pd!=2)&&(pd!=15)){
+ if ((pd != 7) && (pd != 15) &&
+ (((pd&0x0f) != 2) || (((pd&0x0f) == 2) && ((pd&0xf0) > 0) && ((pd&0xf0) < 0x50)))) {
proto_tree_add_text(nas_eps_tree, tvb, offset, len-6,"Ciphered message");
return;
}
-#else
- proto_tree_add_text(nas_eps_tree, tvb, offset, len-6,"Ciphered message");
- return;
-#endif
- }else{
+ } else {
/* msg_auth_code == 0, probably not ciphered */
/* Sequence number Sequence number 9.6 M V 1 */
proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
}
- }else{
+ } else {
/* Sequence number Sequence number 9.6 M V 1 */
proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* NAS message NAS message 9.7 M V 1-n */
pd = tvb_get_guint8(tvb,offset)&0x0f;
- switch (pd){
+ switch (pd) {
case 2:
/* EPS session management messages.
* Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
/* Special conformance testing functions for User Equipment messages.
* Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
*/
- if (gsm_a_dtap_handle){
- tvbuff_t *new_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ if (gsm_a_dtap_handle) {
+ tvbuff_t *new_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, nas_eps_tree);
break;
} /* else fall through default */
default:
- proto_tree_add_text(nas_eps_tree, tvb, offset, -1, "Not a NAS EPS PD %u(%s)",pd,val_to_str(pd, protocol_discriminator_vals,"unknown"));
+ proto_tree_add_text(nas_eps_tree, tvb, offset, -1, "Not a NAS EPS PD %u(%s)",
+ pd,
+ val_to_str_const(pd, protocol_discriminator_vals, "unknown"));
break;
}
}
-static void
-dissect_nas_eps_plain(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+void
+proto_register_nas_eps(void)
{
- proto_item *item;
- proto_tree *nas_eps_tree;
- guint8 pd;
- int offset = 0;
-
- /* Save pinfo */
- gpinfo = pinfo;
-
- /* make entry in the Protocol column on summary display */
- col_append_str(pinfo->cinfo, COL_PROTOCOL, "/NAS-EPS");
-
- item = proto_tree_add_item(tree, proto_nas_eps, tvb, 0, -1, ENC_NA);
- nas_eps_tree = proto_item_add_subtree(item, ett_nas_eps);
-
- pd = tvb_get_guint8(tvb,offset)&0x0f;
- switch (pd){
- case 2:
- /* EPS session management messages.
- * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
- */
- disect_nas_eps_esm_msg(tvb, pinfo, nas_eps_tree, offset);
- break;
- case 7:
- /* EPS mobility management messages.
- * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
- */
- dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, TRUE);
- break;
- case 15:
- /* Special conformance testing functions for User Equipment messages.
- * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
- */
- if (gsm_a_dtap_handle){
- tvbuff_t *new_tvb = tvb_new_subset(tvb, offset, -1, -1);
- call_dissector(gsm_a_dtap_handle, new_tvb,pinfo, nas_eps_tree);
- break;
- } /* else fall through default */
- default:
- proto_tree_add_text(nas_eps_tree, tvb, offset, -1, "Not a NAS EPS PD %u(%s)",pd,val_to_str(pd, protocol_discriminator_vals,"unknown"));
- break;
- }
-
-}
-
-void proto_register_nas_eps(void) {
- guint i;
- guint last_offset;
+ guint i;
+ guint last_offset;
+ module_t *nas_eps_module;
/* List of fields */
static hf_register_info hf[] = {
{ &hf_nas_eps_msg_emm_type,
{ "NAS EPS Mobility Management Message Type", "nas_eps.nas_msg_emm_type",
- FT_UINT8, BASE_HEX, VALS(nas_msg_emm_strings), 0x0,
+ FT_UINT8, BASE_HEX|BASE_EXT_STRING, &nas_msg_emm_strings_ext, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_common_elem_id,
{ "Element ID", "nas_eps.common.elem_id",
- FT_UINT8, BASE_DEC, NULL, 0,
+ FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_elem_id,
{ "Element ID", "nas_eps.emm.elem_id",
- FT_UINT8, BASE_DEC, NULL, 0,
+ FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }
},
{ &hf_nas_eps_bearer_id,
{ "EPS bearer identity", "nas_eps.bearer_id",
- FT_UINT8, BASE_HEX, NULL, 0xf0,
+ FT_UINT8, BASE_DEC, VALS(nas_eps_esm_bearer_id_vals), 0xf0,
NULL, HFILL }
},
{ &hf_nas_eps_spare_bits,
},
{ &hf_nas_eps_emm_paging_id,
{ "Paging identity value","nas_eps.emm.paging_id",
- FT_BOOLEAN, 8, TFS(&nas_eps_emm_paging_id_vals), 0x0,
+ FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_paging_id_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eps_att_type,
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_eps_att_type_vals), 0x0,
NULL, HFILL }
},
- { &hf_nas_eps_emm_cs_lcs_type,
+ { &hf_nas_eps_emm_esr_ps,
+ { "ESRPS","nas_eps.emm.esr_ps",
+ FT_BOOLEAN ,BASE_NONE, TFS(&nas_eps_emm_esr_ps_value), 0x0,
+ "Support of EXTENDED SERVICE REQUEST for packet services", HFILL }
+ },
+ { &hf_nas_eps_emm_cs_lcs,
{ "CS-LCS","nas_eps.emm.cs_lcs",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_cs_lcs_vals), 0x0,
"Location services indicator in CS", HFILL }
},
- { &hf_nas_eps_emm_epc_lcs_type,
+ { &hf_nas_eps_emm_epc_lcs,
{ "EPC-LCS","nas_eps.emm.epc_lcs",
FT_BOOLEAN ,BASE_NONE, TFS(&nas_eps_emm_epc_lcs_value), 0x0,
"Location services indicator in EPC", HFILL }
},
- { &hf_nas_eps_emm_emc_bs_type,
+ { &hf_nas_eps_emm_emc_bs,
{ "EMC BS","nas_eps.emm.emc_bs",
FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_emc_bs_value), 0x0,
"Emergency bearer services indicator", HFILL }
},
- { &hf_nas_eps_emm_ims_vops_type,
+ { &hf_nas_eps_emm_ims_vops,
{ "IMS VoPS","nas_eps.emm.ims_vops",
FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_ims_vops_value), 0x0,
"IMS voice over PS session indicator", HFILL }
},
{ &hf_nas_eps_tsc,
{ "Type of security context flag (TSC)","nas_eps.emm.tsc",
- FT_UINT8,BASE_DEC, VALS(nas_eps_tsc_vals), 0x0,
+ FT_BOOLEAN,BASE_DEC, TFS(&nas_eps_tsc_value), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_nas_key_set_id,
NULL, HFILL }
},
{ &hf_nas_eps_emm_spare_half_octet,
- { "Spare half octet","nas_eps.emm.EPS_attach_result",
+ { "Spare half octet","nas_eps.emm.spare_half_octet",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
},
{ &hf_nas_eps_emm_cause,
{ "Cause","nas_eps.emm.cause",
- FT_UINT8, BASE_DEC, VALS(nas_eps_emm_cause_values), 0x0,
+ FT_UINT8, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_id_type2,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eea3,
- { "EEA3","nas_eps.emm.eea3",
+ { "128-EEA3","nas_eps.emm.eea3",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
NULL, HFILL }
},
NULL, HFILL }
},
{ &hf_nas_eps_emm_eia3,
- { "EIA3","nas_eps.emm.eia3",
+ { "128-EIA3","nas_eps.emm.eia3",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x10,
NULL, HFILL }
},
FT_BOOLEAN, 8, TFS(&nas_eps_emm_supported_flg_value), 0x01,
NULL, HFILL }
},
+ { &hf_nas_eps_emm_h245_ash_cap,
+ { "H.245-ASH capability","nas_eps.emm.h245_ash_cap",
+ FT_BOOLEAN, 8, TFS(&nas_eps_emm_h245_ash_cap_flg), 0x20,
+ "H.245 after SRVCC handover capability", HFILL }
+ },
+ { &hf_nas_eps_emm_acc_csfb_cap,
+ { "ACC-CSFB capability","nas_eps.emm.acc_csfb_cap",
+ FT_BOOLEAN, 8, TFS(&nas_eps_emm_acc_csfb_cap_flg), 0x10,
+ "Access class control for CSFB capability", HFILL }
+ },
{ &hf_nas_eps_emm_lpp_cap,
{ "LPP capability","nas_eps.emm.lpp_cap",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_lpp_cap_flg), 0x08,
- NULL, HFILL }
+ "LTE Positioning Protocol capability", HFILL }
},
{ &hf_nas_eps_emm_lcs_cap,
{ "LCS capability","nas_eps.emm.lcs_cap",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_lcs_cap_flg), 0x04,
- NULL, HFILL }
+ "Location services notification mechanisms capability", HFILL }
},
{ &hf_nas_eps_emm_1xsrvcc_cap,
{ "1xSRVCC capability","nas_eps.emm.1xsrvcc_cap",
NULL, HFILL }
},
{ &hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg,
- { "1xSRVCC capability","nas_eps.emm.ue_ra_cap_inf_upd_need_flg",
+ { "URC upd","nas_eps.emm.ue_ra_cap_inf_upd_need_flg",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ue_ra_cap_inf_upd_need_flg), 0x01,
- NULL, HFILL }
+ "UE radio capability information update needed flag", HFILL }
},
{ &hf_nas_eps_emm_ss_code,
- { "SS Code","nas_eps.emm.eps_update_result_value",
+ { "SS Code","nas_eps.emm.ss_code",
FT_UINT8,BASE_DEC, VALS(ssCode_vals), 0x0,
NULL, HFILL }
},
},
{ &hf_nas_eps_emm_gen_msg_cont_type,
{ "Container type","nas_eps.emm.gen_msg_cont_type",
- FT_UINT8,BASE_DEC, VALS(nas_eps_emm_gen_msg_cont_type_vals), 0x0,
+ FT_UINT8,BASE_DEC|BASE_RANGE_STRING, RVALS(nas_eps_emm_gen_msg_cont_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_apn_ambr_ul,
NULL, HFILL }
},
{ &hf_nas_eps_emm_apn_ambr_ul_ext,
- { "APN-AMBR for uplink(Extended)","nas_eps.emm.apn_ambr_ul_ext",
+ { "APN-AMBR for uplink (extended)","nas_eps.emm.apn_ambr_ul_ext",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_apn_ambr_dl_ext,
- { "APN-AMBR for downlink(Extended)","nas_eps.emm.apn_ambr_dl_ext",
+ { "APN-AMBR for downlink (extended)","nas_eps.emm.apn_ambr_dl_ext",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_apn_ambr_ul_ext2,
- { "APN-AMBR for uplink(Extended-2)","nas_eps.emm.apn_ambr_ul_ext2",
+ { "APN-AMBR for uplink (extended-2)","nas_eps.emm.apn_ambr_ul_ext2",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_apn_ambr_dl_ext2,
- { "APN-AMBR for downlink(Extended-2)","nas_eps.emm.apn_ambr_dl_ext2",
+ { "APN-AMBR for downlink (extended-2)","nas_eps.emm.apn_ambr_dl_ext2",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
+ { &hf_nas_eps_emm_guti_type,
+ { "GUTI type", "nas_eps.emm.guti_type",
+ FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_guti_type_value), 0x0,
+ NULL, HFILL }
+ },
{ &hf_nas_eps_emm_switch_off,
{ "Switch off","nas_eps.emm.switch_off",
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_switch_off_vals), 0x0,
},
{ &hf_nas_eps_emm_detach_type_UL,
{ "Detach Type","nas_eps.emm.detach_type_ul",
- FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_dtatch_UL_vals), 0x0,
+ FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_detach_UL_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_detach_type_DL,
{ "Detach Type","nas_eps.emm.detach_type_dl",
- FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_dtatch_DL_vals), 0x0,
+ FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_detach_DL_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_qci,
{ "Quality of Service Class Identifier (QCI)","nas_eps.emm.qci",
- FT_UINT8,BASE_DEC, VALS(nas_eps_qci_vals), 0x0,
+ FT_UINT8,(BASE_DEC|BASE_RANGE_STRING), RVALS(nas_eps_qci_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_mbr_ul,
},
{ &hf_nas_eps_esm_cause,
{ "Cause","nas_eps.esm.cause",
- FT_UINT8,BASE_DEC, VALS(nas_eps_esm_cause_vals), 0x0,
+ FT_UINT8,BASE_DEC|BASE_EXT_STRING, &nas_eps_esm_cause_vals_ext, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_eit,
{ "EIT (ESM information transfer)", "nas_eps.emm.eit",
- FT_BOOLEAN, 8, TFS(&nas_eps_emm_active_flg_value), 0x01,
- NULL, HFILL }
- },
- { &hf_nas_eps_esm_lnkd_eps_bearer_id,
- { "Linked EPS bearer identity","nas_eps.esm.lnkd_eps_bearer_id",
- FT_UINT8,BASE_DEC, VALS(nas_eps_esm_linked_bearer_id_vals), 0x0f,
+ FT_BOOLEAN, 8, TFS(&nas_eps_emm_eit_vals), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_esm_notif_ind,
},
{ &hf_nas_eps_service_type,
{ "Service type", "nas_eps.emm.service_type",
- FT_UINT8,BASE_DEC, VALS(nas_eps_service_type_vals), 0x0,
+ FT_UINT8,BASE_DEC|BASE_RANGE_STRING, RVALS(nas_eps_service_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_nas_msg_cont,
/* ESM hf cvariables */
{ &hf_nas_eps_msg_esm_type,
{ "NAS EPS session management messages", "nas_eps.nas_msg_esm_type",
- FT_UINT8, BASE_HEX, VALS(nas_msg_esm_strings), 0x0,
+ FT_UINT8, BASE_HEX|BASE_EXT_STRING, &nas_msg_esm_strings_ext, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_elem_id,
{ "Element ID", "nas_eps.esm.elem_id",
- FT_UINT8, BASE_DEC, NULL, 0,
+ FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_proc_trans_id,
NULL, HFILL }
},
{ &hf_nas_eps_esm_pdn_type,
- { "PDN type", "nas_eps.nas_eps_esm_pdn_type",
+ { "PDN type", "nas_eps.esm_pdn_type",
FT_UINT8, BASE_DEC, VALS(nas_eps_esm_pdn_type_values), 0x0,
NULL, HFILL }
},
+ { &hf_nas_eps_esm_request_type,
+ { "Request type", "nas_eps.esm_request_type",
+ FT_UINT8, BASE_DEC, VALS(nas_eps_esm_request_type_values), 0x0,
+ NULL, HFILL }
+ },
};
/* Setup protocol subtree array */
/* Register dissector */
register_dissector("nas-eps_plain", dissect_nas_eps_plain, proto_nas_eps);
+
+ /* Register configuration options to always dissect as plain messages */
+ nas_eps_module = prefs_register_protocol(proto_nas_eps, NULL);
+
+ prefs_register_bool_preference(nas_eps_module,
+ "dissect_plain",
+ "Force dissect as plain NAS EPS",
+ "Always dissect NAS EPS messages as plain",
+ &g_nas_eps_dissect_plain);
}
void
gsm_a_dtap_handle = find_dissector("gsm_a_dtap");
lpp_handle = find_dissector("lpp");
}
+
+/*
+ * Editor modelines
+ *
+ * Local Variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */