Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Vladishev <aleksander.vladishev@zabbix.com>2013-02-27 12:41:40 +0400
committerAlexander Vladishev <aleksander.vladishev@zabbix.com>2013-02-27 12:41:40 +0400
commitdc66924a0304843034f5489fa520ee0f93fbfff4 (patch)
tree73ca8d96834a77a96d59064b608996c8d48a3972 /include/module.h
parent79468b7ac5db71f1334ddb1cfabe03f15d9c5d7d (diff)
...G...... [ZBXNEXT-1550] moving some defines and structures to module.h
Diffstat (limited to 'include/module.h')
-rw-r--r--include/module.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/module.h b/include/module.h
index ab052205ae7..af20d5e2826 100644
--- a/include/module.h
+++ b/include/module.h
@@ -20,6 +20,8 @@
#ifndef ZABBIX_MODULE_H
#define ZABBIX_MODULE_H
+#include "zbxtypes.h"
+
#define ZBX_MODULE_OK 0
#define ZBX_MODULE_FAIL -1
@@ -27,6 +29,20 @@
#define get_rparam(request, num) (request->nparam > num ? request->params[num] : NULL)
+/* flags for command */
+#define CF_HAVEPARAMS 0x01 /* item accepts either optional or mandatory parameters */
+#define CF_MODULE 0x02 /* item is defined in a loadable module */
+#define CF_USERPARAMETER 0x04 /* item is defined as user parameter */
+
+typedef struct
+{
+ char *key;
+ unsigned flags;
+ int (*function)();
+ char *test_param; /* item test parameters; user parameter items keep command here */
+}
+ZBX_METRIC;
+
/* agent request structure */
typedef struct
{
@@ -90,4 +106,7 @@ AGENT_RESULT;
(res)->msg = (char *)(val) \
)
+#define SYSINFO_RET_OK 0
+#define SYSINFO_RET_FAIL 1
+
#endif