aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-06 00:22:06 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-06 00:22:06 +0700
commit99d5c2d721ed3b4b12e32fcd4ad1770359825ef1 (patch)
tree80efc283e1b573b7670dbd8026a363ba7e36603e /include
parentceb3b394404540684f448d8edb43a9550f044def (diff)
vty/command: add CMD_ATTR_LIB_COMMAND and install() API wrappers
This new attribute would allow to distinguish commands provided by libraries from commands registered by the application itself, so vty_dump_element() would print proper description for the library specific attributes. All VTY commands defined by the libraries need to use the new API: - install_lib_element(), and - install_lib_element_ve, instead of the old functions (respectively): - install_element(), and - install_element_ve(). See https://lists.osmocom.org/pipermail/openbsc/2020-October/013278.html. Change-Id: I8baf31ace93c536421893c2aa4e3d9d298dcbcc6 Related: SYS#4937
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/vty/command.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h
index f558bb10..49f0bfe5 100644
--- a/include/osmocom/vty/command.h
+++ b/include/osmocom/vty/command.h
@@ -139,6 +139,7 @@ enum {
CMD_ATTR_HIDDEN = (1 << 1),
CMD_ATTR_IMMEDIATE = (1 << 2),
CMD_ATTR_NODE_EXIT = (1 << 3),
+ CMD_ATTR_LIB_COMMAND = (1 << 4),
};
/*! Structure of a command element */
@@ -397,7 +398,9 @@ struct desc {
void install_node(struct cmd_node *, int (*)(struct vty *));
void install_default(int node_type) OSMO_DEPRECATED("Now happens implicitly with install_node()");
void install_element(int node_type, struct cmd_element *);
+void install_lib_element(int node_type, struct cmd_element *);
void install_element_ve(struct cmd_element *cmd);
+void install_lib_element_ve(struct cmd_element *cmd);
void sort_node(void);
void vty_install_default(int node_type) OSMO_DEPRECATED("Now happens implicitly with install_node()");