openssl: update to 1.0.2d
[tomato.git] / release / src / router / snmp / acconfig.h
blobd52b405e11aa181ba739087cebe1df14f8619333
1 #ifndef NET_SNMP_CONFIG_H
2 #define NET_SNMP_CONFIG_H
4 /* config.h: a general config file */
6 /* Default (SNMP) version number for the tools to use */
7 #define DEFAULT_SNMP_VERSION 3
9 /* don't change these values! */
10 #define SNMPV1 0xAAAA /* readable by anyone */
11 #define SNMPV2ANY 0xA000 /* V2 Any type (includes NoAuth) */
12 #define SNMPV2AUTH 0x8000 /* V2 Authenticated requests only */
14 /* default list of mibs to load */
16 #define DEFAULT_MIBS "IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:SNMPv2-MIB:RFC1213-MIB"
18 /* default location to look for mibs to load using the above tokens
19 and/or those in the MIBS envrionment variable*/
21 #undef DEFAULT_MIBDIRS
23 /* default mib files to load, specified by path. */
25 #undef DEFAULT_MIBFILES
27 /* should we compile to use special opaque types: float, double,
28 counter64, i64, ui64, union? */
29 #undef OPAQUE_SPECIAL_TYPES
31 /* comment the next line if you are compiling with libsnmp.h
32 and are not using the UC-Davis SNMP library. */
33 #define UCD_SNMP_LIBRARY 1
35 /* define if you want to compile support for both authentication and
36 privacy support. */
37 #undef SCAPI_AUTHPRIV
39 /* define if you are using the MD5 code ...*/
40 #undef USE_INTERNAL_MD5
42 /* add in recent CMU library extensions (not complete) */
43 #undef CMU_COMPATIBLE
45 /* add in recent resource lock functions (not complete) */
46 #undef _REENTRANT
48 /* debugging stuff */
49 #undef SNMP_NO_DEBUGGING /* if defined, we optimize the code
50 to exclude all debugging calls. */
51 #define SNMP_ALWAYS_DEBUG 0 /* Always print debugging information and
52 ignore the -D flag passed to the cmds */
54 /* reverse encoding BER packets is both faster and more efficient in space. */
55 #define USE_REVERSE_ASNENCODING 1
56 #define DEFAULT_ASNENCODING_DIRECTION 1 /* 1 = reverse, 0 = forwards */
58 /* PERSISTENT_DIRECTORY: If defined, the library is capabile of saving
59 persisant information to this directory in the form of configuration
60 lines: PERSISTENT_DIRECTORY/NAME.persistent.conf */
61 #define PERSISTENT_DIRECTORY "/var/snmp"
63 /* PERSISTENT_MASK: the umask permissions to set up the persistent files with */
64 #define PERSISTENT_MASK 077
66 /* AGENT_DIRECTORY_MODE: the mode the agents should use to create
67 directories with. Since the data stored here is probably sensitive, it
68 probably should be read-only by root/administrator. */
69 #define AGENT_DIRECTORY_MODE 0700
71 /* MAX_PERSISTENT_BACKUPS:
72 * The maximum number of persistent backups the library will try to
73 * read from the persistent cache directory. If an application fails to
74 * close down successfully more than this number of times, data will be lost.
76 #define MAX_PERSISTENT_BACKUPS 10
78 @TOP@
80 /* define if you are embedding perl in the main agent */
81 #undef NETSNMP_EMBEDDED_PERL
83 /* define the system type include file here */
84 #define SYSTEM_INCLUDE_FILE <net-snmp/system/generic.h>
86 /* define the machine (cpu) type include file here */
87 #define MACHINE_INCLUDE_FILE <net-snmp/machine/generic.h>
89 /* SNMPLIBDIR contains important files */
91 #undef SNMPLIBPATH
92 #undef SNMPSHAREPATH
93 #undef SNMPCONFPATH
94 #undef SNMPDLMODPATH
96 /* LOGFILE: If defined it closes stdout/err/in and opens this in out/err's
97 place. (stdin is closed so that sh scripts won't wait for it) */
99 #undef LOGFILE
101 /* default system contact */
102 #undef SYS_CONTACT
104 /* system location */
105 #undef SYS_LOC
107 /* Use libwrap to handle allow/deny hosts? */
108 #undef USE_LIBWRAP
110 /* Use dmalloc to do malloc debugging? */
111 #undef HAVE_DMALLOC_H
113 /* location of UNIX kernel */
114 #define KERNEL_LOC "/vmunix"
116 /* location of mount table list */
117 #define ETC_MNTTAB "/etc/mnttab"
119 /* location of swap device (ok if not found) */
120 #undef DMEM_LOC
122 /* Command to generate ps output, the final column must be the process
123 name withOUT arguments */
125 #define PSCMD "/bin/ps"
127 /* Where is the uname command */
128 #define UNAMEPROG "/bin/uname"
130 /* testing code sections. */
131 #undef SNMP_TESTING_CODE
133 /* If you don't have root access don't exit upon kmem errors */
134 #undef NO_ROOT_ACCESS
136 /* If we don't want to use kmem. */
137 #undef NO_KMEM_USAGE
139 /* If you don't want the agent to report on variables it doesn't have data for */
140 #undef NO_DUMMY_VALUES
142 /* Define if statfs takes 2 args and the second argument has
143 type struct fs_data. [Ultrix] */
144 #undef STAT_STATFS_FS_DATA
146 /* Define if the TCP timer constants in <netinet/tcp_timer.h>
147 depend on the integer variable `hz'. [FreeBSD 4.x] */
148 #undef TCPTV_NEEDS_HZ
150 @BOTTOM@
152 /* define if you have getdevs() */
153 #undef HAVE_GETDEVS
155 /* define if you have <netinet/in_pcb.h> */
156 #undef HAVE_NETINET_IN_PCB_H
158 /* define if you have <sys/disklabel.h> */
159 #undef HAVE_SYS_DISKLABEL_H
161 /* define if you are using linux and /proc/net/dev has the compressed
162 field, which exists in linux kernels 2.2 and greater. */
163 #undef PROC_NET_DEV_HAS_COMPRESSED
165 /* define rtentry to ortentry on SYSV machines (alphas) */
166 #undef RTENTRY
168 /* Use BSD 4.4 routing table entries? */
169 #undef RTENTRY_4_4
171 /* Does struct sigaction have a sa_sigaction field? */
172 #undef STRUCT_SIGACTION_HAS_SA_SIGACTION
174 /* Does struct sockaddr have a sa_len field? */
175 #undef STRUCT_SOCKADDR_HAS_SA_LEN
177 /* Does struct sockaddr have a sa_family2 field? */
178 #undef STRUCT_SOCKADDR_HAS_SA_UNION_SA_GENERIC_SA_FAMILY2
180 /* rtentry structure tests */
181 #undef RTENTRY_RT_NEXT
182 #undef STRUCT_RTENTRY_HAS_RT_DST
183 #undef STRUCT_RTENTRY_HAS_RT_UNIT
184 #undef STRUCT_RTENTRY_HAS_RT_USE
185 #undef STRUCT_RTENTRY_HAS_RT_REFCNT
186 #undef STRUCT_RTENTRY_HAS_RT_HASH
188 /* ifnet structure tests */
189 #undef STRUCT_IFNET_HAS_IF_BAUDRATE
190 #undef STRUCT_IFNET_HAS_IF_BAUDRATE_IFS_VALUE
191 #undef STRUCT_IFNET_HAS_IF_SPEED
192 #undef STRUCT_IFNET_HAS_IF_TYPE
193 #undef STRUCT_IFNET_HAS_IF_IMCASTS
194 #undef STRUCT_IFNET_HAS_IF_IQDROPS
195 #undef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_SEC
196 #undef STRUCT_IFNET_HAS_IF_NOPROTO
197 #undef STRUCT_IFNET_HAS_IF_OMCASTS
198 #undef STRUCT_IFNET_HAS_IF_XNAME
199 #undef STRUCT_IFNET_HAS_IF_OBYTES
200 #undef STRUCT_IFNET_HAS_IF_IBYTES
201 #undef STRUCT_IFNET_HAS_IF_ADDRLIST
203 /* tcpstat.tcps_rcvmemdrop */
204 #undef STRUCT_TCPSTAT_HAS_TCPS_RCVMEMDROP
206 /* udpstat.udps_discard */
207 #undef STRUCT_UDPSTAT_HAS_UDPS_DISCARD
209 /* udpstat.udps_discard */
210 #undef STRUCT_UDPSTAT_HAS_UDPS_NOPORT
212 /* udpstat.udps_discard */
213 #undef STRUCT_UDPSTAT_HAS_UDPS_NOPORTBCAST
215 /* udpstat.udps_discard */
216 #undef STRUCT_UDPSTAT_HAS_UDPS_FULLSOCK
218 /* arphd.at_next */
219 #undef STRUCT_ARPHD_HAS_AT_NEXT
221 /* ifaddr.ifa_next */
222 #undef STRUCT_IFADDR_HAS_IFA_NEXT
224 /* ifnet.if_mtu */
225 #undef STRUCT_IFNET_HAS_IF_MTU
227 /* swdevt.sw_nblksenabled */
228 #undef STRUCT_SWDEVT_HAS_SW_NBLKSENABLED
230 /* nlist.n_value */
231 #undef STRUCT_NLIST_HAS_N_VALUE
233 /* ipstat structure tests */
234 #undef STRUCT_IPSTAT_HAS_IPS_CANTFORWARD
235 #undef STRUCT_IPSTAT_HAS_IPS_CANTFRAG
236 #undef STRUCT_IPSTAT_HAS_IPS_DELIVERED
237 #undef STRUCT_IPSTAT_HAS_IPS_FRAGDROPPED
238 #undef STRUCT_IPSTAT_HAS_IPS_FRAGTIMEOUT
239 #undef STRUCT_IPSTAT_HAS_IPS_LOCALOUT
240 #undef STRUCT_IPSTAT_HAS_IPS_NOPROTO
241 #undef STRUCT_IPSTAT_HAS_IPS_NOROUTE
242 #undef STRUCT_IPSTAT_HAS_IPS_ODROPPED
243 #undef STRUCT_IPSTAT_HAS_IPS_OFRAGMENTS
244 #undef STRUCT_IPSTAT_HAS_IPS_REASSEMBLED
246 /* vfsstat.f_frsize */
247 #undef STRUCT_STATVFS_HAS_F_FRSIZE
249 /* vfsstat.f_files */
250 #undef STRUCT_STATVFS_HAS_F_FILES
252 /* statfs inode structure tests*/
253 #undef STRUCT_STATFS_HAS_F_FILES
254 #undef STRUCT_STATFS_HAS_F_FFREE
255 #undef STRUCT_STATFS_HAS_F_FAVAIL
257 /* des_ks_struct.weak_key */
258 #undef STRUCT_DES_KS_STRUCT_HAS_WEAK_KEY
260 /* ifnet needs to have _KERNEL defined */
261 #undef IFNET_NEEDS_KERNEL
263 /* sysctl works to get boottime, etc... */
264 #undef CAN_USE_SYSCTL
266 /* type check for in_addr_t */
267 #undef in_addr_t
269 /* define if SIOCGIFADDR exists in sys/ioctl.h */
270 #undef SYS_IOCTL_H_HAS_SIOCGIFADDR
272 /* define if your compiler (processor) defines __FUNCTION__ for you */
273 #undef HAVE_CPP_UNDERBAR_FUNCTION_DEFINED
275 /* Mib-2 tree Info */
276 /* These are the system information variables. */
278 #define VERS_DESC "unknown" /* overridden at run time */
279 #define SYS_NAME "unknown" /* overridden at run time */
281 /* comment out the second define to turn off functionality for any of
282 these: (See README for details) */
284 /* proc PROCESSNAME [MAX] [MIN] */
285 #define PROCMIBNUM 2
287 /* exec/shell NAME COMMAND */
288 #define SHELLMIBNUM 8
290 /* swap MIN */
291 #define MEMMIBNUM 4
293 /* disk DISK MINSIZE */
294 #define DISKMIBNUM 9
296 /* load 1 5 15 */
297 #define LOADAVEMIBNUM 10
299 /* which version are you using? This mibloc will tell you */
300 #define VERSIONMIBNUM 100
302 /* Reports errors the agent runs into */
303 /* (typically its "can't fork, no mem" problems) */
304 #define ERRORMIBNUM 101
306 /* The sub id of EXTENSIBLEMIB returned to queries of
307 .iso.org.dod.internet.mgmt.mib-2.system.sysObjectID.0 */
308 #define AGENTID 250
310 /* This ID is returned after the AGENTID above. IE, the resulting
311 value returned by a query to sysObjectID is
312 EXTENSIBLEMIB.AGENTID.???, where ??? is defined below by OSTYPE */
314 #define HPUX9ID 1
315 #define SUNOS4ID 2
316 #define SOLARISID 3
317 #define OSFID 4
318 #define ULTRIXID 5
319 #define HPUX10ID 6
320 #define NETBSD1ID 7
321 #define FREEBSDID 8
322 #define IRIXID 9
323 #define LINUXID 10
324 #define BSDIID 11
325 #define OPENBSDID 12
326 #define WIN32ID 13
327 #define HPUX11ID 14
328 #define UNKNOWNID 255
330 #ifdef hpux9
331 #define OSTYPE HPUX9ID
332 #endif
333 #ifdef hpux10
334 #define OSTYPE HPUX10ID
335 #endif
336 #ifdef hpux11
337 #define OSTYPE HPUX11ID
338 #endif
339 #ifdef sunos4
340 #define OSTYPE SUNOS4ID
341 #endif
342 #ifdef solaris2
343 #define OSTYPE SOLARISID
344 #endif
345 #if defined(osf3) || defined(osf4)
346 #define OSTYPE OSFID
347 #endif
348 #ifdef ultrix4
349 #define OSTYPE ULTRIXID
350 #endif
351 #ifdef netbsd1
352 #define OSTYPE NETBSD1ID
353 #endif
354 #ifdef freebsd2
355 #define OSTYPE FREEBSDID
356 #endif
357 #if defined(irix6) || defined(irix5)
358 #define OSTYPE IRIXID
359 #endif
360 #ifdef linux
361 #define OSTYPE LINUXID
362 #endif
363 #if defined(bsdi2) || defined(bsdi3) || defined(bsdi4)
364 #define OSTYPE BSDIID
365 #endif
366 #ifdef openbsd2
367 #define OSTYPE OPENBSDID
368 #endif
369 /* unknown */
370 #ifndef OSTYPE
371 #define OSTYPE UNKNOWNID
372 #endif
374 /* The enterprise number has been assigned by the IANA group. */
375 /* Optionally, this may point to the location in the tree your */
376 /* company/organization has been allocated. */
377 /* The assigned enterprise number for the NET_SNMP MIB modules. */
378 #define ENTERPRISE_OID 8072
379 #define ENTERPRISE_MIB 1,3,6,1,4,1,8072
380 #define ENTERPRISE_DOT_MIB 1.3.6.1.4.1.8072
381 #define ENTERPRISE_DOT_MIB_LENGTH 7
383 /* The assigned enterprise number for sysObjectID. */
384 #define SYSTEM_MIB 1,3,6,1,4,1,8072,3,2,OSTYPE
385 #define SYSTEM_DOT_MIB 1.3.6.1.4.1.8072.3.2.OSTYPE
386 #define SYSTEM_DOT_MIB_LENGTH 10
388 /* The assigned enterprise number for notifications. */
389 #define NOTIFICATION_MIB 1,3,6,1,4,1,8072,4
390 #define NOTIFICATION_DOT_MIB 1.3.6.1.4.1.8072.4
391 #define NOTIFICATION_DOT_MIB_LENGTH 8
393 /* this is the location of the ucdavis mib tree. It shouldn't be
394 changed, as the places it is used are expected to be constant
395 values or are directly tied to the UCD-SNMP-MIB. */
396 #define UCDAVIS_OID 2021
397 #define UCDAVIS_MIB 1,3,6,1,4,1,2021
398 #define UCDAVIS_DOT_MIB 1.3.6.1.4.1.2021
399 #define UCDAVIS_DOT_MIB_LENGTH 7
401 /* how long to wait (seconds) for error querys before reseting the error trap.*/
402 #define ERRORTIMELENGTH 600
404 /* Exec command to fix PROC problems */
405 /* %s will be replaced by the process name in error */
407 /* #define PROCFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */
409 /* Exec command to fix EXEC problems */
410 /* %s will be replaced by the exec/script name in error */
412 /* #define EXECFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */
414 /* Should exec output Cashing be used (speeds up things greatly), and
415 if so, After how many seconds should the cache re-newed? Note:
416 Don't define CASHETIME to disable cashing completely */
418 #define EXCACHETIME 30
419 #define CACHEFILE ".snmp-exec-cache"
420 #define MAXCACHESIZE (200*80) /* roughly 200 lines max */
422 #define MAXDISKS 50 /* can't scan more than this number */
424 /* misc defaults */
426 /* default of 100 meg minimum if the minimum size is not specified in
427 the config file */
428 #define DEFDISKMINIMUMSPACE 100000
430 #define DEFMAXLOADAVE 12.0 /* default maximum load average before error */
432 #define MAXREADCOUNT 100 /* max times to loop reading output from
433 execs. Because of sleep(1)s, this will also
434 be time to wait (in seconds) for exec to finish */
436 #define SNMPBLOCK 1 /* Set to 1 if you want snmpgets to block and never
437 timeout. Original CMU code had this
438 hardcoded into the code as = 1 */
440 #define RESTARTSLEEP 5 /* How long to wait after a snmpset to
441 EXTENSIBLEMIB.VERSIONMIBNUM.VERRESTARTAGENT
442 before restarting the agent. This is
443 necessary to finish the snmpset reply
444 before restarting. */
446 /* Number of community strings to store */
447 #define NUM_COMMUNITIES 5
449 /* UNdefine to allow specifying zero-length community string */
450 /* #define NO_ZEROLENGTH_COMMUNITY 1 */
452 /* #define EXIT_ON_BAD_KLREAD */
453 /* define to exit the agent on a bad kernel read */
455 #define LASTFIELD -1 /* internal define */
457 /* configure options specified */
458 #define CONFIGURE_OPTIONS ""
460 /* got socklen_t? */
461 #undef HAVE_SOCKLEN_T
463 /* got in_addr_t? */
464 #undef HAVE_IN_ADDR_T
466 #ifndef HAVE_STRCHR
467 #ifdef HAVE_INDEX
468 # define strchr index
469 # define strrchr rindex
470 #endif
471 #endif
473 #ifndef HAVE_INDEX
474 #ifdef HAVE_STRCHR
475 # define index strchr
476 # define rindex strrchr
477 #endif
478 #endif
480 #ifndef HAVE_MEMCPY
481 #ifdef HAVE_BCOPY
482 # define memcpy(d, s, n) bcopy ((s), (d), (n))
483 # define memmove(d, s, n) bcopy ((s), (d), (n))
484 # define memcmp bcmp
485 #endif
486 #endif
488 #ifndef HAVE_MEMMOVE
489 #ifdef HAVE_MEMCPY
490 # define memmove memcpy
491 #endif
492 #endif
494 #ifndef HAVE_BCOPY
495 #ifdef HAVE_MEMCPY
496 # define bcopy(s, d, n) memcpy ((d), (s), (n))
497 # define bzero(p,n) memset((p),(0),(n))
498 # define bcmp memcmp
499 #endif
500 #endif
502 /* If you have openssl 0.9.7 or above, you likely have AES support. */
503 #undef USE_OPENSSL
504 #if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT)
505 #define HAVE_AES 1
506 #endif
508 /* define random functions */
510 #ifndef HAVE_RANDOM
511 #ifdef HAVE_LRAND48
512 #define random lrand48
513 #define srandom(s) srand48(s)
514 #else
515 #ifdef HAVE_RAND
516 #define random rand
517 #define srandom(s) srand(s)
518 #endif
519 #endif
520 #endif
522 /* define signal if DNE */
524 #ifndef HAVE_SIGNAL
525 #ifdef HAVE_SIGSET
526 #define signal(a,b) sigset(a,b)
527 #endif
528 #endif
530 /* define if you have librpm and libdb */
531 #undef HAVE_LIBDB
532 #undef HAVE_LIBRPM
534 /* define if you have pkginfo */
535 #undef HAVE_PKGINFO
537 /* define if you have gethostbyname */
538 #undef HAVE_GETHOSTBYNAME
540 /* define if you have getservbyname */
541 #undef HAVE_GETSERVBYNAME
543 /* printing system */
544 #undef HAVE_LPSTAT
545 #undef LPSTAT_PATH
546 #undef HAVE_PRINTCAP
548 /* Pluggable transports. */
550 /* This is defined if support for the UDP/IP transport domain is
551 available. */
552 #undef SNMP_TRANSPORT_UDP_DOMAIN
554 /* This is defined if support for the TCP/IP transport domain is
555 available. */
556 #undef SNMP_TRANSPORT_TCP_DOMAIN
558 /* This is defined if support for the Unix transport domain
559 (a.k.a. "local IPC") is available. */
560 #undef SNMP_TRANSPORT_UNIX_DOMAIN
562 /* This is defined if support for the AAL5 PVC transport domain is
563 available. */
564 #undef SNMP_TRANSPORT_AAL5PVC_DOMAIN
566 /* This is defined if support for the IPX transport domain is
567 available. */
568 #undef SNMP_TRANSPORT_IPX_DOMAIN
570 /* This is defined if support for the UDP/IPv6 transport domain is
571 available. */
572 #undef SNMP_TRANSPORT_UDPIPV6_DOMAIN
574 /* This is defined if support for the TCP/IPv6 transport domain is
575 available. */
576 #undef SNMP_TRANSPORT_TCPIPV6_DOMAIN
578 /* define this if the USM security module is available */
579 #undef SNMP_SECMOD_USM
581 /* define this if the KSM (kerberos based snmp) security module is available */
582 #undef SNMP_SECMOD_KSM
584 /* define this if we're using the new MIT crypto API */
585 #undef MIT_NEW_CRYPTO
587 /* define if you want to build with reentrant/threaded code */
588 #undef NS_REENTRANT
590 /* Not-to-be-compiled macros for use by configure only */
591 #define config_require(x)
592 #define config_arch_require(x,y)
593 #define config_parse_dot_conf(w,x,y,z)
594 #define config_add_mib(x)
596 #ifdef WIN32
597 #define ENV_SEPARATOR ";"
598 #define ENV_SEPARATOR_CHAR ';'
599 #else
600 #define ENV_SEPARATOR ":"
601 #define ENV_SEPARATOR_CHAR ':'
602 #endif
604 #include SYSTEM_INCLUDE_FILE
605 #include MACHINE_INCLUDE_FILE
607 #if defined(HAVE_NLIST) && defined(STRUCT_NLIST_HAS_N_VALUE) && !defined(DONT_USE_NLIST) && !defined(NO_KMEM_USAGE)
608 #define CAN_USE_NLIST
609 #endif
611 #if HAVE_DMALLOC_H
612 #define DMALLOC_FUNC_CHECK
613 #endif
615 #undef INET6
617 #ifndef NETSNMP_INLINE
618 # define NETSNMP_NO_INLINE
619 # define NETSNMP_INLINE
620 #endif
622 #endif /* NET_SNMP_CONFIG_H */