aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/control_cmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/include/openbsc/control_cmd.h')
-rw-r--r--openbsc/include/openbsc/control_cmd.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/control_cmd.h b/openbsc/include/openbsc/control_cmd.h
index 8aede15df..a87c469a8 100644
--- a/openbsc/include/openbsc/control_cmd.h
+++ b/openbsc/include/openbsc/control_cmd.h
@@ -172,6 +172,20 @@ static struct ctrl_cmd_element cmd_##cmdname = { \
.verify = &verify_##cmdname, \
}
+#define CTRL_CMD_DEFINE_RO(cmdname, cmdstr) \
+static int get_##cmdname(struct ctrl_cmd *cmd, void *data); \
+static int set_##cmdname(struct ctrl_cmd *cmd, void *data) \
+{ \
+ cmd->reply = "Read Only attribute"; \
+ return CTRL_CMD_ERROR; \
+} \
+static int verify_##cmdname(struct ctrl_cmd *cmd, const char *value, void *data) \
+{ \
+ cmd->reply = "Read Only attribute"; \
+ return 1; \
+} \
+CTRL_CMD_DEFINE(cmdname, cmdstr)
+
struct gsm_network;
#endif /* _CONTROL_CMD_H */