diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-01-13 14:25:16 +0100 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2023-01-17 18:16:34 +0000 |
commit | 3b8d5bb26afa1418ad5e56ba41f438f7cb3f8526 (patch) | |
tree | 5c65ebad8250167a9fb58b429172582d920007f6 /src/host/layer23/include/osmocom/bb/common | |
parent | eb654c07d28446627078cbfb5cbd9f3ceed1ed14 (diff) |
layer23: Move '(no) shutdown' VTY code to common/vty.c
Change-Id: Ib5c9b6f3efa255d67980945db9f98dd8a112af0e
Diffstat (limited to 'src/host/layer23/include/osmocom/bb/common')
-rw-r--r-- | src/host/layer23/include/osmocom/bb/common/osmocom_data.h | 23 | ||||
-rw-r--r-- | src/host/layer23/include/osmocom/bb/common/vty.h | 5 |
2 files changed, 26 insertions, 2 deletions
diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index d78edc3e..600c4121 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -1,13 +1,16 @@ #pragma once #include <stdint.h> +#include <stdbool.h> struct osmocom_ms; struct gapk_io_state; +struct vty; enum osmobb_sig_subsys { SS_L1CTL, SS_GLOBAL, + SS_L23_VTY, }; enum osmobb_l1ctl_sig { @@ -26,6 +29,26 @@ enum osmobb_global_sig { S_GLOBAL_SHUTDOWN, }; +enum osmobb_l23_vty_sig { + S_L23_VTY_MS_START, + S_L23_VTY_MS_STOP, +}; + +struct osmobb_l23_vty_sig_data { + struct vty *vty; + union { + struct { + struct osmocom_ms *ms; + int rc; /* CMD_SUCCESS/CMD_WARNING */ + } ms_start; + struct { + struct osmocom_ms *ms; + bool force; + int rc; /* CMD_SUCCESS/CMD_WARNING */ + } ms_stop; + }; +}; + struct osmobb_fbsb_res { struct osmocom_ms *ms; int8_t snr; diff --git a/src/host/layer23/include/osmocom/bb/common/vty.h b/src/host/layer23/include/osmocom/bb/common/vty.h index dd5e7f2f..f3452603 100644 --- a/src/host/layer23/include/osmocom/bb/common/vty.h +++ b/src/host/layer23/include/osmocom/bb/common/vty.h @@ -4,6 +4,7 @@ #include <osmocom/vty/vty.h> #include <osmocom/vty/buffer.h> #include <osmocom/vty/command.h> +#include <osmocom/core/signal.h> struct osmocom_ms; @@ -12,13 +13,13 @@ enum l23_vty_node { _LAST_L23VTY_NODE, }; -int l23_vty_init(int (*config_write_ms_node_cb)(struct vty *)); +int l23_vty_init(int (*config_write_ms_node_cb)(struct vty *), osmo_signal_cbfn *l23_vty_signal_cb); struct osmocom_ms *l23_vty_get_ms(const char *name, struct vty *vty); void l23_ms_dump(struct osmocom_ms *ms, struct vty *vty); void l23_vty_config_write_ms_node(struct vty *vty, const struct osmocom_ms *ms, const char *prefix); void l23_vty_config_write_ms_node_contents(struct vty *vty, const struct osmocom_ms *ms, const char *prefix); - +void l23_vty_config_write_ms_node_contents_final(struct vty *vty, const struct osmocom_ms *ms, const char *prefix); extern struct llist_head ms_list; extern struct cmd_element l23_show_ms_cmd; |