aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtp-events.c
diff options
context:
space:
mode:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2008-11-26 23:43:09 +0000
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2008-11-26 23:43:09 +0000
commitf83b8a707d178197447c5990e20e194b9be9db3d (patch)
treee3696fced794a2c2095de852b82d60fb0534cec8 /epan/dissectors/packet-rtp-events.c
parent466472dafed9094cf0d89b7bf551e09f14e3e9f4 (diff)
From Chidambaram Arunachalam:
This patch adds the ability to identify Cisco NSE packets. http://www.iana.org/assignments/media-types/audio/vnd.cisco.nse In addition to the NSE(s) described in the above document, the patch also decodes two additional NSE(s): Modem relay capability (199) and Modem Relay indication (203). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26859 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-rtp-events.c')
-rw-r--r--epan/dissectors/packet-rtp-events.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rtp-events.c b/epan/dissectors/packet-rtp-events.c
index d634d6b8dd..95a5fff8a1 100644
--- a/epan/dissectors/packet-rtp-events.c
+++ b/epan/dissectors/packet-rtp-events.c
@@ -26,6 +26,11 @@
/*
* This dissector tries to dissect RTP Events.
+ *
+ * Cisco NSE is now supported, additions by
+ * Gonzalo Salgueiro <gsalguei@cisco.com>
+ * Chidambaram Arunachalam <carunach@cisco.com>
+ * Copyright 2008, Cisco Systems, Inc.
*/
@@ -49,6 +54,11 @@
*/
static guint rtp_event_payload_type_value = 101;
+/* cisco_nse_pt_value is used globally
+ to set the appropriate Cisco NSE payload type value
+ */
+static guint cisco_nse_pt_value = 100;
+
/* RTP Event Fields */
@@ -230,8 +240,16 @@ proto_register_rtp_events(void)
prefs_register_uint_preference (rtp_events_module,
"event_payload_type_value", "Payload Type for RFC2833 RTP Events",
"This is the value of the Payload Type field"
- "that specifies RTP Events", 10,
+ " that specifies RTP Events", 10,
&rtp_event_payload_type_value);
+
+
+ prefs_register_uint_preference (rtp_events_module,
+ "cisco_nse_payload_type_value", "Payload Type for Cisco Named Signaling Events",
+ "This is the value of the Payload Type field"
+ " that specifies Cisco Named Signaling Events", 10,
+ &cisco_nse_pt_value);
+
register_dissector("rtpevent", dissect_rtp_events, proto_rtp_events);
rtp_event_tap = register_tap("rtpevent");
}
@@ -244,21 +262,27 @@ proto_reg_handoff_rtp_events(void)
static dissector_handle_t rtp_events_handle;
/* saved_payload_type_value is a temporary place to save */
/* the value so we can properly reinitialize when the */
- /* settings get changed. */
+ /* settings get changed. */
static guint saved_payload_type_value;
+ static guint saved_cisco_nse_pt_value;
static gboolean rtp_events_prefs_initialized = FALSE;
- if (!rtp_events_prefs_initialized) {
+ if (!rtp_events_prefs_initialized) {
rtp_events_handle = find_dissector("rtpevent");
dissector_add_string("rtp_dyn_payload_type", "telephone-event", rtp_events_handle);
+ dissector_add_string("rtp_dyn_payload_type", "X-NSE", rtp_events_handle);
rtp_events_prefs_initialized = TRUE;
}
else {
dissector_delete("rtp.pt", saved_payload_type_value, rtp_events_handle);
+ dissector_delete("rtp.pt", saved_cisco_nse_pt_value, rtp_events_handle);
}
saved_payload_type_value = rtp_event_payload_type_value;
/* rtp_event_payload_type_value is set from preferences */
+ saved_cisco_nse_pt_value = cisco_nse_pt_value;
+ /* cisco_nse_pt_value is set from preferences */
dissector_add("rtp.pt", saved_payload_type_value, rtp_events_handle);
+ dissector_add("rtp.pt", saved_cisco_nse_pt_value, rtp_events_handle);
}