summaryrefslogtreecommitdiffstats
path: root/include/sysinfo.h
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-10-27 14:53:50 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-10-27 14:53:50 +0000
commit6428289e52e3d49d04f46440334becdb4dd50eb7 (patch)
tree76c5bd74e671b0951fac6850cebbd67da6866e6c /include/sysinfo.h
parentbf1417f0196f1ada1616e1e53e04a55117dc06d4 (diff)
downloadzabbix-6428289e52e3d49d04f46440334becdb4dd50eb7.tar.gz
zabbix-6428289e52e3d49d04f46440334becdb4dd50eb7.tar.xz
zabbix-6428289e52e3d49d04f46440334becdb4dd50eb7.zip
- developed new interface for test functions. Result returns with srtuct. (Eugene)
- recreated process() function. (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2227 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include/sysinfo.h')
-rw-r--r--include/sysinfo.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/include/sysinfo.h b/include/sysinfo.h
index 23419398..f594afbf 100644
--- a/include/sysinfo.h
+++ b/include/sysinfo.h
@@ -30,17 +30,34 @@
#define ZBX_METRIC struct zbx_metric_type
ZBX_METRIC
{
- char *key;
- int (*function)();
- int (*function_str)();
- char *parameter;
+ char *key;
+ unsigned flags;
+ int (*function)();
+ char *main_param;
+ char *test_param;
};
-int process(char *command, char *value, int test);
+/* flags for command */
+#define CF_USEUPARAM 1 /* use user param */
+
+/* flags for process */
+
+#define PF_TEST 1
+
+int process(const char *in_command, unsigned flags, AGENT_RESULT *result);
void init_metrics();
void add_user_parameter(char *key,char *command);
void test_parameters(void);
-int getPROC(char *file,int lineno,int fieldno, double *value, const char *msg, int mlen_max);
+
+int check_ntp(char *host, int port, int *value_int);
+
+int get_stat(const char *key, unsigned flags, AGENT_RESULT *result);
+
+#ifdef HAVE_PROC
+int getPROC(char *file, int lineno, int fieldno, unsigned flags, AGENT_RESULT *result);
+#endif
+
+char *zbx_regexp_match(const char *string, char *pattern, int *len);
#endif