Add an option to dissect purported RTP packets with a version number of
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 29 Jan 2006 00:40:40 +0000 (00:40 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 29 Jan 2006 00:40:40 +0000 (00:40 +0000)
0 as T.38 rather than STUN.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17116 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-rtp.c

index 66eeea0c0f4f2a961f0778d424818918be5b6531..6549f49bbdff6bc0aa6b286667be6439ab0913ec 100644 (file)
@@ -71,6 +71,7 @@
 
 static dissector_handle_t rtp_handle;
 static dissector_handle_t stun_handle;
+static dissector_handle_t t38_handle;
 
 static int rtp_tap = -1;
 
@@ -112,10 +113,12 @@ static gint ett_rtp_setup = -1;
 
 #define RTP0_INVALID 0
 #define RTP0_STUN    1
+#define RTP0_T38     2
 
 static enum_val_t rtp_version0_types[] = {
        { "invalid", "Invalid RTP packets", RTP0_INVALID },
        { "stun", "STUN packets", RTP0_STUN },
+       { "t38", "T.38 packets", RTP0_T38 },
        { NULL, NULL, 0 }
 };
 static guint global_rtp_version0_type = 0;
@@ -337,6 +340,10 @@ dissect_rtp_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
                        call_dissector(stun_handle, tvb, pinfo, tree);
                        return TRUE;
 
+               case RTP0_T38:
+                       call_dissector(t38_handle, tvb, pinfo, tree);
+                       return TRUE;
+
                case RTP0_INVALID:
                default:
                        return FALSE; /* Unknown or unsupported version */
@@ -438,6 +445,10 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
                        call_dissector(stun_handle, tvb, pinfo, tree);
                        return;
 
+               case RTP0_T38:
+                       call_dissector(t38_handle, tvb, pinfo, tree);
+                       return;
+
                case RTP0_INVALID:
                default:
                        ; /* Unknown or unsupported version (let it fall through */
@@ -1092,6 +1103,7 @@ proto_reg_handoff_rtp(void)
 {
        data_handle = find_dissector("data");
        stun_handle = find_dissector("stun");
+       t38_handle = find_dissector("t38");
        /*
         * Register this dissector as one that can be selected by a
         * UDP port number.