X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fconfigfile.h;fp=src%2Fconfigfile.h;h=fbeafff8b956b01451b3fc714ec3107305ca1577;hb=d0efcb2eda3317f1b2f8da154a8722cdef03159a;hp=e63a0ea047533257bde40be867bc0394060a884f;hpb=f394c087e9b022cde2c946f4f83cb21933e57a67;p=collectd.git diff --git a/src/configfile.h b/src/configfile.h index e63a0ea0..fbeafff8 100644 --- a/src/configfile.h +++ b/src/configfile.h @@ -116,6 +116,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) */