X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fconfigfile.h;h=74d074ed2fb746d7b4fe9596e7589532da966799;hp=aca58770efbdc9dbd530d06b399fd2d6510158f2;hb=7de4b3692af84751fab5ac46a5da7414346ea50b;hpb=181a5bd7000bb378a04d4488adbc96c02d520426 diff --git a/src/configfile.h b/src/configfile.h index aca58770..74d074ed 100644 --- a/src/configfile.h +++ b/src/configfile.h @@ -91,4 +91,9 @@ const char *global_option_get (const char *option); * success. */ int cf_util_get_string (const oconfig_item_t *ci, char **ret_string); +/* Assures that the config option is a string. The string is then converted to + * a port number using `service_name_to_port_number' and returned. Returns the + * port number in the range [1-65535] or less than zero upon failure. */ +int cf_util_get_port_number (const oconfig_item_t *ci); + #endif /* defined(CONFIGFILE_H) */