diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-03-23 16:25:16 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-03-23 16:25:16 +0100 |
commit | 49f9e5b6b42cae9f6083e5c69c70af0b29b15b23 (patch) | |
tree | 544aefa178f61484e1233ffbf83c02d43db30ec1 /openbsc/include/openbsc | |
parent | d883db027bb75cb4299a733d005de6ff6a1f426c (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/openbsc')
-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 cd7b7b6d3..725dce061 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 6afc86d76..d103332a9 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 */ |