Wireshark-dev: Re: [Wireshark-dev] RTP packet dissection in C#
From: Robert Clove <cloverobert@xxxxxxxxx>
Date: Fri, 17 Nov 2017 21:39:11 +0530
i didnt know things so thought to ask as you all are much experienced and knowledgeable
On Fri, Nov 17, 2017 at 9:32 PM, Richard Sharpe <realrichardsharpe@xxxxxxxxx> wrote:
On Fri, Nov 17, 2017 at 7:40 AM, Robert Clove <cloverobert@xxxxxxxxx> wrote:
> 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
Are you asking for help with your homework?
--
> 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:
>>
>> https://code.wireshark.org/review/gitweb?p=wireshark.git; a=blob;f=epan/dissectors/ packet-rtp-events.c;hb=HEAD
>>
>> 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@wireshark.org ?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
>
>
>
> ____________________________________________________________ _______________
> 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
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
____________________________________________________________ _______________
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
- References:
- [Wireshark-dev] RTP packet dissection in C#
- From: Robert Clove
- Re: [Wireshark-dev] RTP packet dissection in C#
- From: Jaap Keuter
- Re: [Wireshark-dev] RTP packet dissection in C#
- From: Robert Clove
- Re: [Wireshark-dev] RTP packet dissection in C#
- From: Richard Sharpe
- [Wireshark-dev] RTP packet dissection in C#
- Prev by Date: Re: [Wireshark-dev] RTP packet dissection in C#
- Next by Date: Re: [Wireshark-dev] RTP packet dissection in C#
- Previous by thread: Re: [Wireshark-dev] RTP packet dissection in C#
- Next by thread: Re: [Wireshark-dev] RTP packet dissection in C#
- Index(es):