From ceebd58040b1688749d58dd76963af639cf8c803 Mon Sep 17 00:00:00 2001 From: "M. Sean Finney" Date: Mon, 24 Oct 2005 11:10:29 +0000 Subject: 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 --- plugins/netutils.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins/netutils.c') diff --git a/plugins/netutils.c b/plugins/netutils.c index db64ef09..08245276 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c @@ -291,6 +291,13 @@ is_host (const char *address) return (FALSE); } +void +host_or_die(const char *str) +{ + if(!str || (!is_addr(str) && !is_hostname(str))) + usage_va(_("Invalid hostname/address - %s"), str); +} + int is_addr (const char *address) { -- cgit v1.2.3