summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d19edd4)
raw | patch | inline | side by side (parent: d19edd4)
author | Benoit Mortier <opensides@users.sourceforge.net> | |
Thu, 2 Dec 2004 00:30:32 +0000 (00:30 +0000) | ||
committer | Benoit Mortier <opensides@users.sourceforge.net> | |
Thu, 2 Dec 2004 00:30:32 +0000 (00:30 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@970 f882894a-f735-0410-b71e-b25c423dba1c
contrib/check_rbl.c | patch | blob | history |
diff --git a/contrib/check_rbl.c b/contrib/check_rbl.c
index 69fdd23c1211160a248992e696065957c6c485bc..6831b657b0184cf74f0a343e3423807dde1c27de 100644 (file)
--- a/contrib/check_rbl.c
+++ b/contrib/check_rbl.c
#include "string.h"
const char progname = "check_rbl";
+const char *revision = "$Revision$";
+//const char *copyright = "2000-2003";
+//const char *email = "nagiosplug-devel@lists.sourceforge.net";
int process_arguments(int, char **);
int call_getopt(int, char **);
usage("Cannot catch SIGALRM\n");
if (process_arguments(argc,argv)!=OK)
- usage("Could not parse arguments\n");
+ usage (_("check_rbl: could not parse arguments\n"));
/* reverse the octets in the IP address */
query_address_rev = reverse_ipaddr(query_address);
if (spclose(child_process)) {
result=error_set(result,STATE_WARNING);
if (!strcmp(output,""))
- strcpy(output,"nslookup returned error status");
+ strcpy(output,"nslookup returned an error status");
}
(void)time(&end_time);
return result;
}
+
+
/* reverse the ipaddr */
char *reverse_ipaddr(char *ipaddr)
{
}
+
/* process command-line arguments */
int process_arguments(int argc, char **argv)
{
-
-
-
int call_getopt(int argc, char **argv)
{
int c,i=0;
print_help();
exit(STATE_OK);
case '?': /* help */
- usage("Invalid argument\n");
+ printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
+ print_usage ();
+ exit (STATE_UNKNOWN);
}
}
return i;
-
-
int validate_arguments(void)
{
if (query_address == NULL || rbl_name == NULL)
-
-
void print_help(void)
{
print_revision(progname,"$Revision$");
-
-
void print_usage(void)
{
printf