# HG changeset patch # User Mychaela Falconia # Date 1672090509 0 # Node ID 75607bc26f57975b9d35d859173b0cd5f17e892f # Parent b9af126bfddb3d64cde051685b89a26f0074eac3 rtp-cont-check design change: print time deltas instead of checking against arbitrary thresholds diff -r b9af126bfddb -r 75607bc26f57 pcap/rtp-cont-check.c --- a/pcap/rtp-cont-check.c Mon Dec 26 21:24:00 2022 +0000 +++ b/pcap/rtp-cont-check.c Mon Dec 26 21:35:09 2022 +0000 @@ -1,10 +1,12 @@ /* * This program reads a pcap file, extracts packets belonging to a * particular RTP stream as identified by a source or destination - * IP:port, and checks its continuity: verifies that all sequence - * numbers and timestamps increase monotonously without breaks, - * and that the time delta between each consecutive pair of packets - * is within GSM TCH multiframe jitter bounds of 20 ms. + * IP:port, and checks its continuity: verifies that the sequence + * number always increments by 1 and that the timestamp always + * increments by 160 units. Finally, this program prints out + * the Rx time delta of each stream packet (the capture time of + * the current packet minus the capture time of the previous packet) + * on stdout, allowing visual timing analysis. * * The codec can be anything, and this program can also be used to * check continuity of RTP streams coming from PSTN/SIP, but the @@ -32,10 +34,6 @@ static unsigned last_seq, last_tstamp, stream_ssrc; static struct timeval last_pkt_time; -/* usec jitter thresholds around 20 ms ideal */ -#define DELTAT_MIN 18450 -#define DELTAT_MAX 23090 - static void check_dl_type() { @@ -107,18 +105,8 @@ pkt_idx); exit(1); } - if (deltat.tv_usec > DELTAT_MAX) { - fprintf(stderr, -"packet #%u timing error: Rx time delta of %u us is above max threshold\n", - pkt_idx, (unsigned) deltat.tv_usec); - exit(1); - } - if (deltat.tv_usec < DELTAT_MIN) { - fprintf(stderr, -"packet #%u timing error: Rx time delta of %u us is below min threshold\n", - pkt_idx, (unsigned) deltat.tv_usec); - exit(1); - } + printf("Packet #%u: time delta %u us\n", pkt_idx, + (unsigned) deltat.tv_usec); } else { stream_init_flag = 1; stream_ssrc = cur_ssrc;