summaryrefslogtreecommitdiffstats
path: root/plugins/netutils.c
diff options
context:
space:
mode:
authorM. Sean Finney <seanius@users.sourceforge.net>2005-10-24 11:10:29 (GMT)
committerM. Sean Finney <seanius@users.sourceforge.net>2005-10-24 11:10:29 (GMT)
commitceebd58040b1688749d58dd76963af639cf8c803 (patch)
tree972deca448413addc597ce7ba3a1a4edefa8c5a5 /plugins/netutils.c
parent19100c883d72e6ebfd3f15b3171ade2a78345c73 (diff)
downloadmonitoring-plugins-ceebd58040b1688749d58dd76963af639cf8c803.tar.gz
initial merging of ae's np_runcmd code into selected plugins.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1260 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/netutils.c')
-rw-r--r--plugins/netutils.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/netutils.c b/plugins/netutils.c
index db64ef0..0824527 100644
--- a/plugins/netutils.c
+++ b/plugins/netutils.c
@@ -291,6 +291,13 @@ is_host (const char *address)
291 return (FALSE); 291 return (FALSE);
292} 292}
293 293
294void
295host_or_die(const char *str)
296{
297 if(!str || (!is_addr(str) && !is_hostname(str)))
298 usage_va(_("Invalid hostname/address - %s"), str);
299}
300
294int 301int
295is_addr (const char *address) 302is_addr (const char *address)
296{ 303{