Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] RTP packet dissection in C#

From: Robert Clove <cloverobert@xxxxxxxxx>
Date: Fri, 17 Nov 2017 21:10:06 +0530
Hey,

Really thanks for the link.
If you can help me with the following.
I have code that dissect the RTP packet in C#(as follows), but i don't get the events here, if you can help me writing the code here
private void Rtsp_client_DataReceived(object sender, Rtsp.RtspChunkEventArgs e)
      {
          // RTP Packet Header
          // 0 - Version, P, X, CC, M, PT and Sequence Number
          //32 - Timestamp
          //64 - SSRC
          //96 - CSRCs (optional)
          //nn - Extension ID and Length
          //nn - Extension header

          int rtp_version =      (e.Message.Data[0] >> 6);
          int rtp_padding =      (e.Message.Data[0] >> 5) & 0x01;
          int rtp_extension =    (e.Message.Data[0] >> 4) & 0x01;
          int rtp_csrc_count =   (e.Message.Data[0] >> 0) & 0x0F;
          int rtp_marker =       (e.Message.Data[1] >> 7) & 0x01;
          int rtp_payload_type = (e.Message.Data[1] >> 0) & 0x7F;
          uint rtp_sequence_number = ((uint)e.Message.Data[2] << 8) + (uint)(e.Message.Data[3]);
          uint rtp_timestamp = ((uint)e.Message.Data[4] <<24) + (uint)(e.Message.Data[5] << 16) + (uint)(e.Message.Data[6] << 8) + (uint)(e.Message.Data[7]);
          uint rtp_ssrc =      ((uint)e.Message.Data[8] << 24) + (uint)(e.Message.Data[9] << 16) + (uint)(e.Message.Data[10] << 8) + (uint)(e.Message.Data[11]);

          int rtp_payload_start = 4 // V,P,M,SEQ
                              + 4 // time stamp
                              + 4 // ssrc
                              + (4 * rtp_csrc_count); // zero or more csrcs

          uint rtp_extension_id = 0;
          uint rtp_extension_size = 0;
          if (rtp_extension == 1)
          {
              rtp_extension_id = ((uint)e.Message.Data[rtp_payload_start + 0] << 8) + (uint)(e.Message.Data[rtp_payload_start + 1] << 0);
              rtp_extension_size = ((uint)e.Message.Data[rtp_payload_start + 2] << 8) + (uint)(e.Message.Data[rtp_payload_start + 3] << 0);
              rtp_payload_start += 4 + (int)rtp_extension_size;  // extension header and extension payload
          }
}


On Fri, Nov 17, 2017 at 8:33 PM, Jaap Keuter <jaap.keuter@xxxxxxxxx> wrote:
Hi,

We don’t have one, or at least non written in C#. If you would be interested in the C code of the RTP event dissector, that would be:

Thanks,
Jaap


On 17 Nov 2017, at 15:34, Robert Clove <cloverobert@xxxxxxxxx> wrote:

Hi,

Can anyone point me to the library written in C# which dissect the RTP packet.
I am mainly interested in the DTMF events.

--Clove
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe