summaryrefslogtreecommitdiffstats
path: root/plugins/check_tcp.c
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2004-12-01 23:54:51 (GMT)
committerBenoit Mortier <opensides@users.sourceforge.net>2004-12-01 23:54:51 (GMT)
commitd19edd4043c498626fe68308005947975ef0a697 (patch)
tree7a213ee16f9331e928b1c32aa6c521c05519db58 /plugins/check_tcp.c
parent1d8128e328f714258b7fec0c62245e1d187e0439 (diff)
downloadmonitoring-plugins-d19edd4043c498626fe68308005947975ef0a697.tar.gz
standardize localization string
standardize unknow arguments git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@969 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_tcp.c')
-rw-r--r--plugins/check_tcp.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 7cef8bb..285932d 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -14,6 +14,8 @@
14 along with this program; if not, write to the Free Software 14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 16
17 $Id$
18
17*****************************************************************************/ 19*****************************************************************************/
18 20
19/* progname "check_tcp" changes depending on symlink called */ 21/* progname "check_tcp" changes depending on symlink called */
@@ -100,9 +102,6 @@ char *buffer;
100 102
101 103
102 104
103
104
105
106int 105int
107main (int argc, char **argv) 106main (int argc, char **argv)
108{ 107{
@@ -241,7 +240,7 @@ main (int argc, char **argv)
241 status = strdup (""); 240 status = strdup ("");
242 241
243 if (process_arguments (argc, argv) == ERROR) 242 if (process_arguments (argc, argv) == ERROR)
244 usage (_("Could not parse arguments\n")); 243 usage (_("check_tcp: could not parse arguments\n"));
245 244
246 /* use default expect if none listed in process_arguments() */ 245 /* use default expect if none listed in process_arguments() */
247 if (EXPECT && server_expect_count == 0) { 246 if (EXPECT && server_expect_count == 0) {
@@ -389,7 +388,6 @@ main (int argc, char **argv)
389 388
390 return result; 389 return result;
391} 390}
392
393 391
394 392
395 393
@@ -481,12 +479,12 @@ process_arguments (int argc, char **argv)
481 break; 479 break;
482 case 'H': /* hostname */ 480 case 'H': /* hostname */
483 if (is_host (optarg) == FALSE) 481 if (is_host (optarg) == FALSE)
484 usage2 (_("invalid host name or address"), optarg); 482 usage2 (_("invalid hostname/address"), optarg);
485 server_address = optarg; 483 server_address = optarg;
486 break; 484 break;
487 case 'c': /* critical */ 485 case 'c': /* critical */
488 if (!is_intnonneg (optarg)) 486 if (!is_intnonneg (optarg))
489 usage (_("Critical threshold must be a nonnegative integer\n")); 487 usage (_("Critical threshold must be a positive integer\n"));
490 else 488 else
491 critical_time = strtod (optarg, NULL); 489 critical_time = strtod (optarg, NULL);
492 check_critical_time = TRUE; 490 check_critical_time = TRUE;
@@ -496,7 +494,7 @@ process_arguments (int argc, char **argv)
496 break; 494 break;
497 case 'w': /* warning */ 495 case 'w': /* warning */
498 if (!is_intnonneg (optarg)) 496 if (!is_intnonneg (optarg))
499 usage (_("Warning threshold must be a nonnegative integer\n")); 497 usage (_("Warning threshold must be a positive integer\n"));
500 else 498 else
501 warning_time = strtod (optarg, NULL); 499 warning_time = strtod (optarg, NULL);
502 check_warning_time = TRUE; 500 check_warning_time = TRUE;
@@ -517,7 +515,7 @@ process_arguments (int argc, char **argv)
517 break; 515 break;
518 case 'p': /* port */ 516 case 'p': /* port */
519 if (!is_intpos (optarg)) 517 if (!is_intpos (optarg))
520 usage (_("Server port must be a positive integer\n")); 518 usage (_("Port must be a positive integer\n"));
521 else 519 else
522 server_port = atoi (optarg); 520 server_port = atoi (optarg);
523 break; 521 break;
@@ -548,7 +546,7 @@ process_arguments (int argc, char **argv)
548 else if (!strncmp(optarg,"crit",4)) 546 else if (!strncmp(optarg,"crit",4))
549 econn_refuse_state = STATE_CRITICAL; 547 econn_refuse_state = STATE_CRITICAL;
550 else 548 else
551 usage (_("Refuse mut be one of ok, warn, crit\n")); 549 usage (_("Refuse must be one of ok, warn, crit\n"));
552 break; 550 break;
553 case 'd': 551 case 'd':
554 if (is_intpos (optarg)) 552 if (is_intpos (optarg))
@@ -578,7 +576,8 @@ process_arguments (int argc, char **argv)
578 576
579 return OK; 577 return OK;
580} 578}
581 579
580
582 581
583#ifdef HAVE_SSL 582#ifdef HAVE_SSL
584int 583int
@@ -634,6 +633,8 @@ connect_SSL (void)
634} 633}
635#endif 634#endif
636 635
636
637
637#ifdef HAVE_SSL 638#ifdef HAVE_SSL
638int 639int
639check_certificate (X509 ** certificate) 640check_certificate (X509 ** certificate)
@@ -710,6 +711,8 @@ check_certificate (X509 ** certificate)
710} 711}
711#endif 712#endif
712 713
714
715
713int 716int
714my_recv (void) 717my_recv (void)
715{ 718{
@@ -731,9 +734,6 @@ my_recv (void)
731 734
732 735
733 736
734
735
736
737void 737void
738print_help (void) 738print_help (void)
739{ 739{
@@ -790,7 +790,6 @@ print_help (void)
790 790
791 791
792 792
793
794void 793void
795print_usage (void) 794print_usage (void)
796{ 795{