diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-10-04 18:37:13 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-10-06 00:22:26 +0700 |
commit | c0745ebc28b88bf78de59f4fbcd95efbd4e8d10b (patch) | |
tree | d786c335c38a86259508f369f449a43f5e8d8e76 /include/osmocom/vty | |
parent | 8e7c49649e68539373c9db3ac46e18623e186de6 (diff) |
vty/command: introduce API for the library specific attributes
See https://lists.osmocom.org/pipermail/openbsc/2020-October/013278.html.
Change-Id: I15184569635b3ef7dfe9eeddcc19bf16cc358f66
Related: SYS#4937
Diffstat (limited to 'include/osmocom/vty')
-rw-r--r-- | include/osmocom/vty/command.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h index 49f0bfe5..07ec2425 100644 --- a/include/osmocom/vty/command.h +++ b/include/osmocom/vty/command.h @@ -142,6 +142,21 @@ enum { CMD_ATTR_LIB_COMMAND = (1 << 4), }; +/*! Attributes shared between libraries (up to 32 entries). */ +enum { + /* The entries of this enum shall conform the following requirements: + * 1. Naming format: 'OSMO_' + <LIBNAME> + '_LIB_ATTR_' + <ATTRNAME>, + * where LIBNAME is a short name of the library, e.g. 'ABIS', 'MGCP', + * and ATTRNAME is a brief name of the attribute, e.g. RTP_CONN_EST; + * for example: 'OSMO_ABIS_LIB_ATTR_RSL_LINK_UP'. + * 2. Brevity: shortenings and abbreviations are welcome! + * 3. Values are not flags but indexes, unlike CMD_ATTR_*. + * 4. Ordering: new entries added before _OSMO_CORE_LIB_ATTR_COUNT. */ + + /* Keep this floating entry last, it's needed for count check. */ + _OSMO_CORE_LIB_ATTR_COUNT +}; + /*! Structure of a command element */ struct cmd_element { const char *string; /*!< Command specification by string. */ |