aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/bsc_nat.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-10-24 21:53:40 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-04-16 09:17:21 +0200
commit462b7d7158937b51fbb833ea3066e01fe8322f37 (patch)
tree9588a91447f6496c36ea815af62fbc48721061b0 /openbsc/include/openbsc/bsc_nat.h
parentc327187259d74cf260c977f165963778de4bedb1 (diff)
nat: We want the remote to respond to our DLCX request
We want to send a TRAP with the MGCP statistics from the NAT and the connected BSC. The BSC endpoint can be either released because of a DLCX from the MGCP CallAgent or the SCCP Connection release on the A-link. This is why we need to queue the statistics when the deleting the endpoint on the BSC. The processing is continued once the response arrives. This code assumes that the response of the DLCX will be sent by the remote side. The current amount of outstanding responses can be seen on the VTY. This assumption is based on the fact that the BSC has already responded to the CRCX and maybe to the MDCX. The MGCP RFC is bended to prefix the transaction identifier with "nat-" to easily detect the response and hand it to the handler. This will then parse the response and generate the TRAP. The current version is v1. We assume that the transaction space is big enough and we will not re-assign the transaction identifier too early.
Diffstat (limited to 'openbsc/include/openbsc/bsc_nat.h')
-rw-r--r--openbsc/include/openbsc/bsc_nat.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index 4baaa8280..6860342a0 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -32,6 +32,7 @@
#include <osmocom/core/rate_ctr.h>
#include <osmocom/core/statistics.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
+#include <osmocom/sccp/sccp_types.h>
#include <regex.h>
@@ -111,6 +112,9 @@ struct bsc_connection {
int number_multiplexes;
int max_endpoints;
int last_endpoint;
+ int next_transaction;
+ uint32_t pending_dlcx_count;
+ struct llist_head pending_dlcx;
/* track the pending commands for this BSC */
struct llist_head cmd_pending;
@@ -332,6 +336,33 @@ struct bsc_nat_ussd_con {
struct osmo_timer_list auth_timeout;
};
+struct bsc_nat_call_stats {
+ struct llist_head entry;
+
+ struct sccp_source_reference remote_ref;
+ struct sccp_source_reference src_ref; /* as seen by the MSC */
+
+ /* mgcp options */
+ uint32_t ci;
+ int bts_rtp_port;
+ int net_rtp_port;
+ struct in_addr bts_addr;
+ struct in_addr net_addr;
+
+
+ /* as witnessed by the NAT */
+ uint32_t net_ps;
+ uint32_t net_os;
+ uint32_t bts_pr;
+ uint32_t bts_or;
+ uint32_t bts_expected;
+ uint32_t bts_jitter;
+ int bts_loss;
+
+ uint32_t trans_id;
+ int msc_endpoint;
+};
+
struct bsc_nat_reject_cause {
int lu_reject_cause;
int cm_reject_cause;