1 /* 2 * File: globals.c 3 * Copyright: (c) 2006 by Peter Gritsch 4 * Email: s4nag@no-where.at 5 * 6 * This file is part of SNMP4Nagios. 7 * 8 * SNMP4Nagios is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or (at 11 * your option) any later version. 12 * 13 * SNMP4Nagios is distributed in the hope that it will be useful, but 14 * WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with SNMP4Nagios; if not, write to the 20 * 21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 22 * MA 02110-1301, USA 23 */ 24 25 #if HAVE_CONFIG_H 26 #include <config.h> 27 #endif 28 29 #include <syslog.h> 30 #include "snmpif.h" 31 #include "globals.h" 32 33 34 /********************/ 35 /* Global variables */ 36 37 char* progName = NULL; 38 char* srvName = NULL; 39 char* progVersion = NULL; 40 int loggingLevel = LOG_ERR; 41 int scanServices = FALSE; 42 int checkData = FALSE; 43 #if(WITH_RRD) 44 int logPerfData = FALSE; 45 int plotPerfData = FALSE; 46 #endif /* WITH_RRD */ 47 int npPerfData = FALSE; 48 char* helpIndexP = NULL; 49 char* helpThresP = NULL; 50 char* helpPurpose = NULL; 51 char* hostName = NULL; 52 int isHostNameSet = FALSE; 53 char* hostAddr = NULL; 54 int isHostAddrSet = FALSE; 55 int hasIndexParam = FALSE; 56 int idx = -1; 57 int isIdxSet = FALSE; 58 int hasAddInfParam = FALSE; 59 char* addInf = NULL; 60 int isAddInfSet = FALSE; 61 char* community = NULL; 62 char* commFile = NULL; 63 long snmpVersion = SNMP_VERSION_2c; 64 int snmpRetries = 5; /* Five retries */ 65 int snmpTimeOut = 1000000; /* First timeout is 1 second */ 66 int supportsPerfLog = FALSE; 67 #if(WITH_RRD) 68 char* rrdDir = RRDDIR; 69 int rrdStep = -1; 70 int rrdHBeat = -1; 71 char* pngDir = PNGDIR; 72 #endif /* WITH_RRD */ 73 74