From a4647be424c9350ab967eeacccd2761c71f9c6a9 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Mon, 19 Jan 2009 22:14:03 -0500 Subject: Move check_ntp's extract_value to utils_base.c. This function can also be used to parse performance data strings which could be useful in the future. --- lib/utils_base.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/utils_base.h') diff --git a/lib/utils_base.h b/lib/utils_base.h index bda76595..c34f0445 100644 --- a/lib/utils_base.h +++ b/lib/utils_base.h @@ -50,4 +50,12 @@ int np_check_if_root(void); * code from the above function, in case it's helpful for testing */ int np_warn_if_not_root(void); +/* + * Extract the value from key/value pairs, or return NULL. The value returned + * can be free()ed. + * This function can be used to parse NTP control packet data and performance + * data strings. + */ +char *np_extract_value(const char*, const char*); + #endif /* _UTILS_BASE_ */ -- cgit v1.2.3