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) | |||
198 | 198 | ||
199 | if(flags & FLAG_VERBOSE) { | 199 | if(flags & FLAG_VERBOSE) { |
200 | printf("Using service %s\n", SERVICE); | 200 | printf("Using service %s\n", SERVICE); |
201 | printf("Port: %d\n", PORT); | 201 | printf("Port: %d\n", server_port); |
202 | printf("flags: 0x%x\n", (int)flags); | 202 | printf("flags: 0x%x\n", (int)flags); |
203 | } | 203 | } |
204 | 204 | ||
205 | if(EXPECT && !server_expect_count) | 205 | if(EXPECT && !server_expect_count) |
206 | server_expect_count++; | 206 | server_expect_count++; |
207 | 207 | ||
208 | if(PROTOCOL==IPPROTO_UDP && !(server_expect_count && server_send)){ | ||
209 | usage(_("With UDP checks, a send/expect string must be specified.")); | ||
210 | } | ||
211 | |||
208 | /* set up the timer */ | 212 | /* set up the timer */ |
209 | signal (SIGALRM, socket_timeout_alarm_handler); | 213 | signal (SIGALRM, socket_timeout_alarm_handler); |
210 | alarm (socket_timeout); | 214 | alarm (socket_timeout); |