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).

svn path=/trunk/; revision=26859
This commit is contained in:
Jaap Keuter 2008-11-26 23:43:09 +00:00
parent 14029e4803
commit 1e5a872489
2 changed files with 45 additions and 3 deletions

View File

@ -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);
}

View File

@ -139,6 +139,16 @@
#define RTP_MWATTTONE 172
#define RTP_NEWMWATTTN 173
#define RTP_CISCO_NSE_FAX_PASSTHROUGH_IND 192
#define RTP_CISCO_NSE_MODEM_PASSTHROUGH_IND 193
#define RTP_CISCO_NSE_VOICE_MODE_IND 194
#define RTP_CISCO_NSE_MODEM_RELAY_CAP_IND 199
#define RTP_CISCO_NSE_FAX_RELAY_IND 200
#define RTP_CISCO_NSE_ACK 201
#define RTP_CISCO_NSE_NACK 202
#define RTP_CISCO_NSE_MODEM_RELAY_IND 203
static const value_string rtp_event_type_values[] =
{
@ -249,6 +259,14 @@ static const value_string rtp_event_type_values[] =
{ RTP_LOOPBACK, "Loopback"},
{ RTP_MWATTTONE, "Old milliwatt tone (1000 Hz)"},
{ RTP_NEWMWATTTN, "New milliwatt tone (1004 Hz)"},
{ RTP_CISCO_NSE_FAX_PASSTHROUGH_IND, "Cisco NSE: Shift to voiceband data mode"},
{ RTP_CISCO_NSE_MODEM_PASSTHROUGH_IND, "Cisco NSE: Disable echo cancellation"},
{ RTP_CISCO_NSE_VOICE_MODE_IND, "Cisco NSE: Shift to voice mode"},
{ RTP_CISCO_NSE_MODEM_RELAY_CAP_IND, "Cisco NSE: Advertise Modem relay capability"},
{ RTP_CISCO_NSE_FAX_RELAY_IND, "Cisco NSE: Shift to fax relay mode"},
{ RTP_CISCO_NSE_ACK, "Positive acknowledgement of Cisco NSE"},
{ RTP_CISCO_NSE_NACK, "Negative acknowledgement of Cisco NSE"},
{ RTP_CISCO_NSE_MODEM_RELAY_IND , "Cisco NSE: Shift to modem relay mode"},
{ 0, NULL },
};