8aa1a53bec98618410f934226166859615394d3b
[collection4.git] / common.h
1 #ifndef COMMON_H
2 #define COMMON_H 1
3
4 #define DATA_DIR "/var/lib/collectd/rrd"
5
6 #include "graph_list.h"
7
8 typedef int (*callback_type_t)   (const char *type,   void *user_data);
9 typedef int (*callback_plugin_t) (const char *plugin, void *user_data);
10 typedef int (*callback_host_t)   (const char *host,   void *user_data);
11
12 int foreach_type (const char *host, const char *plugin,
13     callback_type_t, void *user_data);
14 int foreach_plugin (const char *host, callback_plugin_t, void *user_data);
15 int foreach_host (callback_host_t, void *user_data);
16
17 size_t c_strlcat (char *dst, const char *src, size_t size);
18 #define strlcat c_strlcat
19
20 int ds_list_from_rrd_file (char *file,
21     size_t *ret_dses_num, char ***ret_dses);
22
23 #endif /* COMMON_H */
24 /* vim: set sw=2 sts=2 et fdm=marker : */