aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2024-02-27 18:02:53 -0500
committerJohn Thacker <johnthacker@gmail.com>2024-02-27 18:04:28 -0500
commitd62cc2b175e82d1029dd2b5965f2bec91f74d281 (patch)
tree0064fcbaeb1c275a9f8f09b699b8ce2167c41b8c
parent3d8e72fdf9d5587dbb66f51bdbe49301612d6c42 (diff)
MEGACO: Dissect statisticsDescriptor inside mediaDescriptor
Versions 2 and 3 of MEGACO (H.248 text) added statisticsDescriptor to one of the options for a streamParm that can appear inside a mediaDescriptor. Dissect it. Part of #11080
-rw-r--r--epan/dissectors/packet-megaco.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c
index f337a7eba7..bcbad94686 100644
--- a/epan/dissectors/packet-megaco.c
+++ b/epan/dissectors/packet-megaco.c
@@ -450,6 +450,8 @@ dissect_megaco_topologydescriptor(tvbuff_t *tvb, proto_tree *tree, gint tvb_RBRK
static void
dissect_megaco_errordescriptor(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, gint tvb_RBRKT, gint tvb_previous_offset);
static void
+dissect_megaco_statisticsdescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_command_line, gint tvb_RBRKT, gint tvb_previous_offset);
+static void
dissect_megaco_TerminationStatedescriptor(tvbuff_t *tvb, proto_tree *tree, gint tvb_next_offset, gint tvb_current_offset);
static void
dissect_megaco_LocalRemotedescriptor(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint tvb_next_offset, gint tvb_current_offset, guint32 context, gboolean is_local);
@@ -1716,6 +1718,7 @@ dissect_megaco_multiplexdescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_comman
#define MEGACO_LOCAL_CONTROL_TOKEN 3
#define MEGACO_STREAM_TOKEN 4
#define MEGACO_TERMINATION_STATE_DESC 5
+// MEGACO_STATS_TOKEN is already defined as 6 above
static const megaco_tokens_t megaco_mediaParm_names[] = {
{ "Unknown-token", NULL }, /* 0 Pad so that the real headers start at index 1 */
@@ -1724,6 +1727,7 @@ static const megaco_tokens_t megaco_mediaParm_names[] = {
{ "LocalControl", "O" }, /* 3 */
{ "Stream", "ST" }, /* 4 */
{ "TerminationState", "TS" }, /* 5 */
+ { "Statistics", "SA" }, /* 6 */
};
/* Returns index of megaco_tokens_t */
@@ -1816,6 +1820,14 @@ dissect_megaco_mediadescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_command_li
tvb_RBRKT, tvb_current_offset);
tvb_current_offset = tvb_RBRKT;
break;
+ case MEGACO_STATS_TOKEN:
+ // dissect_megaco_statisticsdescriptor wants the previous
+ // offset, don't skip forward.
+ //tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_LBRKT+1);
+ dissect_megaco_statisticsdescriptor(tvb, megaco_mediadescriptor_tree,
+ tvb_RBRKT, tvb_current_offset);
+ tvb_current_offset = tvb_RBRKT;
+ break;
default:
break;
};