diff options
Diffstat (limited to 'plugins/netutils.c')
-rw-r--r-- | plugins/netutils.c | 7 |
1 files changed, 7 insertions, 0 deletions
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) | |||
291 | return (FALSE); | 291 | return (FALSE); |
292 | } | 292 | } |
293 | 293 | ||
294 | void | ||
295 | host_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 | |||
294 | int | 301 | int |
295 | is_addr (const char *address) | 302 | is_addr (const char *address) |
296 | { | 303 | { |