X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fconfigfile.h;h=5a719a421a66a25df0073d6bdc4f24e8cbe9ebac;hb=5de561cbf87704310ce6d26499132c9285bd7a33;hp=b44a738c8beb00eb8fde547ae994a2277b0a7808;hpb=9cb2694409620ae217ede92f78fe45c9eba83504;p=collectd.git diff --git a/src/configfile.h b/src/configfile.h index b44a738c..5a719a42 100644 --- a/src/configfile.h +++ b/src/configfile.h @@ -121,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) */