aboutsummaryrefslogtreecommitdiff
path: root/lib/utils_base.h
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2009-01-26 02:05:21 -0500
committerGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2009-01-26 02:05:21 -0500
commitba132e9e521218efc5d35aa5f7a024cba93f5e29 (patch)
tree9328162d51cc85d99cf7c18b40e3b9684a17dedf /lib/utils_base.h
parent0a74b6fda08c484cba7216596d2ffa3931b900e5 (diff)
downloadmonitoring-plugins-ba132e9e521218efc5d35aa5f7a024cba93f5e29.tar.gz
Make extract_value more generic:
Add a separator argument passed using defines.
Diffstat (limited to 'lib/utils_base.h')
-rw-r--r--lib/utils_base.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/utils_base.h b/lib/utils_base.h
index c34f0445..f40fdb0f 100644
--- a/lib/utils_base.h
+++ b/lib/utils_base.h
@@ -56,6 +56,12 @@ int np_warn_if_not_root(void);
* This function can be used to parse NTP control packet data and performance
* data strings.
*/
-char *np_extract_value(const char*, const char*);
+char *np_extract_value(const char*, const char*, char);
+
+/*
+ * Same as np_extract_value with separator suitable for NTP control packet
+ * payloads (comma)
+ */
+#define np_extract_ntpvar(l, n) np_extract_value(l, n, ',')
#endif /* _UTILS_BASE_ */