aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-07-22 17:55:42 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-09-11 12:52:23 +0200
commit6fc4a98fc5250d009a65d5fa079904400a3ded3d (patch)
tree0ea250b3d72f6336ed77e84ef1d7a9839142b479 /openbsc/include
parentf3b31eb34978d35011ff46edaf40c1a151604197 (diff)
libctrl: Change controlif_setup so it returns the ctrl handle
nat: Catch up with controlif_setup API change We now save a control handle reference in the nat osmo-bsc: Catch up with controlif_setup API change We now save a control handle reference in the gsm network
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/bsc_nat.h3
-rw-r--r--openbsc/include/openbsc/control_cmd.h1
-rw-r--r--openbsc/include/openbsc/control_if.h10
-rw-r--r--openbsc/include/openbsc/gsm_data.h3
4 files changed, 15 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index df3841e6b..abf32fc91 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -314,6 +314,9 @@ struct bsc_nat {
/* statistics */
struct bsc_nat_statistics stats;
+
+ /* control interface */
+ struct ctrl_handle *ctrl;
};
struct bsc_nat_ussd_con {
diff --git a/openbsc/include/openbsc/control_cmd.h b/openbsc/include/openbsc/control_cmd.h
index 2a5391f5f..a3f74b48a 100644
--- a/openbsc/include/openbsc/control_cmd.h
+++ b/openbsc/include/openbsc/control_cmd.h
@@ -150,6 +150,5 @@ struct ctrl_cmd_element cmd_##cmdname = { \
}
struct gsm_network;
-int controlif_setup(struct gsm_network *gsmnet, uint16_t port);
#endif /* _CONTROL_CMD_H */
diff --git a/openbsc/include/openbsc/control_if.h b/openbsc/include/openbsc/control_if.h
index 96fbf6bff..6afc86d76 100644
--- a/openbsc/include/openbsc/control_if.h
+++ b/openbsc/include/openbsc/control_if.h
@@ -5,9 +5,17 @@
#include <openbsc/control_cmd.h>
#include <openbsc/gsm_data.h>
+struct ctrl_handle {
+ struct osmo_fd listen_fd;
+ struct gsm_network *gsmnet;
+
+ /* List of control connections */
+ struct llist_head ccon_list;
+};
+
int ctrl_cmd_send(struct osmo_wqueue *queue, struct ctrl_cmd *cmd);
int ctrl_cmd_handle(struct ctrl_cmd *cmd, void *data);
-int controlif_setup(struct gsm_network *gsmnet, uint16_t port);
+struct ctrl_handle *controlif_setup(struct gsm_network *gsmnet, uint16_t port);
#endif /* _CONTROL_IF_H */
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 572f8f53b..dea411984 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -266,6 +266,9 @@ struct gsm_network {
/* subscriber related features */
int keep_subscr;
struct gsm_sms_queue *sms_queue;
+
+ /* control interface */
+ struct ctrl_handle *ctrl;
};
#define SMS_HDR_SIZE 128