Code

Merge branch 'collectd-4.10' into collectd-5.2
[collectd.git] / src / configfile.h
index 59ea55428e43e9752a91c3c9e82675fc0d7ba91b..5a719a421a66a25df0073d6bdc4f24e8cbe9ebac 100644 (file)
@@ -87,6 +87,8 @@ int cf_read (char *filename);
 int global_option_set (const char *option, const char *value);
 const char *global_option_get (const char *option);
 
+cdtime_t cf_get_default_interval (void);
+
 /* Assures the config option is a string, duplicates it and returns the copy in
  * "ret_string". If necessary "*ret_string" is freed first. Returns zero upon
  * success. */
@@ -119,6 +121,12 @@ int cf_util_get_flag (const oconfig_item_t *ci,
  * failure. */
 int cf_util_get_port_number (const oconfig_item_t *ci);
 
+/* Assures that the config option is either a service name (a string) or a port
+ * number (an integer in the appropriate range) and returns a newly allocated
+ * string. If ret_string points to a non-NULL pointer, it is freed before
+ * assigning a new value. */
+int cf_util_get_service (const oconfig_item_t *ci, char **ret_string);
+
 int cf_util_get_cdtime (const oconfig_item_t *ci, cdtime_t *ret_value);
 
 #endif /* defined(CONFIGFILE_H) */