aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2023-03-01 13:21:14 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2023-03-20 10:44:22 +0100
commit0625172265d3cbd40effe64abf630c06a50f6679 (patch)
tree3c5dc5960d38f3b51a0e4ad9a299c76d80e3c9fc /include
parent10ae64a777e0b935be400bf2f6df4f5b5916f3af (diff)
pcu_sock: handle multiple BTSs with one BSC co-located PCU (in theory)
The current PCU implementation has never been tested with multiple BTS attached to it. This is due to the fact that it has been used exclusively in an BTS co-located setup where naturally only one BTS is present. The PCU sock protocol supports multiple BTSs in theory and we should handle this correctly. Related: OS#5198 Change-Id: I0b42c2c130106f6ffca2dd08d079e1a7bda41f0b
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/bsc/bts.h4
-rw-r--r--include/osmocom/bsc/gsm_data.h4
-rw-r--r--include/osmocom/bsc/pcu_if.h8
3 files changed, 8 insertions, 8 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index ccca1860f..20ed0893b 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -600,10 +600,6 @@ struct gsm_bts {
/* osmux config: */
enum osmux_usage use_osmux;
- /* PCU socket state */
- char *pcu_sock_path;
- struct pcu_sock_state *pcu_state;
-
struct rate_ctr_group *bts_ctrs;
struct osmo_stat_item_group *bts_statg;
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 25e634ab8..777944908 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1003,6 +1003,10 @@ struct gsm_network {
struct chan_counts chan_counts;
struct all_allocated all_allocated;
+
+ /* PCU socket state */
+ char *pcu_sock_path;
+ struct pcu_sock_state *pcu_state;
};
struct gsm_audio_support {
diff --git a/include/osmocom/bsc/pcu_if.h b/include/osmocom/bsc/pcu_if.h
index 2a2afa869..34349dc22 100644
--- a/include/osmocom/bsc/pcu_if.h
+++ b/include/osmocom/bsc/pcu_if.h
@@ -8,14 +8,14 @@ extern int pcu_direct;
#define PCUIF_HDR_SIZE (sizeof(struct gsm_pcu_if) - sizeof(((struct gsm_pcu_if *)0)->u))
struct pcu_sock_state {
- struct gsm_network *net;
+ struct gsm_network *net; /* backpointer to GSM network */
struct osmo_fd listen_bfd; /* fd for listen socket */
struct osmo_fd conn_bfd; /* fd for connection to lcr */
struct llist_head upqueue; /* queue for sending messages */
};
/* Check if BTS has a PCU connection */
-bool pcu_connected(struct gsm_bts *bts);
+bool pcu_connected(struct gsm_network *net);
/* PCU relevant information has changed; Inform PCU (if connected) */
void pcu_info_update(struct gsm_bts *bts);
@@ -32,9 +32,9 @@ int pcu_tx_imm_ass_sent(struct gsm_bts *bts, uint32_t tlli);
int pcu_tx_imm_ass_sent(struct gsm_bts *bts, uint32_t tlli);
/* Open connection to PCU */
-int pcu_sock_init(const char *path, struct gsm_bts *bts);
+int pcu_sock_init(struct gsm_network *net);
/* Close connection to PCU */
-void pcu_sock_exit(struct gsm_bts *bts);
+void pcu_sock_exit(struct gsm_network *net);
#endif /* _PCU_IF_H */