diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-24 16:12:05 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-24 16:12:05 +0000 |
commit | 8c3e7428ae21999e813b288c3d55d3870c9ef258 (patch) | |
tree | f5000d9a6cbbc6bf57a03ed8575ea4a39442997d /plugins/check_tcp.c | |
parent | 19d76b3fb60aea7470b7bd03485669a531456d7a (diff) | |
download | monitoring-plugins-8c3e7428ae21999e813b288c3d55d3870c9ef258.tar.gz |
udp checks require and send and receive option. Tests updated so if
nc is available, will check send and receive working correctly
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1353 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_tcp.c')
-rw-r--r-- | plugins/check_tcp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 5c287b7a..d8fc26e7 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -198,13 +198,17 @@ main (int argc, char **argv) if(flags & FLAG_VERBOSE) { printf("Using service %s\n", SERVICE); - printf("Port: %d\n", PORT); + printf("Port: %d\n", server_port); printf("flags: 0x%x\n", (int)flags); } if(EXPECT && !server_expect_count) server_expect_count++; + if(PROTOCOL==IPPROTO_UDP && !(server_expect_count && server_send)){ + usage(_("With UDP checks, a send/expect string must be specified.")); + } + /* set up the timer */ signal (SIGALRM, socket_timeout_alarm_handler); alarm (socket_timeout); |