wireshark patch to connect RRLP parser to GSM DTAP
diff --git a/wireshark/gsm_a_rr-rrlp.patch b/wireshark/gsm_a_rr-rrlp.patch
new file mode 100644
index 0000000..2e79d2b
--- /dev/null
+++ b/wireshark/gsm_a_rr-rrlp.patch
@@ -0,0 +1,195 @@
+Index: wireshark/epan/dissectors/packet-gsm_a_rr.c
+===================================================================
+--- wireshark.orig/epan/dissectors/packet-gsm_a_rr.c
++++ wireshark/epan/dissectors/packet-gsm_a_rr.c
+@@ -69,6 +69,7 @@
+ 
+ static dissector_handle_t rrc_irat_ho_info_handle;
+ static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle;
++static packet_info *rr_apdu_pinfo;
+ 
+ #define PADDING_BYTE 0x2B
+ 
+@@ -301,9 +302,9 @@
+     { 0x00, "Extended Measurement Results" },					/* [3] 10.5.2.45 Extended Measurement Results */
+     { 0x00, "Extended Measurement Frequency List" },				/* [3] 10.5.2.46 Extended Measurement Frequency List */
+     { 0x00, "Suspension Cause" },						/* [3] 10.5.2.47								*/
+-/* [3] 10.5.2.48 APDU ID
+- * [3] 10.5.2.49 APDU Flags
+- * [3] 10.5.2.50 APDU Data */
++    { 0x00, "APDU ID" },							/* [3] 10.5.2.48 APDU ID */
++    { 0x00, "APDU Flags" },							/* [3] 10.5.2.49 APDU Flags */
++    { 0x00, "APDU Data" },							/* [3] 10.5.2.50 APDU Data */
+     { 0x00, "Handover to UTRAN Command" },					/* [3] 10.5.2.51 Handover To UTRAN Command */
+ /* [3] 10.5.2.52 Handover To cdma2000 Command
+  * [3] 10.5.2.53 (void)
+@@ -497,6 +498,9 @@
+ static int hf_gsm_a_rr_chnl_needed_ch3 = -1;
+ static int hf_gsm_a_rr_chnl_needed_ch4 = -1;
+ static int hf_gsm_a_rr_suspension_cause = -1;
++static int hf_gsm_a_rr_apdu_id = -1;
++static int hf_gsm_a_rr_apdu_flags = -1;
++static int hf_gsm_a_rr_apdu_data = -1;
+ static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8 = -1;
+ static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7 = -1;
+ static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6 = -1;
+@@ -691,7 +695,7 @@
+ static char a_bigbuf[1024];
+ 
+ static dissector_handle_t data_handle;
+-
++static dissector_handle_t rrlp_dissector;
+ 
+ 
+ #define	NUM_GSM_RR_ELEM (sizeof(gsm_rr_elem_strings)/sizeof(value_string))
+@@ -6224,9 +6228,50 @@
+ }
+ /*
+  * [3] 10.5.2.48 APDU ID
++ */
++static const value_string gsm_a_rr_apdu_id_vals[] = {
++	{ 0, "RRLP (GSM 04.31) LCS" },
++	{ 0, NULL },
++};
++static guint16
++de_rr_apdu_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
++{
++    proto_tree_add_item(tree, hf_gsm_a_rr_apdu_id, tvb, offset, 1, FALSE);
++
++    return 0;
++}
++
++/*
+  * [3] 10.5.2.49 APDU Flags
++ */
++static const value_string gsm_a_rr_apdu_flags_vals[] = {
++	{ 1, "Last or only segment" },
++	{ 2, "First or only segment" },
++	{ 0, NULL },
++};
++static guint16
++de_rr_apdu_flags(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
++{
++    proto_tree_add_item(tree, hf_gsm_a_rr_apdu_flags, tvb, offset, 1, FALSE);
++
++    return 1;
++}
++
++/*
+  * [3] 10.5.2.50 APDU Data
+  */
++static guint16
++de_rr_apdu_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
++{
++    tvbuff_t *sub_tvb;
++    static packet_info p_info;
++
++    sub_tvb = tvb_new_subset(tvb, offset, len, len);
++
++    call_dissector(rrlp_dissector, sub_tvb, &p_info, tree);
++
++    return len;
++}
+ 
+ /*
+  * [3] 10.5.2.51 Handover To UTRAN Command
+@@ -6466,9 +6511,9 @@
+     de_rr_ext_meas_result,			/* [3] 10.5.2.45 Extended Measurement Results 		*/
+     de_rr_ext_meas_freq_list,			/* [3] 10.5.2.46 Extended Measurement Frequency List 	*/
+     de_rr_sus_cau,				/* [3] 10.5.2.47 Suspension Cause			*/
+-/* [3] 10.5.2.48 APDU ID
+- * [3] 10.5.2.49 APDU Flags
+- * [3] 10.5.2.50 APDU Data */
++    de_rr_apdu_id,				/* [3] 10.5.2.48 APDU ID				*/
++    de_rr_apdu_flags,				/* [3] 10.5.2.49 APDU Flags				*/
++    de_rr_apdu_data,				/* [3] 10.5.2.50 APDU Data */
+     de_rr_ho_to_utran_cmd,			/* [3] 10.5.2.51 Handover To UTRAN Command 		*/
+ /* [3] 10.5.2.52 Handover To cdma2000 Command
+  * [3] 10.5.2.53 (void)
+@@ -7864,6 +7909,24 @@
+ }
+ 
+ /*
++ * 9.1.53 Application Information
++ */
++static void
++dtap_rr_app_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
++{
++    guint32	curr_offset;
++    guint32	consumed;
++    guint	curr_len;
++
++    curr_offset = offset;
++    curr_len = len;
++
++    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_APDU_ID);
++    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_APDU_FLAGS);
++    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_APDU_DATA, NULL);
++}
++
++/*
+  * [4] 9.1.54 Measurement Information
+  */
+ static const value_string gsm_a_rr_3g_wait_vals[] = {
+@@ -8386,7 +8449,7 @@
+ 
+     NULL,			/* UTRAN Classmark Change/Handover To UTRAN Command */	/* spec conflict */
+ 
+-    NULL,			/* Application Information */
++    dtap_rr_app_inf,		/* Application Information */
+ 
+     NULL,			/* NONE */
+ };
+@@ -8499,6 +8562,7 @@
+      */
+     switch (pd){
+     case 6:
++	rr_apdu_pinfo = pinfo;
+         get_rr_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn);
+         break;
+ 
+@@ -9155,6 +9219,21 @@
+ 		FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_suspension_cause_vals), 0x0,
+ 		NULL, HFILL }
+             },
++            { &hf_gsm_a_rr_apdu_id,
++              { "APDU ID","gsm_a.rr.apdu_id",
++		FT_UINT8,BASE_HEX,  VALS(gsm_a_rr_apdu_id_vals), 0x0f,
++		NULL, HFILL }
++            },
++            { &hf_gsm_a_rr_apdu_flags,
++              { "APDU Flags","gsm_a.rr.apdu_flags",
++		FT_UINT8,BASE_HEX,  VALS(gsm_a_rr_apdu_flags_vals), 0xf0,
++		NULL, HFILL }
++            },
++            { &hf_gsm_a_rr_apdu_data,
++              { "APDU Data","gsm_a.rr.apdu_data",
++		FT_BYTES,BASE_HEX,  NULL, 0x00,
++		NULL, HFILL }
++            },
+             { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8,
+               { "12,2 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b8",
+ 		FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x80,
+@@ -10157,4 +10236,5 @@
+     data_handle = find_dissector("data");
+     rrc_irat_ho_info_handle = find_dissector("rrc.irat.irat_ho_info");
+     rrc_irat_ho_to_utran_cmd_handle = find_dissector("rrc.irat.ho_to_utran_cmd");
++    rrlp_dissector = find_dissector("rrlp");
+ }
+Index: wireshark/epan/dissectors/packet-gsm_a_common.h
+===================================================================
+--- wireshark.orig/epan/dissectors/packet-gsm_a_common.h
++++ wireshark/epan/dissectors/packet-gsm_a_common.h
+@@ -1101,9 +1101,9 @@
+ 	DE_RR_EXT_MEAS_RESULT,     	/* [3] 10.5.2.45 Extended Measurement Results */
+ 	DE_RR_EXT_MEAS_FREQ_LIST,		/* [3] 10.5.2.46 Extended Measurement Frequency List */
+ 	DE_RR_SUS_CAU,					/* [3] 10.5.2.47 Suspension Cause				*/
+-/* [3] 10.5.2.48 APDU ID
+- * [3] 10.5.2.49 APDU Flags
+- * [3] 10.5.2.50 APDU Data */
++	DE_RR_APDU_ID,					/* [3] 10.5.2.48 APDU ID */
++	DE_RR_APDU_FLAGS,				/* [3] 10.5.2.49 APDU Flags */
++	DE_RR_APDU_DATA,				/* [3] 10.5.2.50 APDU Data */
+ 	DE_RR_HO_TO_UTRAN_CMD,			/* [3] 10.5.2.51 Handover To UTRAN Command */
+ /* [3] 10.5.2.52 Handover To cdma2000 Command
+  * [3] 10.5.2.53 (void)