aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-29 02:38:39 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-29 02:55:05 +0800
commit7947b6be88a74c22968b3cb73edb93dfae379b38 (patch)
treec7951932a470ae50de6b2f8294cbfac51d3f348d /openbsc/include/openbsc
parent175a7b42afa8889077603a97e98b7c928fa85518 (diff)
mgcp: Attempt to count missing RTP packets with a basic calculation
This code compares the UDP sequence numbers of two RTP messages and guesses if packets are missing. It is guessing in two ways: 1.) by default the sequence number is 0, so on the first value we ignore the jump... we might ignore a real issue in case of a wrap around which is easily possible as the sequence should be a random number. 2.) the UDP stream might have been reordered on the network and we would see the jump... In any case these two shortcomings are acceptable for the feature that is meant to provide some basic analysis..
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r--openbsc/include/openbsc/mgcp_internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h
index d5aec3080..918ba4b2f 100644
--- a/openbsc/include/openbsc/mgcp_internal.h
+++ b/openbsc/include/openbsc/mgcp_internal.h
@@ -61,6 +61,12 @@ struct mgcp_endpoint {
/* statistics */
unsigned int in_bts;
unsigned int in_remote;
+
+ /* sequence bits */
+ uint16_t net_seq_no;
+ uint16_t bts_seq_no;
+ int net_lost_no;
+ int bts_lost_no;
};
#define ENDPOINT_NUMBER(endp) abs(endp - endp->cfg->endpoints)