aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorVincent Helfre <vincenthelfre@googlemail.com>2016-06-01 11:43:11 +0200
committerAnders Broman <a.broman58@gmail.com>2016-06-01 10:54:38 +0000
commit575e4df4aa3392ffd09ca372859573f09f0a5c57 (patch)
tree7b6ae8e4a8daf6715b6bd3841faa2b7ff7c2dff8 /epan
parent830cc9514321357f7734bb4d934dafb0214b7f4f (diff)
GSM RLC/MAC: add dissection of NAS container
While we are at it, let's display other containers in hexadecimal instead of decimal Change-Id: I6ac6dd2a64271cbc2958860550da9024445bfe19 Reviewed-on: https://code.wireshark.org/review/15675 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-gsm_rlcmac.c76
-rw-r--r--epan/dissectors/packet-gsm_rlcmac.h13
2 files changed, 70 insertions, 19 deletions
diff --git a/epan/dissectors/packet-gsm_rlcmac.c b/epan/dissectors/packet-gsm_rlcmac.c
index 16b4a8b1a4..a64cfd435b 100644
--- a/epan/dissectors/packet-gsm_rlcmac.c
+++ b/epan/dissectors/packet-gsm_rlcmac.c
@@ -962,8 +962,11 @@ static int hf_globaltimeslotdescription_ms_timeslotallocation = -1;
static int hf_pho_usf_1_7_usf = -1;
static int hf_usf_allocationarray_usf_0 = -1;
static int hf_egprs_description_linkqualitymeasurementmode = -1;
-static int hf_nas_container_nas_containerlength = -1;
-static int hf_nas_container_nas_container = -1;
+static int hf_nas_container_for_ps_ho_containerlength = -1;
+static int hf_nas_container_for_ps_ho_spare = -1;
+static int hf_nas_container_for_ps_ho_old_xid = -1;
+static int hf_nas_container_for_ps_ho_type_of_ciphering = -1;
+static int hf_nas_container_for_ps_ho_iov_ui_value = -1;
static int hf_ps_handoverto_utran_payload_rrc_containerlength = -1;
static int hf_ps_handoverto_utran_payload_rrc_container = -1;
static int hf_pho_radioresources_handoverreference = -1;
@@ -6015,10 +6018,16 @@ CSN_DESCR_BEGIN(PHO_TimingAdvance_t)
CSN_DESCR_END (PHO_TimingAdvance_t)
static const
-CSN_DESCR_BEGIN(NAS_Container_t)
- M_UINT (NAS_Container_t, NAS_ContainerLength, 7, &hf_nas_container_nas_containerlength),
- M_VAR_ARRAY (NAS_Container_t, NAS_Container, NAS_ContainerLength, 0, &hf_nas_container_nas_container),
-CSN_DESCR_END (NAS_Container_t)
+CSN_DESCR_BEGIN(NAS_Container_For_PS_HO_t)
+M_UINT (NAS_Container_For_PS_HO_t, NAS_ContainerLength, 7, &hf_nas_container_for_ps_ho_containerlength),
+M_UINT (NAS_Container_For_PS_HO_t, Spare_1a, 1, &hf_nas_container_for_ps_ho_spare),
+M_UINT (NAS_Container_For_PS_HO_t, Spare_1b, 1, &hf_nas_container_for_ps_ho_spare),
+M_UINT (NAS_Container_For_PS_HO_t, Spare_1c, 1, &hf_nas_container_for_ps_ho_spare),
+M_UINT (NAS_Container_For_PS_HO_t, Old_XID, 1, &hf_nas_container_for_ps_ho_old_xid),
+M_UINT (NAS_Container_For_PS_HO_t, Spare_1e, 1, &hf_nas_container_for_ps_ho_spare),
+M_UINT (NAS_Container_For_PS_HO_t, Type_of_Ciphering_Algo, 3, &hf_nas_container_for_ps_ho_type_of_ciphering),
+M_UINT (NAS_Container_For_PS_HO_t, IOV_UI_value, 32, &hf_nas_container_for_ps_ho_iov_ui_value),
+CSN_DESCR_END (NAS_Container_For_PS_HO_t)
static const
CSN_DESCR_BEGIN(PS_HandoverTo_UTRAN_Payload_t)
@@ -6071,7 +6080,7 @@ CSN_DESCR_BEGIN(PS_HandoverTo_A_GB_ModePayload_t)
M_TYPE (PS_HandoverTo_A_GB_ModePayload_t, PHO_RadioResources, PHO_RadioResources_t),
M_NEXT_EXIST (PS_HandoverTo_A_GB_ModePayload_t, Exist_NAS_Container, 1, &hf_ps_handoverto_a_gb_modepayload_nas_container_exist),
- M_TYPE (PS_HandoverTo_A_GB_ModePayload_t, NAS_Container, NAS_Container_t),
+ M_TYPE (PS_HandoverTo_A_GB_ModePayload_t, NAS_Container, NAS_Container_For_PS_HO_t),
CSN_DESCR_END (PS_HandoverTo_A_GB_ModePayload_t)
static const
@@ -7490,6 +7499,25 @@ static const value_string gsm_rlcmac_t3192_vals[] = {
{ 0, NULL}
};
+/* NAS container for PS HOinformation element according to Table 10.5.1.14/3GPP TS 24.008 */
+static const value_string nas_container_for_ps_ho_old_xid[] = {
+ { 0, "The MS shall perform a Reset of LLC and SNDCP without old XID indicator as specified in 3GPP TS 44.064 and 3GPP TS 44.065"},
+ { 1, "The MS shall perform a Reset of LLC and SNDCP with old XID indicator as specified in 3GPP TS 44.064 and 3GPP TS 44.065"},
+ { 0, NULL}
+};
+
+static const value_string nas_container_for_ps_ho_type_of_ciphering[] = {
+ { 0, "ciphering not used"},
+ { 1, "GPRS Encryption Algorithm GEA/1"},
+ { 2, "GPRS Encryption Algorithm GEA/2"},
+ { 3, "GPRS Encryption Algorithm GEA/3"},
+ { 4, "GPRS Encryption Algorithm GEA/4"},
+ { 5, "GPRS Encryption Algorithm GEA/5"},
+ { 6, "GPRS Encryption Algorithm GEA/6"},
+ { 7, "GPRS Encryption Algorithm GEA/7"},
+ { 0, NULL}
+};
+
static gint construct_gprs_data_segment_li_array(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 initial_offset, guint8 *li_count, length_indicator_t *li_array, guint64 *e)
{
gint offset = initial_offset;
@@ -12968,13 +12996,13 @@ proto_register_gsm_rlcmac(void)
},
{ &hf_pncd_container_with_id_container,
{ "CONTAINER", "gsm_rlcmac.dl.pncd_with_id_container",
- FT_UINT8, BASE_DEC, NULL, 0x0,
+ FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL
}
},
{ &hf_pncd_container_without_id_container,
{ "CONTAINER", "gsm_rlcmac.dl.pncd_without_id_container",
- FT_UINT8, BASE_DEC, NULL, 0x0,
+ FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL
}
},
@@ -13018,7 +13046,7 @@ proto_register_gsm_rlcmac(void)
},
{ &hf_packet_serving_cell_data_container,
{ "CONTAINER", "gsm_rlcmac.dl.pscd_container",
- FT_UINT8, BASE_DEC, NULL, 0x0,
+ FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL
}
},
@@ -13098,18 +13126,36 @@ proto_register_gsm_rlcmac(void)
NULL, HFILL
}
},
- { &hf_nas_container_nas_containerlength,
- { "NAS_ContainerLength", "gsm_rlcmac.dl.nas_containerlength",
+ { &hf_nas_container_for_ps_ho_containerlength,
+ { "NAS_ContainerLength", "gsm_rlcmac.dl.nas_container_for_ps_ho_length",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL
}
},
- { &hf_nas_container_nas_container,
- { "NAS_Container", "gsm_rlcmac.dl.nas_container",
+ { &hf_nas_container_for_ps_ho_spare,
+ { "Spare", "gsm_rlcmac.dl.nas_container_for_ps_ho_spare",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL
}
},
+ { &hf_nas_container_for_ps_ho_old_xid,
+ { "Old XID", "gsm_rlcmac.dl.nas_container_for_ps_ho_old_xid",
+ FT_UINT8, BASE_DEC, VALS(nas_container_for_ps_ho_old_xid), 0x0,
+ NULL, HFILL
+ }
+ },
+ { &hf_nas_container_for_ps_ho_type_of_ciphering,
+ { "Type of Ciphering Algorithm", "gsm_rlcmac.dl.nas_container_for_ps_ho_type_of_ciphering",
+ FT_UINT8, BASE_DEC, VALS(nas_container_for_ps_ho_type_of_ciphering), 0x0,
+ NULL, HFILL
+ }
+ },
+ { &hf_nas_container_for_ps_ho_iov_ui_value,
+ { "IOV-UI value", "gsm_rlcmac.dl.nas_container_for_ps_ho_iov_ui_value",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
{ &hf_ps_handoverto_utran_payload_rrc_containerlength,
{ "RRC_ContainerLength", "gsm_rlcmac.dl.ps_handoverto_utran_payload_rrc_containerlength",
FT_UINT8, BASE_DEC, NULL, 0x0,
@@ -13118,7 +13164,7 @@ proto_register_gsm_rlcmac(void)
},
{ &hf_ps_handoverto_utran_payload_rrc_container,
{ "RRC_Container", "gsm_rlcmac.dl.ps_handoverto_utran_payload_rrc_container",
- FT_UINT8, BASE_DEC, NULL, 0x0,
+ FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL
}
},
diff --git a/epan/dissectors/packet-gsm_rlcmac.h b/epan/dissectors/packet-gsm_rlcmac.h
index c3bd021d1e..f83f7726ce 100644
--- a/epan/dissectors/packet-gsm_rlcmac.h
+++ b/epan/dissectors/packet-gsm_rlcmac.h
@@ -405,7 +405,6 @@ typedef struct
#define MAX_ALLOCATION_BITMAP_LENGTH 128 /* max length of Fixed Allocation bitmap in BITS (2^7) */
#define MAX_VAR_LENGTH_BITMAP_LENGTH 176 /* max length ever possible for variable length fixed allocation bitmap */
#define MAX_RRC_CONTAINER_LENGTH 255
-#define MAX_NAS_CONTAINER_LENGTH 127
typedef struct
@@ -4682,8 +4681,14 @@ typedef struct
typedef struct
{
guint8 NAS_ContainerLength;
- guint8 NAS_Container[MAX_NAS_CONTAINER_LENGTH];
-} NAS_Container_t;
+ guint8 Spare_1a;
+ guint8 Spare_1b;
+ guint8 Spare_1c;
+ guint8 Old_XID;
+ guint8 Spare_1e;
+ guint8 Type_of_Ciphering_Algo;
+ guint32 IOV_UI_value;
+} NAS_Container_For_PS_HO_t;
typedef struct
{
@@ -4729,7 +4734,7 @@ typedef struct
{
PHO_RadioResources_t PHO_RadioResources;
guint8 Exist_NAS_Container;
- NAS_Container_t NAS_Container;
+ NAS_Container_For_PS_HO_t NAS_Container;
} PS_HandoverTo_A_GB_ModePayload_t;
typedef struct