aboutsummaryrefslogtreecommitdiff
path: root/lib/utils_base.h
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2009-01-19 22:14:03 -0500
committerGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2009-01-21 01:27:40 -0500
commita4647be424c9350ab967eeacccd2761c71f9c6a9 (patch)
tree065729e41f68f4e101a8089574216ec62ce9d2b3 /lib/utils_base.h
parent81871eaa82bd0ca1c4a3ea8781bd8bf095073fd0 (diff)
downloadmonitoring-plugins-a4647be424c9350ab967eeacccd2761c71f9c6a9.tar.gz
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.
Diffstat (limited to 'lib/utils_base.h')
-rw-r--r--lib/utils_base.h8
1 files changed, 8 insertions, 0 deletions
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_ */