diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-03-23 16:25:16 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2014-08-21 15:34:16 +0200 |
commit | ea62a38b5d770f31e3d3cc635c52d4854f585fb3 (patch) | |
tree | 05c852b02045b9b1c2efd34dfbfa914efa2bbe89 /openbsc/include | |
parent | 416e316564ef7cba2b76f1cf5fc81bc76fba8ecf (diff) |
ctrl: Move the lookup into a separate file in preparation for GPRS
For GPRS the look-up via bts/trx does not make any sense and would
introduce bad depdencies for the SGSN. Move the look-up code to a
new file and introduce new setup methods.
Diffstat (limited to 'openbsc/include')
-rw-r--r-- | openbsc/include/openbsc/control_cmd.h | 1 | ||||
-rw-r--r-- | openbsc/include/openbsc/control_if.h | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/openbsc/include/openbsc/control_cmd.h b/openbsc/include/openbsc/control_cmd.h index cd7b7b6d..725dce06 100644 --- a/openbsc/include/openbsc/control_cmd.h +++ b/openbsc/include/openbsc/control_cmd.h @@ -77,7 +77,6 @@ struct ctrl_cmd_map { int ctrl_cmd_exec(vector vline, struct ctrl_cmd *command, vector node, void *data); int ctrl_cmd_install(enum ctrl_node_type node, struct ctrl_cmd_element *cmd); -int ctrl_cmd_handle(struct ctrl_cmd *cmd, void *data); int ctrl_cmd_send(struct osmo_wqueue *queue, struct ctrl_cmd *cmd); int ctrl_cmd_send_to_all(struct ctrl_handle *ctrl, struct ctrl_cmd *cmd); struct ctrl_cmd *ctrl_cmd_parse(void *ctx, struct msgb *msg); diff --git a/openbsc/include/openbsc/control_if.h b/openbsc/include/openbsc/control_if.h index 6afc86d7..d103332a 100644 --- a/openbsc/include/openbsc/control_if.h +++ b/openbsc/include/openbsc/control_if.h @@ -5,17 +5,25 @@ #include <openbsc/control_cmd.h> #include <openbsc/gsm_data.h> +typedef int (*ctrl_cmd_handler)(struct ctrl_cmd *, void *); + struct ctrl_handle { struct osmo_fd listen_fd; struct gsm_network *gsmnet; + ctrl_cmd_handler handler; + /* 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); -struct ctrl_handle *controlif_setup(struct gsm_network *gsmnet, uint16_t port); +struct ctrl_handle *controlif_setup(struct gsm_network *, uint16_t port, + ctrl_cmd_handler handler); +struct ctrl_handle *bsc_controlif_setup(struct gsm_network *gsmnet, uint16_t port); + +int bsc_ctrl_cmd_handle(struct ctrl_cmd *cmd, void *data); #endif /* _CONTROL_IF_H */ |