aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2012-12-11 23:20:22 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2012-12-11 23:20:22 +0000
commit70c283816b4f67672e2fbfcb0b04c002ef12d7c4 (patch)
treeac319588cd79d721007832a3d4d8607e12e50f96 /epan
parent96f889dfd6be79887e28bf168682bedc43588159 (diff)
Dissect eMBMS MTCH LCIDs
svn path=/trunk/; revision=46504
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-mac-lte.c13
-rw-r--r--epan/dissectors/packet-rlc-lte.c41
-rw-r--r--epan/dissectors/packet-rlc-lte.h1
3 files changed, 52 insertions, 3 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index 8ccec07b3f..51c20e1567 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -807,6 +807,9 @@ static gboolean global_mac_lte_attempt_srb_decode = TRUE;
/* Whether should attempt to decode MCH LCID 0 as MCCH */
static gboolean global_mac_lte_attempt_mcch_decode = FALSE;
+/* Whether should call RLC dissector to decode MTCH LCIDs */
+static gboolean global_mac_lte_call_rlc_for_mtch = FALSE;
+
/* Where to take LCID -> DRB mappings from */
enum lcid_drb_source {
FromStaticTable, FromConfigurationProtocol
@@ -4098,6 +4101,11 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
call_rlc_dissector(tvb, pinfo, tree, pdu_ti, offset, data_length,
RLC_UM_MODE, DIRECTION_DOWNLINK, 0,
CHANNEL_TYPE_MCCH, 0, 5, 0);
+ } else if ((lcids[n] <= 28) && global_mac_lte_call_rlc_for_mtch) {
+ /* Call RLC dissector */
+ call_rlc_dissector(tvb, pinfo, tree, pdu_ti, offset, data_length,
+ RLC_UM_MODE, DIRECTION_DOWNLINK, 0,
+ CHANNEL_TYPE_MTCH, 0, 5, 0);
} else {
/* Dissect SDU as raw bytes */
sdu_ti = proto_tree_add_bytes_format(tree, hf_mac_lte_mch_sdu, tvb, offset, pdu_lengths[n],
@@ -5837,6 +5845,11 @@ void proto_register_mac_lte(void)
"Will call LTE RLC dissector for MCH LCID 0",
&global_mac_lte_attempt_mcch_decode);
+ prefs_register_bool_preference(mac_lte_module, "call_rlc_for_mtch",
+ "Call RLC dissector MTCH LCIDs",
+ "Call RLC dissector MTCH LCIDs",
+ &global_mac_lte_call_rlc_for_mtch);
+
prefs_register_enum_preference(mac_lte_module, "lcid_to_drb_mapping_source",
"Source of LCID -> drb channel settings",
"Set whether LCID -> drb Table is taken from static table (below) or from "
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c
index 94fc04442f..cfb25acf20 100644
--- a/epan/dissectors/packet-rlc-lte.c
+++ b/epan/dissectors/packet-rlc-lte.c
@@ -77,6 +77,7 @@ static gint signalled_pdcp_sn_bits = 12;
static gboolean global_rlc_lte_call_rrc_for_ccch = FALSE;
static gboolean global_rlc_lte_call_rrc_for_mcch = FALSE;
+static gboolean global_rlc_lte_call_ip_for_mtch = FALSE;
/* Preference to expect RLC headers without payloads */
static gboolean global_rlc_lte_headers_expected = FALSE;
@@ -95,6 +96,7 @@ extern int proto_mac_lte;
extern int proto_pdcp_lte;
static dissector_handle_t pdcp_lte_handle;
+static dissector_handle_t ip_handle;
static int rlc_lte_tap = -1;
@@ -227,6 +229,7 @@ static const value_string rlc_channel_type_vals[] =
{ CHANNEL_TYPE_DRB, "DRB"},
{ CHANNEL_TYPE_BCCH_DL_SCH, "BCCH_DL_SCH"},
{ CHANNEL_TYPE_MCCH, "MCCH"},
+ { CHANNEL_TYPE_MTCH, "MTCH"},
{ 0, NULL }
};
@@ -727,7 +730,7 @@ static void show_PDU_in_info(packet_info *pinfo,
}
-/* Show an SDU. If configured, pass to PDCP/RRC dissector */
+/* Show an SDU. If configured, pass to PDCP/RRC/IP dissector */
static void show_PDU_in_tree(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, gint offset, gint length,
rlc_lte_info *rlc_info, gboolean whole_pdu, rlc_channel_reassembly_info *reassembly_info,
sequence_analysis_state state)
@@ -839,6 +842,29 @@ static void show_PDU_in_tree(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb
PROTO_ITEM_SET_HIDDEN(data_ti);
}
+ else if (global_rlc_lte_call_ip_for_mtch && (rlc_info->channelType == CHANNEL_TYPE_MTCH)) {
+ /* Send whole PDU to IP */
+ static tvbuff_t *ip_tvb = NULL;
+
+ /* Get tvb for passing to IP dissector */
+ if (reassembly_info == NULL) {
+ ip_tvb = tvb_new_subset(tvb, offset, length, length);
+ }
+ else {
+ /* Get combined tvb. */
+ ip_tvb = reassembly_get_reassembled_tvb(reassembly_info, tvb, pinfo);
+ reassembly_show_source(reassembly_info, tree, tvb, offset);
+ }
+
+ TRY {
+ call_dissector_only(ip_handle, ip_tvb, pinfo, tree, NULL);
+ }
+ CATCH_ALL {
+ }
+ ENDTRY
+
+ PROTO_ITEM_SET_HIDDEN(data_ti);
+ }
}
}
@@ -1917,6 +1943,7 @@ static void dissect_rlc_lte_tm(tvbuff_t *tvb, packet_info *pinfo,
case CHANNEL_TYPE_SRB:
case CHANNEL_TYPE_DRB:
case CHANNEL_TYPE_MCCH:
+ case CHANNEL_TYPE_MTCH:
default:
/* Shouldn't happen, just return... */
@@ -3333,7 +3360,7 @@ void proto_register_rlc_lte(void)
prefs_register_bool_preference(rlc_lte_module, "call_pdcp_for_srb",
"Call PDCP dissector for SRB PDUs",
"Call PDCP dissector for signalling PDUs. Note that without reassembly, it can"
- "only be called for complete PDus (i.e. not segmented over RLC)",
+ "only be called for complete PDUs (i.e. not segmented over RLC)",
&global_rlc_lte_call_pdcp_for_srb);
prefs_register_enum_preference(rlc_lte_module, "call_pdcp_for_drb",
@@ -3350,9 +3377,16 @@ void proto_register_rlc_lte(void)
prefs_register_bool_preference(rlc_lte_module, "call_rrc_for_mcch",
"Call RRC dissector for MCCH PDUs",
- "Call RRC dissector for MCCH PDUs",
+ "Call RRC dissector for MCCH PDUs Note that without reassembly, it can"
+ "only be called for complete PDUs (i.e. not segmented over RLC)",
&global_rlc_lte_call_rrc_for_mcch);
+ prefs_register_bool_preference(rlc_lte_module, "call_ip_for_mtch",
+ "Call IP dissector for MTCH PDUs",
+ "Call ip dissector for MTCH PDUs Note that without reassembly, it can"
+ "only be called for complete PDUs (i.e. not segmented over RLC)",
+ &global_rlc_lte_call_ip_for_mtch);
+
prefs_register_bool_preference(rlc_lte_module, "heuristic_rlc_lte_over_udp",
"Try Heuristic LTE-RLC over UDP framing",
"When enabled, use heuristic dissector to find RLC-LTE frames sent with "
@@ -3384,4 +3418,5 @@ proto_reg_handoff_rlc_lte(void)
heur_dissector_add("udp", dissect_rlc_lte_heur, proto_rlc_lte);
pdcp_lte_handle = find_dissector("pdcp-lte");
+ ip_handle = find_dissector("ip");
}
diff --git a/epan/dissectors/packet-rlc-lte.h b/epan/dissectors/packet-rlc-lte.h
index 6d13fd0a83..d93a0f743a 100644
--- a/epan/dissectors/packet-rlc-lte.h
+++ b/epan/dissectors/packet-rlc-lte.h
@@ -42,6 +42,7 @@
#define CHANNEL_TYPE_DRB 5
#define CHANNEL_TYPE_BCCH_DL_SCH 6
#define CHANNEL_TYPE_MCCH 7
+#define CHANNEL_TYPE_MTCH 8
/* UMSequenceNumberLength */
#define UM_SN_LENGTH_5_BITS 5