aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-09-02 17:28:40 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-09-05 12:25:32 +0200
commit56cb7299071c8472a240a293036be3074f3eb4e0 (patch)
tree062373e9fa982a75bd088584360e65806baac230 /openbsc/include/openbsc
parent0169971a59e9822c094e82f3e4a28f2763ea0f34 (diff)
bsc: Add a "IPA PING" to the SCCP CR messages
We want to reduce the background traffic and might set the ping interval to be in the range of minutes. But this means that if the TCP connection is frozen several "SCCP CR CM Service Requests" will be stuck in the send queue without ever being answered. I could have used the logic of not receiving the "SCCP CC" to close the connection but instead I am introducing an overload to schedule the ping as part of the normal SCCP connection establishment. The VTY write case has been manually verified, I have also looked at a single trace to see that the SCCP CR and the IPA PING is transfered in the same ethernet frame.
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r--openbsc/include/openbsc/osmo_bsc.h5
-rw-r--r--openbsc/include/openbsc/osmo_msc_data.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/osmo_bsc.h b/openbsc/include/openbsc/osmo_bsc.h
index cd4e4deb9..19b879f56 100644
--- a/openbsc/include/openbsc/osmo_bsc.h
+++ b/openbsc/include/openbsc/osmo_bsc.h
@@ -27,6 +27,9 @@ struct osmo_bsc_sccp_con {
uint16_t cic;
int rtp_port;
+ /* for advanced ping/pong */
+ int send_ping;
+
/* SCCP connection realted */
struct sccp_connection *sccp;
struct osmo_msc_data *msc;
@@ -45,7 +48,7 @@ struct bsc_api *osmo_bsc_api();
int bsc_queue_for_msc(struct osmo_bsc_sccp_con *conn, struct msgb *msg);
int bsc_open_connection(struct osmo_bsc_sccp_con *sccp, struct msgb *msg);
enum bsc_con bsc_create_new_connection(struct gsm_subscriber_connection *conn,
- struct osmo_msc_data *msc);
+ struct osmo_msc_data *msc, int send_ping);
int bsc_delete_connection(struct osmo_bsc_sccp_con *sccp);
struct osmo_msc_data *bsc_find_msc(struct gsm_subscriber_connection *conn, struct msgb *);
diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h
index 9c312ca8d..add561c0b 100644
--- a/openbsc/include/openbsc/osmo_msc_data.h
+++ b/openbsc/include/openbsc/osmo_msc_data.h
@@ -63,6 +63,7 @@ struct osmo_msc_data {
int pong_timeout;
struct osmo_timer_list ping_timer;
struct osmo_timer_list pong_timer;
+ int advanced_ping;
struct bsc_msc_connection *msc_con;
int core_ncc;
int core_mcc;
@@ -115,6 +116,7 @@ struct osmo_bsc_data {
int osmo_bsc_msc_init(struct osmo_msc_data *msc);
int osmo_bsc_sccp_init(struct gsm_network *gsmnet);
int msc_queue_write(struct bsc_msc_connection *conn, struct msgb *msg, int proto);
+int msc_queue_write_with_ping(struct bsc_msc_connection *, struct msgb *msg, int proto);
int osmo_bsc_audio_init(struct gsm_network *network);