12
15
#ifndef NET_SNMP_CONFIG_H
13
16
#define NET_SNMP_CONFIG_H
15
/* config.h: a general config file */
17
/* Default (SNMP) version number for the tools to use */
18
#define DEFAULT_SNMP_VERSION 3
20
/* don't change these values! */
21
#define SNMPV1 0xAAAA /* readable by anyone */
22
#define SNMPV2ANY 0xA000 /* V2 Any type (includes NoAuth) */
23
#define SNMPV2AUTH 0x8000 /* V2 Authenticated requests only */
25
/* default list of mibs to load */
27
#define DEFAULT_MIBS "IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:SNMPv2-MIB:RFC1213-MIB"
29
/* default location to look for mibs to load using the above tokens
30
and/or those in the MIBS envrionment variable*/
31
#undef DEFAULT_MIBDIRS
33
/* default mib files to load, specified by path. */
34
#undef DEFAULT_MIBFILES
36
/* should we compile to use special opaque types: float, double,
37
counter64, i64, ui64, union? */
38
#undef OPAQUE_SPECIAL_TYPES
40
/* comment the next line if you are compiling with libsnmp.h
41
and are not using the UC-Davis SNMP library. */
42
#define UCD_SNMP_LIBRARY 1
44
/* define if you want to compile support for both authentication and
48
/* define if you are using the MD5 code ...*/
49
#undef USE_INTERNAL_MD5
51
/* define if you are using the codeS11 library ...*/
54
/* add in recent CMU library extensions (not complete) */
57
/* add in recent resource lock functions (not complete) */
61
/* if defined, we optimize the code to exclude all debugging calls. */
62
#undef SNMP_NO_DEBUGGING
63
/* ignore the -D flag and always print debugging information */
64
#define SNMP_ALWAYS_DEBUG 0
66
/* reverse encoding BER packets is both faster and more efficient in space. */
67
#define USE_REVERSE_ASNENCODING 1
68
#define DEFAULT_ASNENCODING_DIRECTION 1 /* 1 = reverse, 0 = forwards */
70
/* PERSISTENT_DIRECTORY: If defined, the library is capabile of saving
71
persisant information to this directory in the form of configuration
72
lines: PERSISTENT_DIRECTORY/NAME.persistent.conf */
73
#define PERSISTENT_DIRECTORY "/var/snmp"
75
/* PERSISTENT_MASK: the umask permissions to set up persistent files with */
76
#define PERSISTENT_MASK 077
78
/* AGENT_DIRECTORY_MODE: the mode the agents should use to create
79
directories with. Since the data stored here is probably sensitive, it
80
probably should be read-only by root/administrator. */
81
#define AGENT_DIRECTORY_MODE 0700
83
/* MAX_PERSISTENT_BACKUPS:
84
* The maximum number of persistent backups the library will try to
85
* read from the persistent cache directory. If an application fails to
86
* close down successfully more than this number of times, data will be lost.
19
/* ********* NETSNMP_MARK_BEGIN_AUTOCONF_DEFINITIONS ********* */
21
* put all autoconf-specific definitions below here
88
#define MAX_PERSISTENT_BACKUPS 10
92
/* define if you are embedding perl in the main agent */
93
#undef NETSNMP_EMBEDDED_PERL
95
/* define the system type include file here */
96
#define SYSTEM_INCLUDE_FILE <net-snmp/system/generic.h>
98
/* define the machine (cpu) type include file here */
99
#define MACHINE_INCLUDE_FILE <net-snmp/machine/generic.h>
101
/* define the UDP buffer defaults undefined means use the OS buffers
103
#undef DEFAULT_SERVER_SEND_BUF
104
#undef DEFAULT_SERVER_RECV_BUF
105
#undef DEFAULT_CLIENT_SEND_BUF
106
#undef DEFAULT_CLIENT_RECV_BUF
108
/* SNMPLIBDIR contains important files */
114
/* LOGFILE: If defined it closes stdout/err/in and opens this in out/err's
115
place. (stdin is closed so that sh scripts won't wait for it) */
118
/* default system contact */
121
/* system location */
124
/* Use libwrap to handle allow/deny hosts? */
127
/* Use dmalloc to do malloc debugging? */
128
#undef HAVE_DMALLOC_H
130
/* location of UNIX kernel */
131
#define KERNEL_LOC "/vmunix"
133
/* location of mount table list */
134
#define ETC_MNTTAB "/etc/mnttab"
136
/* location of swap device (ok if not found) */
139
/* Command to generate ps output, the final column must be the process
140
name withOUT arguments */
141
#define PSCMD "/bin/ps"
143
/* Where is the uname command */
144
#define UNAMEPROG "/bin/uname"
146
/* pattern for temporary file names */
147
#define NETSNMP_TEMP_FILE_PATTERN "/tmp/snmpdXXXXXX"
149
/* testing code sections. */
150
#undef SNMP_TESTING_CODE
152
/* If you don't have root access don't exit upon kmem errors */
153
#undef NO_ROOT_ACCESS
155
/* If we don't want to use kmem. */
158
/* If you don't want the agent to report on variables it doesn't have data for */
159
#undef NO_DUMMY_VALUES
161
/* Define if statfs takes 2 args and the second argument has
162
type struct fs_data. [Ultrix] */
163
#undef STAT_STATFS_FS_DATA
165
/* Define if the TCP timer constants in <netinet/tcp_timer.h>
166
depend on the integer variable `hz'. [FreeBSD 4.x] */
167
#undef TCPTV_NEEDS_HZ
24
#ifndef NETSNMP_NO_AUTOCONF_DEFINITIONS
171
26
/* define if you have type int32_t */
172
27
#undef HAVE_INT32_T
313
229
#undef IFNET_NEEDS_KERNEL
315
231
/* sysctl works to get boottime, etc... */
316
#undef CAN_USE_SYSCTL
318
/* type check for in_addr_t */
232
#undef NETSNMP_CAN_USE_SYSCTL
321
234
/* define if SIOCGIFADDR exists in sys/ioctl.h */
322
235
#undef SYS_IOCTL_H_HAS_SIOCGIFADDR
324
/* define if your compiler (processor) defines __FUNCTION__ for you */
325
#undef HAVE_CPP_UNDERBAR_FUNCTION_DEFINED
237
/* Define if statfs takes 2 args and the second argument has
238
type struct fs_data. [Ultrix] */
239
#undef STAT_STATFS_FS_DATA
241
/* Define if the TCP timer constants in <netinet/tcp_timer.h>
242
depend on the integer variable `hz'. [FreeBSD 4.x] */
243
#undef TCPTV_NEEDS_HZ
245
/* Not-to-be-compiled macros for use by configure only */
246
#define config_require(x)
247
#define config_exclude(x)
248
#define config_arch_require(x,y)
249
#define config_parse_dot_conf(w,x,y,z)
250
#define config_add_mib(x)
251
#define config_belongs_in(x)
252
#define config_error(x)
253
#define config_warning(x)
255
#if defined (WIN32) || defined (mingw32) || defined (cygwin)
256
#define ENV_SEPARATOR ";"
257
#define ENV_SEPARATOR_CHAR ';'
259
#define ENV_SEPARATOR ":"
260
#define ENV_SEPARATOR_CHAR ':'
263
/* definitions added by configure on-the-fly */
267
/* end of definitions added by configure on-the-fly */
271
# define strchr index
272
# define strrchr rindex
279
# define index(a,b) strchr(a,b)
280
# define rindex(a,b) strrchr(a,b)
282
# define index strchr
283
# define rindex strrchr
290
# define memcpy(d, s, n) bcopy ((s), (d), (n))
291
# define memmove(d, s, n) bcopy ((s), (d), (n))
298
# define memmove memcpy
304
# define bcopy(s, d, n) memcpy ((d), (s), (n))
305
# define bzero(p,n) memset((p),(0),(n))
310
/* If you have openssl 0.9.7 or above, you likely have AES support. */
311
#undef NETSNMP_USE_OPENSSL
312
#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT)
316
/* define random functions */
320
#define random lrand48
321
#define srandom(s) srand48(s)
325
#define srandom(s) srand(s)
330
/* define signal if DNE */
334
#define signal(a,b) sigset(a,b)
339
#define DMALLOC_FUNC_CHECK
342
#endif /* NETSNMP_NO_AUTOCONF_DEFINITIONS */
347
/* ********* NETSNMP_MARK_BEGIN_CLEAN_NAMESPACE ********* */
349
* put all new net-snmp-specific definitions here
351
* all definitions MUST have a NETSNMP_ prefix
355
/* Default (SNMP) version number for the tools to use */
356
#define NETSNMP_DEFAULT_SNMP_VERSION 3
358
/* don't change these values! */
359
#define NETSNMP_SNMPV1 0xAAAA /* readable by anyone */
360
#define NETSNMP_SNMPV2ANY 0xA000 /* V2 Any type (includes NoAuth) */
361
#define NETSNMP_SNMPV2AUTH 0x8000 /* V2 Authenticated requests only */
363
/* default list of mibs to load */
364
#define NETSNMP_DEFAULT_MIBS "IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:SNMPv2-MIB:RFC1213-MIB"
366
/* default location to look for mibs to load using the above tokens
367
and/or those in the MIBS envrionment variable*/
368
#undef NETSNMP_DEFAULT_MIBDIRS
370
/* default mib files to load, specified by path. */
371
#undef NETSNMP_DEFAULT_MIBFILES
373
/* should we compile to use special opaque types: float, double,
374
counter64, i64, ui64, union? */
375
#undef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
377
/* define if you want to compile support for both authentication and
379
#undef NETSNMP_ENABLE_SCAPI_AUTHPRIV
381
/* define if you are using the MD5 code ...*/
382
#undef NETSNMP_USE_INTERNAL_MD5
384
/* define if you are using the codeS11 library ...*/
385
#undef NETSNMP_USE_PKCS11
387
/* debugging stuff */
388
/* if defined, we optimize the code to exclude all debugging calls. */
389
#undef NETSNMP_NO_DEBUGGING
390
/* ignore the -D flag and always print debugging information */
391
#define NETSNMP_ALWAYS_DEBUG 0
393
/* reverse encoding BER packets is both faster and more efficient in space. */
394
#define NETSNMP_USE_REVERSE_ASNENCODING 1
395
#define NETSNMP_DEFAULT_ASNENCODING_DIRECTION 1 /* 1 = reverse, 0 = forwards */
397
/* PERSISTENT_DIRECTORY: If defined, the library is capabile of saving
398
persisant information to this directory in the form of configuration
399
lines: PERSISTENT_DIRECTORY/NAME.persistent.conf */
400
#define NETSNMP_PERSISTENT_DIRECTORY "/var/snmp"
402
/* PERSISTENT_MASK: the umask permissions to set up persistent files with */
403
#define NETSNMP_PERSISTENT_MASK 077
405
/* AGENT_DIRECTORY_MODE: the mode the agents should use to create
406
directories with. Since the data stored here is probably sensitive, it
407
probably should be read-only by root/administrator. */
408
#define NETSNMP_AGENT_DIRECTORY_MODE 0700
410
/* MAX_PERSISTENT_BACKUPS:
411
* The maximum number of persistent backups the library will try to
412
* read from the persistent cache directory. If an application fails to
413
* close down successfully more than this number of times, data will be lost.
415
#define NETSNMP_MAX_PERSISTENT_BACKUPS 10
417
/* define the system type include file here */
418
#define NETSNMP_SYSTEM_INCLUDE_FILE <net-snmp/system/generic.h>
420
/* define the machine (cpu) type include file here */
421
#define NETSNMP_MACHINE_INCLUDE_FILE <net-snmp/machine/generic.h>
423
/* define the UDP buffer defaults undefined means use the OS buffers
425
#undef NETSNMP_DEFAULT_SERVER_SEND_BUF
426
#undef NETSNMP_DEFAULT_SERVER_RECV_BUF
427
#undef NETSNMP_DEFAULT_CLIENT_SEND_BUF
428
#undef NETSNMP_DEFAULT_CLIENT_RECV_BUF
430
/* net-snmp's major path names */
436
/* NETSNMP_LOGFILE: If defined it closes stdout/err/in and opens this in
437
out/err's place. (stdin is closed so that sh scripts won't wait for it) */
438
#undef NETSNMP_LOGFILE
440
/* default system contact */
441
#undef NETSNMP_SYS_CONTACT
443
/* system location */
444
#undef NETSNMP_SYS_LOC
446
/* Use libwrap to handle allow/deny hosts? */
447
#undef NETSNMP_USE_LIBWRAP
449
/* testing code sections. */
450
#undef NETSNMP_ENABLE_TESTING_CODE
452
/* If you don't have root access don't exit upon kmem errors */
453
#undef NETSNMP_NO_ROOT_ACCESS
455
/* If we don't want to use kmem. */
456
#undef NETSNMP_NO_KMEM_USAGE
458
/* If you don't want the agent to report on variables it doesn't have data for */
459
#undef NETSNMP_NO_DUMMY_VALUES
327
462
/* Mib-2 tree Info */
328
463
/* These are the system information variables. */
330
#define VERS_DESC "unknown" /* overridden at run time */
331
#define SYS_NAME "unknown" /* overridden at run time */
465
#define NETSNMP_VERS_DESC "unknown" /* overridden at run time */
466
#define NETSNMP_SYS_NAME "unknown" /* overridden at run time */
333
468
/* comment out the second define to turn off functionality for any of
334
469
these: (See README for details) */
336
471
/* proc PROCESSNAME [MAX] [MIN] */
472
#define NETSNMP_PROCMIBNUM 2
339
474
/* exec/shell NAME COMMAND */
340
#define SHELLMIBNUM 8
475
#define NETSNMP_SHELLMIBNUM 8
478
#define NETSNMP_MEMMIBNUM 4
345
480
/* disk DISK MINSIZE */
481
#define NETSNMP_DISKMIBNUM 9
348
483
/* load 1 5 15 */
349
#define LOADAVEMIBNUM 10
484
#define NETSNMP_LOADAVEMIBNUM 10
351
486
/* which version are you using? This mibloc will tell you */
352
#define VERSIONMIBNUM 100
487
#define NETSNMP_VERSIONMIBNUM 100
354
489
/* Reports errors the agent runs into */
355
490
/* (typically its "can't fork, no mem" problems) */
356
#define ERRORMIBNUM 101
491
#define NETSNMP_ERRORMIBNUM 101
358
493
/* The sub id of EXTENSIBLEMIB returned to queries of
359
494
.iso.org.dod.internet.mgmt.mib-2.system.sysObjectID.0 */
495
#define NETSNMP_AGENTID 250
362
497
/* This ID is returned after the AGENTID above. IE, the resulting
363
498
value returned by a query to sysObjectID is
364
499
EXTENSIBLEMIB.AGENTID.???, where ??? is defined below by OSTYPE */
382
#define UNKNOWNID 255
501
#define NETSNMP_HPUX9ID 1
502
#define NETSNMP_SUNOS4ID 2
503
#define NETSNMP_SOLARISID 3
504
#define NETSNMP_OSFID 4
505
#define NETSNMP_ULTRIXID 5
506
#define NETSNMP_HPUX10ID 6
507
#define NETSNMP_NETBSD1ID 7
508
#define NETSNMP_FREEBSDID 8
509
#define NETSNMP_IRIXID 9
510
#define NETSNMP_LINUXID 10
511
#define NETSNMP_BSDIID 11
512
#define NETSNMP_OPENBSDID 12
513
#define NETSNMP_WIN32ID 13
514
#define NETSNMP_HPUX11ID 14
515
#define NETSNMP_AIXID 15
516
#define NETSNMP_MACOSXID 16
517
#define NETSNMP_UNKNOWNID 255
385
#define OSTYPE HPUX9ID
520
#define NETSNMP_OSTYPE NETSNMP_HPUX9ID
388
#define OSTYPE HPUX10ID
523
#define NETSNMP_OSTYPE NETSNMP_HPUX10ID
391
#define OSTYPE HPUX11ID
526
#define NETSNMP_OSTYPE NETSNMP_HPUX11ID
394
#define OSTYPE SUNOS4ID
529
#define NETSNMP_OSTYPE NETSNMP_SUNOS4ID
397
#define OSTYPE SOLARISID
532
#define NETSNMP_OSTYPE NETSNMP_SOLARISID
399
534
#if defined(osf3) || defined(osf4) || defined(osf5)
535
#define NETSNMP_OSTYPE NETSNMP_OSFID
403
#define OSTYPE ULTRIXID
538
#define NETSNMP_OSTYPE NETSNMP_ULTRIXID
405
540
#if defined(netbsd1) || defined(netbsd2)
406
#define OSTYPE NETBSD1ID
541
#define NETSNMP_OSTYPE NETSNMP_NETBSD1ID
408
543
#if defined(__FreeBSD__)
409
#define OSTYPE FREEBSDID
544
#define NETSNMP_OSTYPE NETSNMP_FREEBSDID
411
546
#if defined(irix6) || defined(irix5)
412
#define OSTYPE IRIXID
547
#define NETSNMP_OSTYPE NETSNMP_IRIXID
415
#define OSTYPE LINUXID
550
#define NETSNMP_OSTYPE NETSNMP_LINUXID
417
552
#if defined(bsdi2) || defined(bsdi3) || defined(bsdi4)
418
#define OSTYPE BSDIID
553
#define NETSNMP_OSTYPE NETSNMP_BSDIID
420
#if defined(openbsd2) || defined(openbsd3)
421
#define OSTYPE OPENBSDID
555
#if defined(openbsd2) || defined(openbsd3) || defined(openbsd4)
556
#define NETSNMP_OSTYPE NETSNMP_OPENBSDID
424
#define OSTYPE WIN32ID
559
#define NETSNMP_OSTYPE NETSNMP_WIN32ID
426
561
#if defined(aix3) || defined(aix4) || defined(aix5)
562
#define NETSNMP_OSTYPE NETSNMP_AIXID
430
#define OSTYPE MACOSXID
564
#if defined(darwin) && (darwin >= 8)
565
#define NETSNMP_OSTYPE NETSNMP_MACOSXID
434
#define OSTYPE UNKNOWNID
568
#ifndef NETSNMP_OSTYPE
569
#define NETSNMP_OSTYPE NETSNMP_UNKNOWNID
437
572
/* The enterprise number has been assigned by the IANA group. */
438
573
/* Optionally, this may point to the location in the tree your */
439
574
/* company/organization has been allocated. */
440
575
/* The assigned enterprise number for the NET_SNMP MIB modules. */
441
#define ENTERPRISE_OID 8072
442
#define ENTERPRISE_MIB 1,3,6,1,4,1,8072
443
#define ENTERPRISE_DOT_MIB 1.3.6.1.4.1.8072
444
#define ENTERPRISE_DOT_MIB_LENGTH 7
576
#define NETSNMP_ENTERPRISE_OID 8072
577
#define NETSNMP_ENTERPRISE_MIB 1,3,6,1,4,1,8072
578
#define NETSNMP_ENTERPRISE_DOT_MIB 1.3.6.1.4.1.8072
579
#define NETSNMP_ENTERPRISE_DOT_MIB_LENGTH 7
446
581
/* The assigned enterprise number for sysObjectID. */
447
#define SYSTEM_MIB 1,3,6,1,4,1,8072,3,2,OSTYPE
448
#define SYSTEM_DOT_MIB 1.3.6.1.4.1.8072.3.2.OSTYPE
449
#define SYSTEM_DOT_MIB_LENGTH 10
582
#define NETSNMP_SYSTEM_MIB 1,3,6,1,4,1,8072,3,2,NETSNMP_OSTYPE
583
#define NETSNMP_SYSTEM_DOT_MIB 1.3.6.1.4.1.8072.3.2.NETSNMP_OSTYPE
584
#define NETSNMP_SYSTEM_DOT_MIB_LENGTH 10
451
586
/* The assigned enterprise number for notifications. */
452
#define NOTIFICATION_MIB 1,3,6,1,4,1,8072,4
453
#define NOTIFICATION_DOT_MIB 1.3.6.1.4.1.8072.4
454
#define NOTIFICATION_DOT_MIB_LENGTH 8
587
#define NETSNMP_NOTIFICATION_MIB 1,3,6,1,4,1,8072,4
588
#define NETSNMP_NOTIFICATION_DOT_MIB 1.3.6.1.4.1.8072.4
589
#define NETSNMP_NOTIFICATION_DOT_MIB_LENGTH 8
456
591
/* this is the location of the ucdavis mib tree. It shouldn't be
457
592
changed, as the places it is used are expected to be constant
458
593
values or are directly tied to the UCD-SNMP-MIB. */
459
#define UCDAVIS_OID 2021
460
#define UCDAVIS_MIB 1,3,6,1,4,1,2021
461
#define UCDAVIS_DOT_MIB 1.3.6.1.4.1.2021
462
#define UCDAVIS_DOT_MIB_LENGTH 7
464
/* this is the location of the net-snmp mib tree. It shouldn't be
465
changed, as the places it is used are expected to be constant
466
values or are directly tied to the UCD-SNMP-MIB. */
467
#define NETSNMP_OID 8072
468
#define NETSNMP_MIB 1,3,6,1,4,1,8072
469
#define NETSNMP_DOT_MIB 1.3.6.1.4.1.8072
470
#define NETSNMP_DOT_MIB_LENGTH 7
594
#define NETSNMP_UCDAVIS_OID 2021
595
#define NETSNMP_UCDAVIS_MIB 1,3,6,1,4,1,2021
596
#define NETSNMP_UCDAVIS_DOT_MIB 1.3.6.1.4.1.2021
597
#define NETSNMP_UCDAVIS_DOT_MIB_LENGTH 7
472
599
/* how long to wait (seconds) for error querys before reseting the error trap.*/
473
#define ERRORTIMELENGTH 600
600
#define NETSNMP_ERRORTIMELENGTH 600
475
602
/* Exec command to fix PROC problems */
476
603
/* %s will be replaced by the process name in error */
478
/* #define PROCFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */
605
/* #define NETSNMP_PROCFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */
480
607
/* Exec command to fix EXEC problems */
481
608
/* %s will be replaced by the exec/script name in error */
483
/* #define EXECFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */
610
/* #define NETSNMP_EXECFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */
485
612
/* Should exec output Cashing be used (speeds up things greatly), and
486
613
if so, After how many seconds should the cache re-newed? Note:
487
614
Don't define CASHETIME to disable cashing completely */
489
#define EXCACHETIME 30
490
#define CACHEFILE ".snmp-exec-cache"
491
#define MAXCACHESIZE (200*80) /* roughly 200 lines max */
616
#define NETSNMP_EXCACHETIME 30
617
#define NETSNMP_CACHEFILE ".snmp-exec-cache"
618
#define NETSNMP_MAXCACHESIZE (200*80) /* roughly 200 lines max */
493
620
/* misc defaults */
495
622
/* default of 100 meg minimum if the minimum size is not specified in
496
623
the config file */
497
#define DEFDISKMINIMUMSPACE 100000
499
#define DEFMAXLOADAVE 12.0 /* default maximum load average before error */
624
#define NETSNMP_DEFDISKMINIMUMSPACE 100000
626
/* default maximum load average before error */
627
#define NETSNMP_DEFMAXLOADAVE 12.0
629
/* max times to loop reading output from execs. */
501
630
/* Because of sleep(1)s, this will also be time to wait (in seconds) for exec
503
#define MAXREADCOUNT 100 /* max times to loop reading output from execs. */
632
#define NETSNMP_MAXREADCOUNT 100
634
/* Set if snmpgets should block and never timeout */
505
635
/* The original CMU code had this hardcoded as = 1 */
506
#define SNMPBLOCK 1 /* Set if snmpgets should block and never timeout */
636
#define NETSNMP_SNMPBLOCK 1
508
638
/* How long to wait before restarting the agent after a snmpset to
509
639
EXTENSIBLEMIB.VERSIONMIBNUM.VERRESTARTAGENT. This is
510
640
necessary to finish the snmpset reply before restarting. */
511
#define RESTARTSLEEP 5
513
/* Number of community strings to store */
514
#define NUM_COMMUNITIES 5
641
#define NETSNMP_RESTARTSLEEP 5
516
643
/* UNdefine to allow specifying zero-length community string */
517
/* #define NO_ZEROLENGTH_COMMUNITY 1 */
644
/* #define NETSNMP_NO_ZEROLENGTH_COMMUNITY 1 */
519
/* #define EXIT_ON_BAD_KLREAD */
520
646
/* define to exit the agent on a bad kernel read */
522
#define LASTFIELD -1 /* internal define */
647
/* #define NETSNMP_EXIT_ON_BAD_KLREAD */
649
/* Number of community strings to store */
650
#define NETSNMP_NUM_COMMUNITIES 5
652
/* internal define */
653
#define NETSNMP_LASTFIELD -1
524
655
/* configure options specified */
525
#define CONFIGURE_OPTIONS ""
528
#undef HAVE_SOCKLEN_T
531
#undef HAVE_IN_ADDR_T
538
# define strchr index
539
# define strrchr rindex
546
# define index(a,b) strchr(a,b)
547
# define rindex(a,b) strrchr(a,b)
549
# define index strchr
550
# define rindex strrchr
557
# define memcpy(d, s, n) bcopy ((s), (d), (n))
558
# define memmove(d, s, n) bcopy ((s), (d), (n))
565
# define memmove memcpy
571
# define bcopy(s, d, n) memcpy ((d), (s), (n))
572
# define bzero(p,n) memset((p),(0),(n))
577
/* If you have openssl 0.9.7 or above, you likely have AES support. */
579
#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT)
583
/* define random functions */
587
#define random lrand48
588
#define srandom(s) srand48(s)
592
#define srandom(s) srand(s)
597
/* define signal if DNE */
601
#define signal(a,b) sigset(a,b)
605
/* define if you have librpm and libdb */
609
/* define if you have pkginfo */
612
/* define if you have gethostbyname */
613
#undef HAVE_GETHOSTBYNAME
615
/* define if you have getservbyname */
616
#undef HAVE_GETSERVBYNAME
618
/* printing system */
656
#define NETSNMP_CONFIGURE_OPTIONS ""
623
658
/* Pluggable transports. */
625
660
/* This is defined if support for the UDP/IP transport domain is
627
#undef SNMP_TRANSPORT_UDP_DOMAIN
662
#undef NETSNMP_TRANSPORT_UDP_DOMAIN
629
664
/* This is defined if support for the "callback" transport domain is
631
#undef SNMP_TRANSPORT_CALLBACK_DOMAIN
666
#undef NETSNMP_TRANSPORT_CALLBACK_DOMAIN
633
668
/* This is defined if support for the TCP/IP transport domain is
635
#undef SNMP_TRANSPORT_TCP_DOMAIN
670
#undef NETSNMP_TRANSPORT_TCP_DOMAIN
637
672
/* This is defined if support for the Unix transport domain
638
673
(a.k.a. "local IPC") is available. */
639
#undef SNMP_TRANSPORT_UNIX_DOMAIN
674
#undef NETSNMP_TRANSPORT_UNIX_DOMAIN
641
676
/* This is defined if support for the AAL5 PVC transport domain is
643
#undef SNMP_TRANSPORT_AAL5PVC_DOMAIN
678
#undef NETSNMP_TRANSPORT_AAL5PVC_DOMAIN
645
680
/* This is defined if support for the IPX transport domain is
647
#undef SNMP_TRANSPORT_IPX_DOMAIN
682
#undef NETSNMP_TRANSPORT_IPX_DOMAIN
649
684
/* This is defined if support for the UDP/IPv6 transport domain is
651
#undef SNMP_TRANSPORT_UDPIPV6_DOMAIN
686
#undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN
653
688
/* This is defined if support for the TCP/IPv6 transport domain is
655
#undef SNMP_TRANSPORT_TCPIPV6_DOMAIN
690
#undef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN
657
692
/* This is defined if support for the UDP/IP transport domain is
659
#undef SNMP_TRANSPORT_TLS_DOMAIN
694
#undef NETSNMP_TRANSPORT_TLS_DOMAIN
661
696
/* This is defined if support for stdin/out transport domain is available. */
662
#undef SNMP_TRANSPORT_STD_DOMAIN
697
#undef NETSNMP_TRANSPORT_STD_DOMAIN
664
699
/* define this if the USM security module is available */
665
#undef SNMP_SECMOD_USM
700
#undef NETSNMP_SECMOD_USM
667
702
/* define this if the KSM (kerberos based snmp) security module is available */
668
#undef SNMP_SECMOD_KSM
703
#undef NETSNMP_SECMOD_KSM
670
705
/* define this if the local security module is available */
671
#undef SNMP_SECMOD_LOCALSM
673
/* define this if we're using the new MIT crypto API */
674
#undef MIT_NEW_CRYPTO
706
#undef NETSNMP_SECMOD_LOCALSM
676
708
/* define if you want to build with reentrant/threaded code (incomplete)*/
709
#undef NETSNMP_REENTRANT
711
/* define if configured as a "mini-agent" */
712
#undef NETSNMP_MINI_AGENT
714
/* define if you are embedding perl in the main agent */
715
#undef NETSNMP_EMBEDDED_PERL
679
717
/* define if you want to build MFD module rewrites*/
680
718
#undef NETSNMP_ENABLE_MFD_REWRITES
682
/* on aix, if you have perfstat */
720
/* this is the location of the net-snmp mib tree. It shouldn't be
721
changed, as the places it is used are expected to be constant
722
values or are directly tied to the UCD-SNMP-MIB. */
723
#define NETSNMP_OID 8072
724
#define NETSNMP_MIB 1,3,6,1,4,1,8072
725
#define NETSNMP_DOT_MIB 1.3.6.1.4.1.8072
726
#define NETSNMP_DOT_MIB_LENGTH 7
685
/* Not-to-be-compiled macros for use by configure only */
686
#define config_require(x)
687
#define config_exclude(x)
688
#define config_arch_require(x,y)
689
#define config_parse_dot_conf(w,x,y,z)
690
#define config_add_mib(x)
691
#define config_belongs_in(x)
693
#if defined (WIN32) || defined (mingw32) || defined (cygwin)
694
#define ENV_SEPARATOR ";"
695
#define ENV_SEPARATOR_CHAR ';'
697
#define ENV_SEPARATOR ":"
698
#define ENV_SEPARATOR_CHAR ':'
728
/* pattern for temporary file names */
729
#define NETSNMP_TEMP_FILE_PATTERN "/tmp/snmpdXXXXXX"
702
732
* this must be before the system/machine includes, to allow them to
755
784
# define NETSNMP_IMPORT extern
758
#if defined(HAVE_NLIST) && defined(STRUCT_NLIST_HAS_N_VALUE) && !defined(DONT_USE_NLIST) && !defined(NO_KMEM_USAGE)
759
#define CAN_USE_NLIST
763
#define DMALLOC_FUNC_CHECK
787
/* define if you want to enable IPv6 support */
788
#undef NETSNMP_ENABLE_IPV6
790
/* define if you want to restrict SMUX connections to localhost by default */
791
#undef NETSNMP_ENABLE_LOCAL_SMUX
769
793
/* define if agentx transport is to use domain sockets only */
770
#undef AGENTX_DOM_SOCK_ONLY
794
#undef NETSNMP_AGENTX_DOM_SOCK_ONLY
772
796
/* define if you do not want snmptrapd to register as an AgentX subagent */
773
#undef SNMPTRAPD_DISABLE_AGENTX
797
#undef NETSNMP_SNMPTRAPD_DISABLE_AGENTX
799
/* define this if we're using the new MIT crypto API */
800
#undef NETSNMP_USE_KERBEROS_MIT
802
/* define this if you're using Heimdal Kerberos */
803
#undef NETSNMP_USE_KERBEROS_HEIMDAL
805
/* comment the next line if you are compiling with libsnmp.h
806
and are not using the UC-Davis SNMP library. */
807
#define UCD_SNMP_LIBRARY 1
809
/* add in recent CMU library extensions (not complete) */
810
#undef CMU_COMPATIBLE
812
/* final conclusion on nlist usage */
813
#if defined(HAVE_NLIST) && defined(STRUCT_NLIST_HAS_N_VALUE) && !defined(NETSNMP_DONT_USE_NLIST) && !defined(NETSNMP_NO_KMEM_USAGE)
814
#define NETSNMP_CAN_USE_NLIST
818
/* ********* NETSNMP_MARK_BEGIN_LEGACY_DEFINITIONS *********/
820
* existing definitions prior to Net-SNMP 5.4
822
* do not add anything new here
826
#ifndef NETSNMP_NO_LEGACY_DEFINITIONS
828
#ifdef NETSNMP_DEFAULT_SNMP_VERSION
829
# define DEFAULT_SNMP_VERSION NETSNMP_DEFAULT_SNMP_VERSION
832
#ifdef NETSNMP_SNMPV1
833
# define SNMPV1 NETSNMP_SNMPV1
836
#ifdef NETSNMP_SNMPV2ANY
837
# define SNMPV2ANY NETSNMP_SNMPV2ANY
840
#ifdef NETSNMP_SNMPV2AUTH
841
# define SNMPV2AUTH NETSNMP_SNMPV2AUTH
844
#ifdef NETSNMP_DEFAULT_MIBS
845
# define DEFAULT_MIBS NETSNMP_DEFAULT_MIBS
848
#ifdef NETSNMP_DEFAULT_MIBDIRS
849
# define DEFAULT_MIBDIRS NETSNMP_DEFAULT_MIBDIRS
852
#ifdef NETSNMP_DEFAULT_MIBFILES
853
# define DEFAULT_MIBFILES NETSNMP_DEFAULT_MIBFILES
856
#ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
857
# define OPAQUE_SPECIAL_TYPES NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
860
#ifdef NETSNMP_ENABLE_SCAPI_AUTHPRIV
861
# define SCAPI_AUTHPRIV NETSNMP_ENABLE_SCAPI_AUTHPRIV
864
#ifdef NETSNMP_USE_INTERNAL_MD5
865
# define USE_INTERNAL_MD5 NETSNMP_USE_INTERNAL_MD5
868
#ifdef NETSNMP_USE_PKCS11
869
# define USE_PKCS NETSNMP_USE_PKCS11
872
#ifdef NETSNMP_USE_OPENSSL
873
# define USE_OPENSSL NETSNMP_USE_OPENSSL
876
#ifdef NETSNMP_NO_DEBUGGING
877
# define SNMP_NO_DEBUGGING NETSNMP_NO_DEBUGGING
880
#ifdef NETSNMP_ALWAYS_DEBUG
881
# define SNMP_ALWAYS_DEBUG NETSNMP_ALWAYS_DEBUG
884
#ifdef NETSNMP_USE_REVERSE_ASNENCODING
885
# define USE_REVERSE_ASNENCODING NETSNMP_USE_REVERSE_ASNENCODING
887
#ifdef NETSNMP_DEFAULT_ASNENCODING_DIRECTION
888
# define DEFAULT_ASNENCODING_DIRECTION NETSNMP_DEFAULT_ASNENCODING_DIRECTION
891
#define PERSISTENT_DIRECTORY NETSNMP_PERSISTENT_DIRECTORY
892
#define PERSISTENT_MASK NETSNMP_PERSISTENT_MASK
893
#define AGENT_DIRECTORY_MODE NETSNMP_AGENT_DIRECTORY_MODE
894
#define MAX_PERSISTENT_BACKUPS NETSNMP_MAX_PERSISTENT_BACKUPS
895
#define SYSTEM_INCLUDE_FILE NETSNMP_SYSTEM_INCLUDE_FILE
896
#define MACHINE_INCLUDE_FILE NETSNMP_MACHINE_INCLUDE_FILE
898
#ifdef NETSNMP_DEFAULT_SERVER_SEND_BUF
899
# define DEFAULT_SERVER_SEND_BUF NETSNMP_DEFAULT_SERVER_SEND_BUF
901
#ifdef NETSNMP_DEFAULT_SERVER_RECV_BUF
902
# define DEFAULT_SERVER_RECV_BUF NETSNMP_DEFAULT_SERVER_RECV_BUF
904
#ifdef NETSNMP_DEFAULT_CLIENT_SEND_BUF
905
# define DEFAULT_CLIENT_SEND_BUF NETSNMP_DEFAULT_CLIENT_SEND_BUF
907
#ifdef NETSNMP_DEFAULT_CLIENT_RECV_BUF
908
# define DEFAULT_CLIENT_RECV_BUF NETSNMP_DEFAULT_CLIENT_RECV_BUF
911
#ifdef NETSNMP_LOGFILE
912
# define LOGFILE NETSNMP_LOGFILE
915
#ifdef NETSNMP_SYS_CONTACT
916
# define SYS_CONTACT NETSNMP_SYS_CONTACT
919
#ifdef NETSNMP_SYS_LOC
920
# define SYS_LOC NETSNMP_SYS_LOC
923
#ifdef NETSNMP_USE_LIBWRAP
924
# define USE_LIBWRAP NETSNMP_USE_LIBWRAP
927
#ifdef NETSNMP_ENABLE_TESTING_CODE
928
# define SNMP_TESTING_CODE NETSNMP_ENABLE_TESTING_CODE
931
#ifdef NETSNMP_NO_ROOT_ACCESS
932
# define NO_ROOT_ACCESS NETSNMP_NO_ROOT_ACCESS
935
#ifdef NETSNMP_NO_KMEM_USAGE
936
# define NO_KMEM_USAGE NETSNMP_NO_KMEM_USAGE
939
#ifdef NETSNMP_NO_DUMMY_VALUES
940
# define NO_DUMMY_VALUES NETSNMP_NO_DUMMY_VALUES
943
#define VERS_DESC NETSNMP_VERS_DESC
944
#define SYS_NAME NETSNMP_SYS_NAME
946
#define PROCMIBNUM NETSNMP_PROCMIBNUM
947
#define SHELLMIBNUM NETSNMP_SHELLMIBNUM
948
#define MEMMIBNUM NETSNMP_MEMMIBNUM
949
#define DISKMIBNUM NETSNMP_DISKMIBNUM
951
#define LOADAVEMIBNUM NETSNMP_LOADAVEMIBNUM
952
#define VERSIONMIBNUM NETSNMP_VERSIONMIBNUM
953
#define ERRORMIBNUM NETSNMP_ERRORMIBNUM
954
#define AGENTID NETSNMP_AGENTID
956
#define HPUX9ID NETSNMP_HPUX9ID
957
#define SUNOS4ID NETSNMP_SUNOS4ID
958
#define SOLARISID NETSNMP_SOLARISID
959
#define OSFID NETSNMP_OSFID
960
#define ULTRIXID NETSNMP_ULTRIXID
961
#define HPUX10ID NETSNMP_HPUX10ID
962
#define NETBSD1ID NETSNMP_NETBSD1ID
963
#define FREEBSDID NETSNMP_FREEBSDID
964
#define IRIXID NETSNMP_IRIXID
965
#define LINUXID NETSNMP_LINUXID
966
#define BSDIID NETSNMP_BSDIID
967
#define OPENBSDID NETSNMP_OPENBSDID
968
#define WIN32ID NETSNMP_WIN32ID
969
#define HPUX11ID NETSNMP_HPUX11ID
970
#define AIXID NETSNMP_AIXID
971
#define MACOSXID NETSNMP_MACOSXID
972
#define UNKNOWNID NETSNMP_UNKNOWNID
974
#define ENTERPRISE_OID NETSNMP_ENTERPRISE_OID
975
#define ENTERPRISE_MIB NETSNMP_ENTERPRISE_MIB
976
#define ENTERPRISE_DOT_MIB NETSNMP_ENTERPRISE_DOT_MIB
977
#define ENTERPRISE_DOT_MIB_LENGTH NETSNMP_ENTERPRISE_DOT_MIB_LENGTH
979
#define SYSTEM_MIB NETSNMP_SYSTEM_MIB
980
#define SYSTEM_DOT_MIB NETSNMP_SYSTEM_DOT_MIB
981
#define SYSTEM_DOT_MIB_LENGTH NETSNMP_SYSTEM_DOT_MIB_LENGTH
983
#define NOTIFICATION_MIB NETSNMP_NOTIFICATION_MIB
984
#define NOTIFICATION_DOT_MIB NETSNMP_NOTIFICATION_DOT_MIB
985
#define NOTIFICATION_DOT_MIB_LENGTH NETSNMP_NOTIFICATION_DOT_MIB_LENGTH
987
#define UCDAVIS_OID NETSNMP_UCDAVIS_OID
988
#define UCDAVIS_MIB NETSNMP_UCDAVIS_MIB
989
#define UCDAVIS_DOT_MIB NETSNMP_UCDAVIS_DOT_MIB
990
#define UCDAVIS_DOT_MIB_LENGTH NETSNMP_UCDAVIS_DOT_MIB_LENGTH
992
#define ERRORTIMELENGTH NETSNMP_ERRORTIMELENGTH
994
#ifdef NETSNMP_PROCFIXCMD
995
# define PROCFIXCMD NETSNMP_PROCFIXCMD
998
#ifdef NETSNMP_EXECFIXCMD
999
# define EXECFIXCMD NETSNMP_EXECFIXCMD
1002
#define EXCACHETIME NETSNMP_EXCACHETIME
1003
#define CACHEFILE NETSNMP_CACHEFILE
1004
#define MAXCACHESIZE NETSNMP_MAXCACHESIZE
1006
#define DEFDISKMINIMUMSPACE NETSNMP_DEFDISKMINIMUMSPACE
1007
#define DEFMAXLOADAVE NETSNMP_DEFMAXLOADAVE
1008
#define MAXREADCOUNT NETSNMP_MAXREADCOUNT
1010
#define SNMPBLOCK NETSNMP_SNMPBLOCK
1011
#define RESTARTSLEEP NETSNMP_RESTARTSLEEP
1013
#define NUM_COMMUNITIES NETSNMP_NUM_COMMUNITIES
1015
#ifdef NETSNMP_NO_ZEROLENGTH_COMMUNITY
1016
# define NO_ZEROLENGTH_COMMUNITY NETSNMP_NO_ZEROLENGTH_COMMUNITY
1019
#ifdef NETSNMP_EXIT_ON_BAD_KLREAD
1020
# define EXIT_ON_BAD_KLREAD NETSNMP_EXIT_ON_BAD_KLREAD
1023
#define LASTFIELD NETSNMP_LASTFIELD
1025
#define CONFIGURE_OPTIONS NETSNMP_CONFIGURE_OPTIONS
1027
#ifdef NETSNMP_TRANSPORT_UDP_DOMAIN
1028
# define SNMP_TRANSPORT_UDP_DOMAIN NETSNMP_TRANSPORT_UDP_DOMAIN
1031
#ifdef NETSNMP_TRANSPORT_CALLBACK_DOMAIN
1032
# define SNMP_TRANSPORT_CALLBACK_DOMAIN NETSNMP_TRANSPORT_CALLBACK_DOMAIN
1035
#ifdef NETSNMP_TRANSPORT_TCP_DOMAIN
1036
# define SNMP_TRANSPORT_TCP_DOMAIN NETSNMP_TRANSPORT_TCP_DOMAIN
1039
#ifdef NETSNMP_TRANSPORT_UNIX_DOMAIN
1040
# define SNMP_TRANSPORT_UNIX_DOMAIN NETSNMP_TRANSPORT_UNIX_DOMAIN
1043
#ifdef NETSNMP_TRANSPORT_AAL5PVC_DOMAIN
1044
# define SNMP_TRANSPORT_AAL5PVC_DOMAIN NETSNMP_TRANSPORT_AAL5PVC_DOMAIN
1047
#ifdef NETSNMP_TRANSPORT_IPX_DOMAIN
1048
# define SNMP_TRANSPORT_IPX_DOMAIN NETSNMP_TRANSPORT_IPX_DOMAIN
1051
#ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN
1052
# define SNMP_TRANSPORT_UDPIPV6_DOMAIN NETSNMP_TRANSPORT_UDPIPV6_DOMAIN
1055
#ifdef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN
1056
# define SNMP_TRANSPORT_TCPIPV6_DOMAIN NETSNMP_TRANSPORT_TCPIPV6_DOMAIN
1059
#ifdef NETSNMP_TRANSPORT_TLS_DOMAIN
1060
# define SNMP_TRANSPORT_TLS_DOMAIN NETSNMP_TRANSPORT_TLS_DOMAIN
1063
#ifdef NETSNMP_TRANSPORT_STD_DOMAIN
1064
# define SNMP_TRANSPORT_STD_DOMAIN NETSNMP_TRANSPORT_STD_DOMAIN
1067
#ifdef NETSNMP_SECMOD_USM
1068
# define SNMP_SECMOD_USM NETSNMP_SECMOD_USM
1071
#ifdef NETSNMP_SECMOD_KSM
1072
# define SNMP_SECMOD_KSM NETSNMP_SECMOD_KSM
1075
#ifdef NETSNMP_SECMOD_LOCALSM
1076
# define SNMP_SECMOD_LOCALSM NETSNMP_SECMOD_LOCALSM
1079
#ifdef NETSNMP_REENTRANT
1080
# define NS_REENTRANT NETSNMP_REENTRANT
1083
#ifdef NETSNMP_ENABLE_IPV6
1084
# define INET6 NETSNMP_ENABLE_IPV6
1087
#ifdef NETSNMP_ENABLE_LOCAL_SMUX
1088
# define LOCAL_SMUX NETSNMP_ENABLE_LOCAL_SMUX
1091
#ifdef NETSNMP_AGENTX_DOM_SOCK_ONLY
1092
# define AGENTX_DOM_SOCK_ONLY NETSNMP_AGENTX_DOM_SOCK_ONLY
1095
#ifdef NETSNMP_SNMPTRAPD_DISABLE_AGENTX
1096
# define SNMPTRAPD_DISABLE_AGENTX
1099
#ifdef NETSNMP_USE_KERBEROS_MIT
1100
# define MIT_NEW_CRYPTO NETSNMP_USE_KERBEROS_MIT
1103
#ifdef NETSNMP_USE_KERBEROS_HEIMDAL
1104
# define HEIMDAL NETSNMP_USE_KERBEROS_HEIMDAL
1107
#ifdef NETSNMP_AGENTX_SOCKET
1108
# define AGENTX_SOCKET NETSNMP_AGENTX_SOCKET
1111
#ifdef NETSNMP_DISABLE_MIB_LOADING
1112
# define DISABLE_MIB_LOADING NETSNMP_DISABLE_MIB_LOADING
1115
#ifdef NETSNMP_DISABLE_SNMPV1
1116
# define DISABLE_SNMPV1 NETSNMP_DISABLE_SNMPV1
1119
#ifdef NETSNMP_DISABLE_SNMPV2C
1120
# define DISABLE_SNMPV2C NETSNMP_DISABLE_SNMPV2C
1123
#ifdef NETSNMP_DISABLE_SET_SUPPORT
1124
# define DISABLE_SET_SUPPORT NETSNMP_DISABLE_SET_SUPPORT
1127
#ifdef NETSNMP_DISABLE_DES
1128
# define DISABLE_DES NETSNMP_DISABLE_DES
1131
#ifdef NETSNMP_DISABLE_MD5
1132
# define DISABLE_MD5 NETSNMP_DISABLE_MD5
1135
#ifdef NETSNMP_DONT_USE_NLIST
1136
# define DONT_USE_NLIST NETSNMP_DONT_USE_NLIST
1139
#ifdef NETSNMP_CAN_USE_NLIST
1140
# define CAN_USE_NLIST NETSNMP_CAN_USE_NLIST
1143
#ifdef NETSNMP_CAN_USE_SYSCTL
1144
# define CAN_USE_SYSCTL NETSNMP_CAN_USE_SYSCTL
1147
#endif /* NETSNMP_NO_LEGACY_DEFINITIONS */
777
1150
#endif /* NET_SNMP_CONFIG_H */