summaryrefslogtreecommitdiffstats
path: root/plugins/check_dns.c
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-08-10 06:53:22 (GMT)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-08-10 06:53:22 (GMT)
commitf4f92be60c94fd4e0dd4b2b4b3101543eedb706a (patch)
tree28d25bd0ab624d82435823c940a186370947ad4d /plugins/check_dns.c
parentcbf702f51f839af5a8e9c66bdae7d6a3dc363ace (diff)
downloadmonitoring-plugins-f4f92be60c94fd4e0dd4b2b4b3101543eedb706a.tar.gz
the last round of pedantic compiler warnings
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@676 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_dns.c')
-rw-r--r--plugins/check_dns.c88
1 files changed, 50 insertions, 38 deletions
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index 8b3bb4f..afc23a4 100644
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
@@ -54,47 +54,11 @@ const char *revision = "$Revision$";
54const char *copyright = "2000-2003"; 54const char *copyright = "2000-2003";
55const char *email = "nagiosplug-devel@lists.sourceforge.net"; 55const char *email = "nagiosplug-devel@lists.sourceforge.net";
56 56
57void
58print_usage (void)
59{
60 printf (_("\
61Usage: %s -H host [-s server] [-a expected-address] [-t timeout]\n\
62 %s --help\n\
63 %s --version\n"),
64 progname, progname, progname);
65}
66
67void
68print_help (void)
69{
70 print_revision (progname, revision);
71
72 printf (_(COPYRIGHT), copyright, email);
73
74 print_usage ();
75
76 printf (_(UT_HELP_VRSN));
77
78 printf (_("\
79-H, --hostname=HOST\n\
80 The name or address you want to query\n\
81-s, --server=HOST\n\
82 Optional DNS server you want to use for the lookup\n\
83-a, --expected-address=IP-ADDRESS\n\
84 Optional IP address you expect the DNS server to return\n"));
85
86 printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
87
88 printf (_("\n\
89This plugin uses the nslookup program to obtain the IP address\n\
90for the given host/domain query. A optional DNS server to use may\n\
91be specified. If no DNS server is specified, the default server(s)\n\
92specified in /etc/resolv.conf will be used.\n"));
93}
94
95int process_arguments (int, char **); 57int process_arguments (int, char **);
96int validate_arguments (void); 58int validate_arguments (void);
97int error_scan (char *); 59int error_scan (char *);
60void print_help (void);
61void print_usage (void);
98 62
99#define ADDRESS_LENGTH 256 63#define ADDRESS_LENGTH 256
100char query_address[ADDRESS_LENGTH] = ""; 64char query_address[ADDRESS_LENGTH] = "";
@@ -421,3 +385,51 @@ validate_arguments ()
421 else 385 else
422 return OK; 386 return OK;
423} 387}
388
389
390
391
392
393
394void
395print_help (void)
396{
397 print_revision (progname, revision);
398
399 printf (_(COPYRIGHT), copyright, email);
400
401 print_usage ();
402
403 printf (_(UT_HELP_VRSN));
404
405 printf (_("\
406-H, --hostname=HOST\n\
407 The name or address you want to query\n\
408-s, --server=HOST\n\
409 Optional DNS server you want to use for the lookup\n\
410-a, --expected-address=IP-ADDRESS\n\
411 Optional IP address you expect the DNS server to return\n"));
412
413 printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
414
415 printf (_("\n\
416This plugin uses the nslookup program to obtain the IP address\n\
417for the given host/domain query. A optional DNS server to use may\n\
418be specified. If no DNS server is specified, the default server(s)\n\
419specified in /etc/resolv.conf will be used.\n"));
420
421 printf (_(UT_SUPPORT));
422}
423
424
425
426
427void
428print_usage (void)
429{
430 printf (_("\
431Usage: %s -H host [-s server] [-a expected-address] [-t timeout]\n\
432 %s --help\n\
433 %s --version\n"),
434 progname, progname, progname);
435}