+static int ident_to_rrdfile (const graph_ident_t *ident,
+ dp_rrdtool_t *config,
+ char *buffer, size_t buffer_size)
+{
+ const char *plugin_instance;
+ const char *type_instance;
+
+ plugin_instance = ident_get_plugin_instance (ident);
+ if ((plugin_instance != NULL) && (plugin_instance[0] == 0))
+ plugin_instance = NULL;
+
+ type_instance = ident_get_type_instance (ident);
+ if ((type_instance != NULL) && (type_instance[0] == 0))
+ type_instance = NULL;
+
+ buffer[0] = 0;
+
+ strlcat (buffer, config->data_dir, buffer_size);
+ strlcat (buffer, "/", buffer_size);
+
+ strlcat (buffer, ident_get_host (ident), buffer_size);
+ strlcat (buffer, "/", buffer_size);
+ strlcat (buffer, ident_get_plugin (ident), buffer_size);
+ if (plugin_instance != NULL)
+ {
+ strlcat (buffer, "-", buffer_size);
+ strlcat (buffer, plugin_instance, buffer_size);
+ }
+ strlcat (buffer, "/", buffer_size);
+ strlcat (buffer, ident_get_type (ident), buffer_size);
+ if (type_instance != NULL)
+ {
+ strlcat (buffer, "-", buffer_size);
+ strlcat (buffer, type_instance, buffer_size);
+ }
+
+ strlcat (buffer, ".rrd", buffer_size);
+
+ return (0);
+} /* }}} int ident_to_rrdfile */
+
+/*
+ * Callback functions
+ */