summaryrefslogtreecommitdiffstats
path: root/plugins/utils.h
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-08-02 18:22:51 +0000
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-08-02 18:22:51 +0000
commit3c48edf660facd4bd93181333b48960afd83934b (patch)
treeb6f4399575f3029580888e4e798b6cb9b94bbe13 /plugins/utils.h
parent743a44e936edbb649e67f99fdf7712e1c60eee39 (diff)
downloadmonitoring-plugins-3c48edf660facd4bd93181333b48960afd83934b.tar.gz
ifdef so utils.h can be header for utils.c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@633 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/utils.h')
-rw-r--r--plugins/utils.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/plugins/utils.h b/plugins/utils.h
index b10f0e5a..e581afaa 100644
--- a/plugins/utils.h
+++ b/plugins/utils.h
@@ -13,18 +13,23 @@ suite of plugins. */
13 13
14/* Standardize version information, termination */ 14/* Standardize version information, termination */
15 15
16char *my_basename (char *);
17void support (void); 16void support (void);
18char *clean_revstring (const char *revstring); 17char *clean_revstring (const char *revstring);
19void print_revision (const char *, const char *); 18void print_revision (const char *, const char *);
20void die (int result, const char *fmt, ...); 19void die (int result, const char *fmt, ...);
21void terminate (int result, char *msg, ...); 20void terminate (int result, const char *msg, ...);
22extern RETSIGTYPE timeout_alarm_handler (int);
23 21
24/* Handle timeouts */ 22/* Handle timeouts */
25 23
26time_t start_time, end_time; 24#ifdef LOCAL_TIMEOUT_ALARM_HANDLER
25extern int timeout_interval;
26RETSIGTYPE timeout_alarm_handler (int);
27#else
27int timeout_interval = DEFAULT_SOCKET_TIMEOUT; 28int timeout_interval = DEFAULT_SOCKET_TIMEOUT;
29extern RETSIGTYPE timeout_alarm_handler (int);
30#endif
31
32time_t start_time, end_time;
28 33
29/* Test input types */ 34/* Test input types */
30 35
@@ -59,8 +64,8 @@ double delta_time (struct timeval tv);
59/* Handle strings safely */ 64/* Handle strings safely */
60 65
61void strip (char *buffer); 66void strip (char *buffer);
62char *strscpy (char *dest, char *src); 67char *strscpy (char *dest, const char *src);
63char *strscat (char *dest, char *src); 68char *strscat (char *dest, const char *src);
64char *strnl (char *str); 69char *strnl (char *str);
65char *ssprintf (char *str, const char *fmt, ...); /* deprecate for asprintf */ 70char *ssprintf (char *str, const char *fmt, ...); /* deprecate for asprintf */
66char *strpcpy (char *dest, const char *src, const char *str); 71char *strpcpy (char *dest, const char *src, const char *str);
@@ -124,3 +129,13 @@ char *state_text (int result);
124#define UT_TIMEOUT "\ 129#define UT_TIMEOUT "\
125 -t, --timeout=INTEGER\n\ 130 -t, --timeout=INTEGER\n\
126 Seconds before connection times out (default: %d)\n" 131 Seconds before connection times out (default: %d)\n"
132
133#define UT_SUPPORT "\n\
134Send email to nagios-users@lists.sourceforge.net if you have questions\n\
135regarding use of this software. To submit patches or suggest improvements,\n\
136send email to nagiosplug-devel@lists.sourceforge.net\n"
137
138#define UT_NOWARRANTY "\
139The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n\
140copies of the plugins under the terms of the GNU General Public License.\n\
141For more information about these matters, see the file named COPYING.\n"