aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/bsc_init.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-06-13 09:41:58 +0200
committerHarald Welte <laforge@gnumonks.org>2019-09-02 12:06:25 +0200
commitd41b7c7f830e90c7c4ce1d8ed97f13cfd3ed8cad (patch)
tree7a8a53f81cd42f34c8c761ef5c8bbd7a05a9944c /src/osmo-bsc/bsc_init.c
parent9508e2232f72a368ab87b5903e0764c4ae4985ad (diff)
Cell Broadcast: CBSP and CBCH scheduling support
This adds code to handle CBSP (Cell Broadcast Service Protocol) from the CBC (Cell Broadcast Centre), as well as BSC-internal data structures for scheduling the various SMSCB on the CBCH of each BTS. There are currently one known shortcoming in the code: We don't yet verify if keepalives are received within repetition period. Change-Id: Ia0a0de862a104d0f447a5d6e56c7c83981b825c7
Diffstat (limited to 'src/osmo-bsc/bsc_init.c')
-rw-r--r--src/osmo-bsc/bsc_init.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/osmo-bsc/bsc_init.c b/src/osmo-bsc/bsc_init.c
index 7d29d4fbe..18776f33d 100644
--- a/src/osmo-bsc/bsc_init.c
+++ b/src/osmo-bsc/bsc_init.c
@@ -37,6 +37,9 @@
#include <osmocom/bsc/gsm_04_08_rr.h>
#include <osmocom/bsc/neighbor_ident.h>
+#include <osmocom/bsc/smscb.h>
+#include <osmocom/gsm/protocol/gsm_48_049.h>
+
#include <time.h>
#include <limits.h>
#include <stdbool.h>
@@ -244,6 +247,11 @@ static struct gsm_network *bsc_network_init(void *ctx)
talloc_free(net);
return NULL;
}
+ net->bsc_data->cbc = talloc_zero(net->bsc_data, struct bsc_cbc_link);
+ if (!net->bsc_data->cbc) {
+ talloc_free(net);
+ return NULL;
+ }
/* Init back pointer */
net->bsc_data->auto_off_timeout = -1;
@@ -272,6 +280,13 @@ static struct gsm_network *bsc_network_init(void *ctx)
osmo_timer_setup(&net->t3122_chan_load_timer, update_t3122_chan_load_timer, net);
osmo_timer_schedule(&net->t3122_chan_load_timer, T3122_CHAN_LOAD_SAMPLE_INTERVAL, 0);
+ net->bsc_data->cbc->net = net;
+ /* no cbc_hostname: client not started by default */
+ net->bsc_data->cbc->config.cbc_port = CBSP_TCP_PORT;
+ /* listen_port == -1: server not started by default */
+ net->bsc_data->cbc->config.listen_port = -1;
+ net->bsc_data->cbc->config.listen_hostname = talloc_strdup(net->bsc_data->cbc, "127.0.0.1");
+
return net;
}