Wireshark-users: [Wireshark-users] Round trip delay- negative??
Date: Fri, 16 Mar 2007 17:43:34 +0530
Hi all,

    I am having some problems calculating the round-trip-delay of an RTCP Sender Report packet.
I have a method to calculate the round trip delay for a Sender Report, but sometimes it gives me the round trip delay to be a negative number.

Could someone please help me out if the method I use to calculate round-trip-delay is correct or not?
And if it is correct, why do I get the round-trip as negative?

A packet has the following specifications:

Timestamp, MSW: 8509 (0x0000213d)
Timestamp, LSW: 1317011456 (0x4e800000)
Last SR timestamp: 556982720 (0x2132e1c0)
Delay since last SR timestamp: 308288

What I do:

Round trip delay = Arrival time- LSR - DLSR
                         = (NTP MSW + NTP LSW) - (LSR MSW + LSR LSW) - DLSR
                         = (NTP MSW - LSR MSW) + (NTP LSW - LSR LSW) - DLSR

>From the data given :

(NTP MSW - LSR MSW) = 0x0000213d - 0x002132 = B = 11 D (in seconds)

(NTP LSW - LSR LSW) = 0x4e800000 - 0xe1c0000 = -2470445056 D

I assume that the unit of NTP LSW is in nanoseconds (or is it  232 picoseconds??).

So (NTP LSW - LSR LSW) = -2.4 seconds

DLSR = 308288/65535 seconds = 4.7 seconds

Therefore, RTD = 11 - 2.4 - 4.7 = 3.896 seconds

Please correct me if I am wrong in the above procedure to calculate RTD.

Now there is a packet which has the following specifications:

Timestamp, MSW: 8505 (0x00002139)
Timestamp, LSW: 1065353216 (0x3f800000)
Last SR timestamp: 557665920 (0x213d4e80)
Delay since last SR timestamp: 108992


So here:

(NTP MSW - LSR MSW) = 0x00002139 - 0x0000213d
                                           = -4

So what is the cause of a negative RTD??

I am really sorry if I appear to be dumb but I would also like to know how the inter arrival jitter is calculated?
I know how to calculate jitter in seconds but the unit of jitter as specified in the RTCP packet appears to be something else.

Thanks in advance