📄 net-snmp-config.h
字号:
Don't define CASHETIME to disable cashing completely */#define EXCACHETIME 30#define CACHEFILE ".snmp-exec-cache"#define MAXCACHESIZE (200*80) /* roughly 200 lines max */#define MAXDISKS 50 /* can't scan more than this number *//* misc defaults *//* default of 100 meg minimum if the minimum size is not specified in the config file */#define DEFDISKMINIMUMSPACE 100000#define DEFMAXLOADAVE 12.0 /* default maximum load average before error *//* Because of sleep(1)s, this will also be time to wait (in seconds) for exec to finish */#define MAXREADCOUNT 100 /* max times to loop reading output from execs. *//* The original CMU code had this hardcoded as = 1 */#define SNMPBLOCK 1 /* Set if snmpgets should block and never timeout *//* How long to wait before restarting the agent after a snmpset to EXTENSIBLEMIB.VERSIONMIBNUM.VERRESTARTAGENT. This is necessary to finish the snmpset reply before restarting. */#define RESTARTSLEEP 5/* Number of community strings to store */#define NUM_COMMUNITIES 5/* UNdefine to allow specifying zero-length community string *//* #define NO_ZEROLENGTH_COMMUNITY 1 *//* #define EXIT_ON_BAD_KLREAD *//* define to exit the agent on a bad kernel read */#define LASTFIELD -1 /* internal define *//* configure options specified */#define CONFIGURE_OPTIONS ""/* got socklen_t? */#ifdef HAVE_WIN32_PLATFORM_SDK#define HAVE_SOCKLEN_T 1#endif/* got in_addr_t? *//* #undef HAVE_IN_ADDR_T *//* got ssize_t? *//* #undef HAVE_SSIZE_T */#ifndef HAVE_STRCHR#ifdef HAVE_INDEX# define strchr(a,b) index(a,b)# define strrchr(a,b) rindex(a,b)#endif#endif#ifndef HAVE_INDEX#ifdef HAVE_STRCHR# define index(a,b) strchr(a,b)# define rindex(a,b) strrchr(a,b)#endif#endif#ifndef HAVE_MEMCPY#ifdef HAVE_BCOPY# define memcpy(d, s, n) bcopy ((s), (d), (n))# define memmove(d, s, n) bcopy ((s), (d), (n))# define memcmp bcmp#endif#endif#ifndef HAVE_MEMMOVE#ifdef HAVE_MEMCPY# define memmove memcpy#endif#endif#if notused /* dont step on other defns of bcopy,bzero, and bcmp */#ifndef HAVE_BCOPY#ifdef HAVE_MEMCPY# define bcopy(s, d, n) memcpy ((d), (s), (n))# define bzero(p,n) memset((p),(0),(n))# define bcmp memcmp#endif#endif#endif/* If you have openssl 0.9.7 or above, you likely have AES support. *//* #undef USE_OPENSSL */#ifdef USE_OPENSSL/* Define to 1 if you have the <openssl/dh.h> header file. */#define HAVE_OPENSSL_DH_H 1/* Define to 1 if you have the `AES_cfb128_encrypt' function. */#define HAVE_AES_CFB128_ENCRYPT 1#else /* ! USE_OPENSSL *//* define if you are using the MD5 code ...*/#define USE_INTERNAL_MD5 1#endif /* ! USE_OPENSSL */#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT)#define HAVE_AES 1#endif/* define random functions */#ifndef HAVE_RANDOM#ifdef HAVE_LRAND48#define random lrand48#define srandom(s) srand48(s)#else#ifdef HAVE_RAND#define random rand#define srandom(s) srand(s)#endif#endif#endif/* define signal if DNE */#ifndef HAVE_SIGNAL#ifdef HAVE_SIGSET#define signal(a,b) sigset(a,b)#endif#endif/* define if you have librpm and libdb *//* #undef HAVE_LIBDB *//* #undef HAVE_LIBRPM *//* define if you have pkginfo *//* #undef HAVE_PKGINFO *//* define if you have gethostbyname */#define HAVE_GETHOSTBYNAME 1/* define if you have getservbyname */#define HAVE_GETSERVBYNAME 1/* printing system *//* #undef HAVE_LPSTAT *//* #undef LPSTAT_PATH *//* #undef HAVE_PRINTCAP *//* Pluggable transports. *//* This is defined if support for the UDP/IP transport domain is available. */#define SNMP_TRANSPORT_UDP_DOMAIN 1/* This is defined if support for the "callback" transport domain is available. */#define SNMP_TRANSPORT_CALLBACK_DOMAIN 1/* This is defined if support for the TCP/IP transport domain is available. */#define SNMP_TRANSPORT_TCP_DOMAIN 1/* This is defined if support for the Unix transport domain (a.k.a. "local IPC") is available. *//* #undef SNMP_TRANSPORT_UNIX_DOMAIN *//* This is defined if support for the AAL5 PVC transport domain is available. *//* #undef SNMP_TRANSPORT_AAL5PVC_DOMAIN *//* This is defined if support for the IPX transport domain is available. *//* #undef SNMP_TRANSPORT_IPX_DOMAIN *//* XXX do not modify. change the INET6 define instead *//* This is defined if support for the UDP/IPv6 transport domain is available. *//* #undef SNMP_TRANSPORT_UDPIPV6_DOMAIN *//* XXX do not modify. change the INET6 define instead *//* This is defined if support for the TCP/IPv6 transport domain is available. *//* #undef SNMP_TRANSPORT_TCPIPV6_DOMAIN *//* define this if the USM security module is available */#define SNMP_SECMOD_USM 1/* define this if the KSM (kerberos based snmp) security module is available *//* #undef SNMP_SECMOD_KSM *//* define this if we're using the new MIT crypto API *//* #undef MIT_NEW_CRYPTO *//* define if you want to build with reentrant/threaded code (incomplete)*//* #undef NS_REENTRANT *//* on aix, if you have perfstat *//* #undef HAVE_PERFSTAT *//* Not-to-be-compiled macros for use by configure only */#define config_require(x)#define config_exclude(x)#define config_arch_require(x,y)#define config_parse_dot_conf(w,x,y,z)#define config_add_mib(x)#define config_belongs_in(x)#if defined (WIN32) || defined (mingw32) || defined (cygwin)#define ENV_SEPARATOR ";"#define ENV_SEPARATOR_CHAR ';'#else#define ENV_SEPARATOR ":"#define ENV_SEPARATOR_CHAR ':'#endif/* * this must be before the system/machine includes, to allow them to * override and turn off inlining. To do so, they should do the * following: * * #undef NETSNMP_ENABLE_INLINE * #define NETSNMP_ENABLE_INLINE 0 * * A user having problems with their compiler can also turn off * the use of inline by defining NETSNMP_NO_INLINE via their cflags: * * -DNETSNMP_NO_INLINE * * Header and source files should only test against NETSNMP_USE_INLINE: * * #ifdef NETSNMP_USE_INLINE * NETSNMP_INLINE function(int parm) { return parm -1; } * #endif * * Functions which should be static, regardless of whether or not inline * is available or enabled should use the NETSNMP_STATIC_INLINE macro, * like so: * * NETSNMP_STATIC_INLINE function(int parm) { return parm -1; } * * NOT like this: * * static NETSNMP_INLINE function(int parm) { return parm -1; } * *//* * Win32 needs extern for inline function declarations in headers. * See MS tech note Q123768: * http://support.microsoft.com/default.aspx?scid=kb;EN-US;123768 */#define NETSNMP_INLINE extern inline#define NETSNMP_STATIC_INLINE static inline#define NETSNMP_ENABLE_INLINE 1#if notused#include SYSTEM_INCLUDE_FILE#include MACHINE_INCLUDE_FILE#endif#if NETSNMP_ENABLE_INLINE && !defined(NETSNMP_NO_INLINE)# define NETSNMP_USE_INLINE 1#else# undef NETSNMP_INLINE# define NETSNMP_INLINE # undef NETSNMP_STATIC_INLINE# define NETSNMP_STATIC_INLINE static#endif#ifdef WIN32typedef unsigned short mode_t;typedef unsigned __int32 uint32_t;typedef long int32_t;typedef unsigned __int64 uint64_t;typedef __int64 int64_t;/* Define if you have the closesocket function. */#define HAVE_CLOSESOCKET 1/* Define if you have raise() instead of alarm() */#define HAVE_RAISE 1/* define to 1 if you do not want to set global snmp_errno */#define DONT_SHARE_ERROR_WITH_OTHER_THREADS 1#define vsnprintf _vsnprintf#define snprintf _snprintf#define EADDRINUSE WSAEADDRINUSE/* Define NETSNMP_USE_DLL when building or using netsnmp.DLL *//* #undef NETSNMP_USE_DLL */#ifdef NETSNMP_USE_DLL #ifdef NETSNMP_DLL #if defined(_MSC_VER) #define NETSNMP_IMPORT __declspec(dllexport) #endif #else #if defined(_MSC_VER) #define NETSNMP_IMPORT __declspec(dllimport) #endif #endif /* NETSNMP_DLL */#endif /* NETSNMP_USE_DLL *//* * DLL decoration, if used at all, must be consistent. * This is why NETSNMP_IMPORT is really an export decoration * when it is encountered in a header file that is included * during the compilation of a library source file. * NETSNMP_DLL is set by the MSVC libsnmp_dll project * in order to signal that the library sources are being compiled. * Not defining NETSNMP_USE_DLL ignores the preceding, and renders * the NETSNMP_IMPORT definitions harmless. */ #ifdef NETSNMP_USE_DLL #ifndef NETSNMP_TOOLS_C /* wrap alloc functions to use DLL's memory heap */ /* This is not done in tools.c, where these wrappers are defined */ #define strdup netsnmp_strdup #define calloc netsnmp_calloc #define malloc netsnmp_malloc #define realloc netsnmp_realloc #define free netsnmp_free #endif #endif#endif /* WIN32 */#ifndef NETSNMP_IMPORT# define NETSNMP_IMPORT extern#endif#if defined(HAVE_NLIST) && defined(STRUCT_NLIST_HAS_N_VALUE) && !defined(DONT_USE_NLIST) && !defined(NO_KMEM_USAGE)#define CAN_USE_NLIST#endif#if HAVE_DMALLOC_H#define DMALLOC_FUNC_CHECK#endif/* #undef INET6 *//* #undef LOCAL_SMUX *//* define if agentx transport is to use domain sockets only *//* #undef AGENTX_DOM_SOCK_ONLY */#ifndef LOG_DAEMON#define LOG_DAEMON (3<<3) /* system daemons */#endif#if UCD_COMPATIBLE/* old and in the way */#define EXTENSIBLEMIB UCDAVIS_MIB#endif#if defined(_MSC_VER)/* this bit of magic enables or disables IPv6 transports */ #if INET6 /* "dont have" implies "compile here" for snmplib/inet_?to?.c */ #undef HAVE_INET_NTOP #undef HAVE_INET_PTON #define SNMP_TRANSPORT_TCPIPV6_DOMAIN 1 #define SNMP_TRANSPORT_UDPIPV6_DOMAIN 1 #else /* "have" implies "dont compile here" for snmplib/inet_?to?.c */ #define HAVE_INET_NTOP 1 #define HAVE_INET_PTON 1 #undef SNMP_TRANSPORT_TCPIPV6_DOMAIN #undef SNMP_TRANSPORT_UDPIPV6_DOMAIN #endif#endif/* * Module configuration and control starts here. * * Some of the defines herein are used to control * groups of modules. The ones that have "CFG" * are used especially to control the include files * seen in {agent,mib}_module_includes.h, and the init entries * which are invoked in {agent,mib}_module_inits.h. * * To disable a group, uncomment the associated define. */ /* CFG Define if compiling with the ucd_snmp module files. */#define USING_UCD_SNMP_MODULE 1 /* CFG Define if compiling with the agentx module files. */#define USING_AGENTX_MODULE 1 /* CFG Define if compiling with the host module files. *//* #undef USING_HOST_MODULE */ /* CFG Define if compiling with the Rmon module files. *//* #undef USING_RMON_MODULE *//* CFG Define if compiling with the disman/event-mib module files. */#define USING_DISMAN_EVENT_MIB_MODULE 1/* CFG Define if compiling with the smux module files. *//* #undef USING_SMUX_MODULE *//* * Module configuration and control ends here. */#endif /* NET_SNMP_CONFIG_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -