blob: 8f9eab0338227d0e9146f6b4ac29116a032da08a [file] [log] [blame]
Wes Hardaker9beec2e1995-05-05 23:23:03 +00001/* config.h: a general config file */
2
Wes Hardaker59a51a91999-11-04 18:03:47 +00003/* Define IN_UCD_SNMP_SOURCE if compiling inside the ucd-snmp source tree */
4#define IN_UCD_SNMP_SOURCE 1
5
Wes Hardaker87bed831999-04-06 22:13:53 +00006/* Our assigned enterprise number */
7#define ENTERPRISE_NUMBER 2021
8
Wes Hardaker39605001995-06-14 19:56:49 +00009/* 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 */
Wes Hardaker21a2fb51995-06-02 22:27:06 +000013
Wes Hardaker69e6c291997-05-13 14:22:13 +000014/* default list of mibs to load */
15
Wes Hardakere5741d31997-12-15 19:08:01 +000016#define DEFAULT_MIBS "IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:SNMPv2-MIB:RFC1213-MIB"
Wes Hardaker202993f1997-05-15 14:01:18 +000017
Wes Hardakerff4e3521997-12-01 20:33:49 +000018/* default location to look for mibs to load using the above tokens
19 and/or those in the MIBS envrionment variable*/
Wes Hardaker202993f1997-05-15 14:01:18 +000020
21#undef DEFAULT_MIBDIRS
22
Wes Hardakerff4e3521997-12-01 20:33:49 +000023/* default mib files to load, specified by path. */
Wes Hardaker202993f1997-05-15 14:01:18 +000024
25#undef DEFAULT_MIBFILES
Wes Hardaker69e6c291997-05-13 14:22:13 +000026
Wes Hardaker6db669e1998-06-01 00:56:55 +000027/* should we compile to use special opaque types: float, double,
28 counter64, i64, ui64, union? */
29#undef OPAQUE_SPECIAL_TYPES
30
Wes Hardaker12396e21998-09-11 16:26:42 +000031/* 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
34
Wes Hardaker87bed831999-04-06 22:13:53 +000035/* define if you want to compile support for both authentication and
36 privacy support. */
37#undef SCAPI_AUTHPRIV
38
Wes Hardaker3eaa9871999-10-22 22:28:59 +000039/* define if you are using the MD5 code ...*/
Wes Hardaker87bed831999-04-06 22:13:53 +000040#undef USE_INTERNAL_MD5
41
Wes Hardaker3eaa9871999-10-22 22:28:59 +000042/* ... or define this if you're using openssl support */
43#undef USE_OPENSSL
44
Wes Hardakere77dda11999-03-15 22:31:23 +000045/* add in recent CMU library extensions (not complete) */
46#undef CMU_COMPATIBLE
47
Michael Slifcak4e5f85c1999-09-09 09:31:26 +000048/* add in recent resource lock functions (not complete) */
49#undef _REENTRANT
50
Wes Hardakerec2f8e31998-09-23 20:07:07 +000051/* should "--" comments in mibs be a comment till the end of the line
52 or also until another "--", the latter being the technically
53 correct. */
54#undef MIB_COMMENT_IS_EOL_TERMINATED
55
Wes Hardakeracfb1411999-03-02 23:17:58 +000056/* debugging stuff */
57#undef SNMP_NO_DEBUGGING /* if defined, we optimize the code
58 to exclude all debugging calls. */
59#define SNMP_ALWAYS_DEBUG 0 /* Always print debugging information and
60 ignore the -D flag passed to the cmds */
61
Wes Hardaker1cfa03d1999-08-11 20:04:50 +000062/* PERSISTENT_DIRECTORY: If defined, the library is capabile of saving
63 persisant information to this directory in the form of configuration
64 lines: PERSISTENT_DIRECTORY/NAME.persistent.conf */
65#define PERSISTENT_DIRECTORY "/var/snmp"
66
67/* PERSISTENT_MASK: the umask permissions to set up the persistent files with */
68#define PERSISTENT_MASK 077
69
Wes Hardaker156e0161999-12-09 01:13:17 +000070/* AGENT_DIRECTORY_MODE: the mode the agents should use to create
71 directories with. Since the data stored here is probably sensitive, it
72 probably should be read-only by root/administrator. */
73#define AGENT_DIRECTORY_MODE 0700
74
Wes Hardakerb1126c11999-10-06 23:31:53 +000075/* MAX_PERSISTENT_BACKUPS:
76 * The maximum number of persistent backups the library will try to
77 * read from the persistent cache directory. If an application fails to
78 * close down successfully more than this number of times, data will be lost.
79 */
80#define MAX_PERSISTENT_BACKUPS 10
81
Wes Hardaker7fb06751998-09-12 15:53:23 +000082@TOP@
83
Wes Hardakerbdc5f111998-01-22 06:05:44 +000084/* define the system type include file here */
85#define SYSTEM_INCLUDE_FILE "s/generic.h"
86
87/* define the machine (cpu) type include file here */
88#define MACHINE_INCLUDE_FILE "m/generic.h"
89
Wes Hardaker268218c1995-10-13 22:45:28 +000090/* SNMPLIBDIR contains important files */
91
92#undef SNMPLIBPATH
Wes Hardakerda6dcf01998-03-18 21:56:16 +000093#undef SNMPSHAREPATH
Wes Hardaker92a074b1999-08-28 14:29:48 +000094#undef SNMPCONFPATH
Wes Hardaker268218c1995-10-13 22:45:28 +000095
Wes Hardaker96695161995-10-12 00:33:32 +000096/* 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) */
98
99#undef LOGFILE
100
Wes Hardaker96695161995-10-12 00:33:32 +0000101/* default system contact */
102#undef SYS_CONTACT
103
104/* system location */
105#undef SYS_LOC
106
Wes Hardaker1f76a601998-03-28 00:23:33 +0000107/* Use libwrap to handle allow/deny hosts? */
108#undef USE_LIBWRAP
109
Michael Slifcak5e4e8301999-10-28 12:25:02 +0000110/* Use dmalloc to do malloc debugging? */
111#undef HAVE_DMALLOC_H
112
Wes Hardaker96695161995-10-12 00:33:32 +0000113/* location of UNIX kernel */
114#define KERNEL_LOC "/vmunix"
115
Wes Hardakerc5702341996-10-01 15:28:52 +0000116/* location of mount table list */
117#define ETC_MNTTAB "/etc/mnttab"
118
Wes Hardaker96695161995-10-12 00:33:32 +0000119/* location of swap device (ok if not found) */
120#undef DMEM_LOC
121
Wes Hardaker96695161995-10-12 00:33:32 +0000122/* Command to generate ps output, the final column must be the process
123 name withOUT arguments */
124
125#define PSCMD "/bin/ps"
126
Wes Hardakercb73bdf1996-11-15 15:43:33 +0000127/* Where is the uname command */
128#define UNAMEPROG "/bin/uname"
129
Wes Hardaker87bed831999-04-06 22:13:53 +0000130/* testing code sections. */
131#undef SNMP_TESTING_CODE
132
Wes Hardakera45db5a1996-11-24 15:25:07 +0000133/* If you don't have root access don't exit upon kmem errors */
134#undef NO_ROOT_ACCESS
135
Dave Shield49f46661999-08-06 12:59:46 +0000136/* If you don't want the agent to report on variables it doesn't have data for */
137#undef NO_DUMMY_VALUES
138
Wes Hardaker405775d1997-08-07 08:11:54 +0000139/* Define if statfs takes 2 args and the second argument has
140 type struct fs_data. [Ultrix] */
141#undef STAT_STATFS_FS_DATA
142
Wes Hardaker2d0f1221999-11-22 21:05:05 +0000143/* Define if the TCP timer constants in <netinet/tcp_timer.h>
144 depend on the integer variable `hz'. [FreeBSD 4.x] */
145#undef TCPTV_NEEDS_HZ
146
Wes Hardakerce4b9501997-01-20 14:37:08 +0000147@BOTTOM@
148
Wes Hardakerb0202641999-02-25 01:10:13 +0000149/* define if you are using linux and /proc/net/dev has the compressed
150 field, which exists in linux kernels 2.2 and greater. */
151#undef PROC_NET_DEV_HAS_COMPRESSED
152
Wes Hardaker107f3ee1997-10-28 23:50:05 +0000153/* define rtentry to ortentry on SYSV machines (alphas) */
Wes Hardaker36b60031998-05-18 18:18:21 +0000154#undef RTENTRY
Wes Hardaker107f3ee1997-10-28 23:50:05 +0000155
156/* Use BSD 4.4 routing table entries? */
157#undef RTENTRY_4_4
158
Michael Slifcak5f6de361999-11-04 10:42:15 +0000159/* Does struct sockaddr have a sa_len field? */
160#undef STRUCT_SOCKADDR_HAS_SA_LEN
161
Wes Hardaker107f3ee1997-10-28 23:50:05 +0000162/* rtentry structure tests */
163#undef RTENTRY_RT_NEXT
164#undef STRUCT_RTENTRY_HAS_RT_DST
165#undef STRUCT_RTENTRY_HAS_RT_UNIT
166#undef STRUCT_RTENTRY_HAS_RT_USE
167#undef STRUCT_RTENTRY_HAS_RT_REFCNT
168#undef STRUCT_RTENTRY_HAS_RT_HASH
169
Wes Hardaker07b7c881996-11-07 08:16:45 +0000170/* ifnet structure tests */
171#undef STRUCT_IFNET_HAS_IF_BAUDRATE
Wes Hardakerbbbf7de1998-01-30 22:31:58 +0000172#undef STRUCT_IFNET_HAS_IF_SPEED
Wes Hardaker07b7c881996-11-07 08:16:45 +0000173#undef STRUCT_IFNET_HAS_IF_TYPE
174#undef STRUCT_IFNET_HAS_IF_IMCASTS
175#undef STRUCT_IFNET_HAS_IF_IQDROPS
176#undef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_SEC
177#undef STRUCT_IFNET_HAS_IF_NOPROTO
178#undef STRUCT_IFNET_HAS_IF_OMCASTS
179#undef STRUCT_IFNET_HAS_IF_XNAME
Wes Hardakerae0f1ca1996-11-22 08:14:22 +0000180#undef STRUCT_IFNET_HAS_IF_OBYTES
181#undef STRUCT_IFNET_HAS_IF_IBYTES
Wes Hardaker86b95b11997-03-11 16:39:23 +0000182#undef STRUCT_IFNET_HAS_IF_ADDRLIST
Wes Hardaker07b7c881996-11-07 08:16:45 +0000183
Wes Hardakerdb2b0291996-11-14 14:17:36 +0000184/* tcpstat.tcps_rcvmemdrop */
Wes Hardakerb0911711996-12-03 09:04:02 +0000185#undef STRUCT_TCPSTAT_HAS_TCPS_RCVMEMDROP
186
187/* udpstat.udps_discard */
188#undef STRUCT_UDPSTAT_HAS_UDPS_DISCARD
Wes Hardakerdb2b0291996-11-14 14:17:36 +0000189
Wes Hardaker65c3bfd1996-12-03 10:04:33 +0000190/* arphd.at_next */
191#undef STRUCT_ARPHD_HAS_AT_NEXT
192
Wes Hardaker8ef38651997-02-03 10:50:23 +0000193/* ifaddr.ifa_next */
194#undef STRUCT_IFADDR_HAS_IFA_NEXT
195
196/* ifnet.if_mtu */
Wes Hardaker86b95b11997-03-11 16:39:23 +0000197#undef STRUCT_IFNET_HAS_IF_MTU
Wes Hardaker8ef38651997-02-03 10:50:23 +0000198
Wes Hardaker437b5051997-08-07 09:34:45 +0000199/* swdevt.sw_nblksenabled */
200#undef STRUCT_SWDEVT_HAS_SW_NBLKSENABLED
201
Wes Hardaker92730c51998-02-07 01:10:53 +0000202/* nlist.n_value */
203#undef STRUCT_NLIST_HAS_N_VALUE
204
Wes Hardaker9aceca21998-04-24 21:32:12 +0000205/* vfsstat.f_frsize */
206#undef STRUCT_STATVFS_HAS_F_FRSIZE
207
Wes Hardaker62a0a3e1999-11-19 23:24:15 +0000208/* vfsstat.f_files */
209#undef STRUCT_STATVFS_HAS_F_FILES
210
Wes Hardaker8ef38651997-02-03 10:50:23 +0000211/* ifnet needs to have _KERNEL defined */
212#undef IFNET_NEEDS_KERNEL
213
Wes Hardakerc5aab0c1997-01-31 08:58:10 +0000214/* sysctl works to get boottime, etc... */
215#undef CAN_USE_SYSCTL
216
Wes Hardaker66a57f61997-03-13 08:37:37 +0000217/* type check for in_addr_t */
218#undef in_addr_t
219
Wes Hardakere4ca27e1997-08-15 09:30:59 +0000220/* define if SIOCGIFADDR exists in sys/ioctl.h */
221#undef SYS_IOCTL_H_HAS_SIOCGIFADDR
222
Wes Hardakerc33f6cc1999-01-25 19:11:49 +0000223/* define if your compiler (processor) defines __FUNCTION__ for you */
224#undef HAVE_CPP_UNDERBAR_FUNCTION_DEFINED
225
Wes Hardaker53f71d51996-10-30 12:49:09 +0000226/* mib pointer to the top of the extensible tree. This has been
227 assigned to UCDavis by the iana group. Optionally, point this to the
228 location in the tree your company/organization has been allocated. */
229
230/* location of the extensible mib tree */
231#define EXTENSIBLEMIB 1,3,6,1,4,1,2021
232/* location of the extensible mib tree */
233#define EXTENSIBLEDOTMIB 1.3.6.1.4.1.2021
234/* count the above numbers */
235#define EXTENSIBLENUM 7
236
Wes Hardaker708db891995-05-19 22:42:59 +0000237/* Mib-2 tree Info */
Wes Hardaker39605001995-06-14 19:56:49 +0000238/* These are the system information variables. */
239
Wes Hardakerf86050d1995-09-29 20:44:13 +0000240#define VERS_DESC "unknown" /* overridden at run time */
Wes Hardakerf86050d1995-09-29 20:44:13 +0000241#define SYS_NAME "unknown" /* overridden at run time */
Wes Hardaker9beec2e1995-05-05 23:23:03 +0000242
Wes Hardakerc1c28f01996-01-23 00:27:30 +0000243/* comment out the second define to turn off functionality for any of
244 these: (See README for details) */
Wes Hardaker708db891995-05-19 22:42:59 +0000245
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000246/* proc PROCESSNAME [MAX] [MIN] */
Wes Hardaker833a9c21998-04-24 17:00:06 +0000247#define PROCMIBNUM 2
Wes Hardakerc1c28f01996-01-23 00:27:30 +0000248
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000249/* exec/shell NAME COMMAND */
Wes Hardaker833a9c21998-04-24 17:00:06 +0000250#define SHELLMIBNUM 8
Wes Hardakerc1c28f01996-01-23 00:27:30 +0000251
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000252/* swap MIN */
253#define MEMMIBNUM 4
Wes Hardakerc1c28f01996-01-23 00:27:30 +0000254
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000255/* disk DISK MINSIZE */
Wes Hardaker833a9c21998-04-24 17:00:06 +0000256#define DISKMIBNUM 9
Wes Hardakerc1c28f01996-01-23 00:27:30 +0000257
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000258/* load 1 5 15 */
Wes Hardaker833a9c21998-04-24 17:00:06 +0000259#define LOADAVEMIBNUM 10
Wes Hardaker770ec041996-05-09 20:33:12 +0000260
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000261/* which version are you using? This mibloc will tell you */
262#define VERSIONMIBNUM 100
Wes Hardaker21a2fb51995-06-02 22:27:06 +0000263
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000264/* Reports errors the agent runs into */
265/* (typically its "can't fork, no mem" problems) */
266#define ERRORMIBNUM 101
Wes Hardakerc1c28f01996-01-23 00:27:30 +0000267
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000268/* The sub id of EXENSIBLEMIB returned to queries of
269 .iso.org.dod.internet.mgmt.mib-2.system.sysObjectID.0 */
270#define AGENTID 250
Wes Hardakere3838bb1996-01-25 00:36:51 +0000271
Wes Hardakere58757c1996-02-10 01:05:40 +0000272/* This ID is returned after the AGENTID above. IE, the resulting
273 value returned by a query to sysObjectID is
274 EXTENSIBLEMIB.AGENTID.???, where ??? is defined below by OSTYPE */
275
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000276#define HPUX9ID 1
277#define SUNOS4ID 2
Wes Hardakere58757c1996-02-10 01:05:40 +0000278#define SOLARISID 3
Wes Hardaker89df8ac1997-03-14 12:54:22 +0000279#define OSFID 4
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000280#define ULTRIXID 5
281#define HPUX10ID 6
Wes Hardakerf10bf711996-04-24 15:54:07 +0000282#define NETBSD1ID 7
Wes Hardaker72b62e81997-07-01 12:41:58 +0000283#define FREEBSDID 8
Wes Hardaker89df8ac1997-03-14 12:54:22 +0000284#define IRIXID 9
Wes Hardakeracaa7f81997-10-21 02:42:46 +0000285#define LINUXID 10
Wes Hardaker05f03a91997-10-29 01:09:57 +0000286#define BSDIID 11
Wes Hardaker4b8390f1998-02-19 00:29:58 +0000287#define OPENBSDID 12
Wes Hardakere58757c1996-02-10 01:05:40 +0000288#define UNKNOWNID 255
289
290#ifdef hpux9
Wes Hardakere82ed3c1996-04-12 23:49:23 +0000291#define OSTYPE HPUX9ID
292#endif
293#ifdef hpux10
294#define OSTYPE HPUX10ID
Wes Hardakere58757c1996-02-10 01:05:40 +0000295#endif
296#ifdef sunos4
297#define OSTYPE SUNOS4ID
298#endif
299#ifdef solaris2
300#define OSTYPE SOLARISID
301#endif
Wes Hardaker89df8ac1997-03-14 12:54:22 +0000302#if defined(osf3) || defined(osf4)
303#define OSTYPE OSFID
Wes Hardakere58757c1996-02-10 01:05:40 +0000304#endif
305#ifdef ultrix4
306#define OSTYPE ULTRIXID
307#endif
Wes Hardakerf10bf711996-04-24 15:54:07 +0000308#ifdef netbsd1
309#define OSTYPE NETBSD1ID
310#endif
Michael Slifcak2db389c1999-11-04 18:19:35 +0000311#ifdef freebsd2
Wes Hardaker72b62e81997-07-01 12:41:58 +0000312#define OSTYPE FREEBSDID
Wes Hardaker5f50b5f1996-08-27 08:04:56 +0000313#endif
Wes Hardaker89df8ac1997-03-14 12:54:22 +0000314#if defined(irix6) || defined(irix5)
315#define OSTYPE IRIXID
Wes Hardaker66a57f61997-03-13 08:37:37 +0000316#endif
Wes Hardakeracaa7f81997-10-21 02:42:46 +0000317#ifdef linux
318#define OSTYPE LINUXID
319#endif
Wes Hardaker05f03a91997-10-29 01:09:57 +0000320#if defined(bsdi2) || defined(bsdi3)
Wes Hardakerc9a70a51997-12-23 19:35:26 +0000321#define OSTYPE BSDIID
Wes Hardaker05f03a91997-10-29 01:09:57 +0000322#endif
Wes Hardaker4b8390f1998-02-19 00:29:58 +0000323#ifdef openbsd2
324#define OSTYPE OPENBSDID
325#endif
Wes Hardakere58757c1996-02-10 01:05:40 +0000326/* unknown */
327#ifndef OSTYPE
328#define OSTYPE UNKNOWNID
329#endif
330
Wes Hardakere3838bb1996-01-25 00:36:51 +0000331/* how long to wait (seconds) for error querys before reseting the error trap.*/
332#define ERRORTIMELENGTH 600
Wes Hardaker708db891995-05-19 22:42:59 +0000333
Wes Hardaker9beec2e1995-05-05 23:23:03 +0000334/* Exec command to fix PROC problems */
335/* %s will be replaced by the process name in error */
336
337#define PROCFIXCMD "/usr/local/bin/perl /local/scripts/fixproc %s"
338
339/* Exec command to fix EXEC problems */
Wes Hardaker1ad43c61996-02-17 00:32:41 +0000340/* %s will be replaced by the exec/script name in error */
Wes Hardaker9beec2e1995-05-05 23:23:03 +0000341
342#define EXECFIXCMD "/usr/local/bin/perl /local/scripts/fixproc %s"
343
Wes Hardaker39605001995-06-14 19:56:49 +0000344/* Should exec output Cashing be used (speeds up things greatly), and
345 if so, After how many seconds should the cache re-newed? Note:
346 Don't define CASHETIME to disable cashing completely */
Wes Hardaker9beec2e1995-05-05 23:23:03 +0000347
348#define EXCACHETIME 30
349#define CACHEFILE "/tmp/.snmp-exec-cache"
350#define MAXCACHESIZE (200*80) /* roughly 200 lines max */
351
Wes Hardaker405775d1997-08-07 08:11:54 +0000352#define MAXDISKS 50 /* can't scan more than this number */
Wes Hardaker39605001995-06-14 19:56:49 +0000353
354/* misc defaults */
355
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000356/* default of 100 meg minimum if the minimum size is not specified in
357 the config file */
358#define DEFDISKMINIMUMSPACE 100000
Wes Hardaker9beec2e1995-05-05 23:23:03 +0000359
Wes Hardaker708db891995-05-19 22:42:59 +0000360#define DEFMAXLOADAVE 12.0 /* default maximum load average before error */
Wes Hardaker9beec2e1995-05-05 23:23:03 +0000361
Wes Hardaker542fad71999-05-26 22:56:03 +0000362#define MAXREADCOUNT 100 /* max times to loop reading output from
363 execs. Because of sleep(1)s, this will also
364 be time to wait (in seconds) for exec to finish */
Wes Hardaker21a2fb51995-06-02 22:27:06 +0000365
Wes Hardakereb5fefd1997-01-29 11:07:59 +0000366#define SNMPBLOCK 1 /* Set to 1 if you want snmpgets to block and never
Wes Hardaker6d204251995-06-09 17:21:07 +0000367 timeout. Original CMU code had this
368 hardcoded into the code as = 1 */
369
Wes Hardakerfa35fc11996-02-12 22:28:27 +0000370#define RESTARTSLEEP 5 /* How long to wait after a snmpset to
371 EXTENSIBLEMIB.VERSIONMIBNUM.VERRESTARTAGENT
372 before restarting the agent. This is
373 necessary to finish the snmpset reply
374 before restarting. */
375
Wes Hardaker288c1ba1996-05-01 21:56:21 +0000376/* Number of community strings to store */
377#define NUM_COMMUNITIES 5
Wes Hardaker1ad43c61996-02-17 00:32:41 +0000378
Wes Hardaker92be1491999-01-21 16:40:26 +0000379/* UNdefine to allow specifying zero-length community string */
380/* #define NO_ZEROLENGTH_COMMUNITY 1 */
Wes Hardaker86a195d1999-01-21 00:41:20 +0000381
Wes Hardakercfe8f1e1995-07-26 23:31:42 +0000382/* #define EXIT_ON_BAD_KLREAD */
383/* define to exit the agent on a bad kernel read */
384
Wes Hardaker21a2fb51995-06-02 22:27:06 +0000385#define LASTFIELD -1 /* internal define */
Wes Hardaker9beec2e1995-05-05 23:23:03 +0000386
Wes Hardakercdab45e1998-12-19 02:16:33 +0000387/* configure options specified */
388#define CONFIGURE_OPTIONS ""
389
Wes Hardaker39fc7ec1996-05-01 20:54:18 +0000390#ifndef HAVE_STRCHR
Wes Hardaker1f1877e1996-05-03 21:34:03 +0000391#ifdef HAVE_INDEX
Wes Hardaker39fc7ec1996-05-01 20:54:18 +0000392# define strchr index
393# define strrchr rindex
394#endif
Wes Hardaker1f1877e1996-05-03 21:34:03 +0000395#endif
Wes Hardaker39fc7ec1996-05-01 20:54:18 +0000396
397#ifndef HAVE_INDEX
Wes Hardaker1f1877e1996-05-03 21:34:03 +0000398#ifdef HAVE_STRCHR
Wes Hardaker39fc7ec1996-05-01 20:54:18 +0000399# define index strchr
400# define rindex strrchr
401#endif
Wes Hardaker1f1877e1996-05-03 21:34:03 +0000402#endif
Wes Hardaker39fc7ec1996-05-01 20:54:18 +0000403
404#ifndef HAVE_MEMCPY
Wes Hardaker1f1877e1996-05-03 21:34:03 +0000405#ifdef HAVE_BCOPY
Wes Hardaker39fc7ec1996-05-01 20:54:18 +0000406# define memcpy(d, s, n) bcopy ((s), (d), (n))
407# define memmove(d, s, n) bcopy ((s), (d), (n))
408# define memcmp bcmp
409#endif
Wes Hardaker1f1877e1996-05-03 21:34:03 +0000410#endif
Wes Hardaker39fc7ec1996-05-01 20:54:18 +0000411
Wes Hardaker27592d11996-05-24 20:54:25 +0000412#ifndef HAVE_MEMMOVE
413#ifdef HAVE_MEMCPY
414# define memmove memcpy
415#endif
416#endif
417
Wes Hardaker39fc7ec1996-05-01 20:54:18 +0000418#ifndef HAVE_BCOPY
Wes Hardaker1f1877e1996-05-03 21:34:03 +0000419#ifdef HAVE_MEMCPY
Wes Hardaker39fc7ec1996-05-01 20:54:18 +0000420# define bcopy(s, d, n) memcpy ((d), (s), (n))
421# define bzero(p,n) memset((p),(0),(n))
422# define bcmp memcmp
423#endif
Wes Hardaker1f1877e1996-05-03 21:34:03 +0000424#endif
Wes Hardaker39fc7ec1996-05-01 20:54:18 +0000425
Wes Hardakerc00c1b21996-05-11 01:16:57 +0000426
Wes Hardaker1f1877e1996-05-03 21:34:03 +0000427/* define random functions */
428
Wes Hardakere039a851996-05-23 21:43:49 +0000429#ifndef HAVE_RANDOM
Wes Hardaker1f1877e1996-05-03 21:34:03 +0000430#ifdef HAVE_LRAND48
431#define random lrand48
432#define srandom(s) srand48(s)
Wes Hardakere039a851996-05-23 21:43:49 +0000433#else
Wes Hardaker1f1877e1996-05-03 21:34:03 +0000434#ifdef HAVE_RAND
435#define random rand
436#define srandom(s) srand(s)
437#endif
438#endif
439#endif
Wes Hardaker39fc7ec1996-05-01 20:54:18 +0000440
Wes Hardakerc00c1b21996-05-11 01:16:57 +0000441/* define signal if DNE */
442
443#ifndef HAVE_SIGNAL
444#ifdef HAVE_SIGSET
445#define signal(a,b) sigset(a,b)
446#endif
447#endif
448
Wes Hardaker9cf90a41998-05-12 18:11:10 +0000449/* define if you have librpm and libdb */
Dave Shield8c6dc461999-07-30 14:31:56 +0000450#undef HAVE_LIBDB
Wes Hardaker9cf90a41998-05-12 18:11:10 +0000451#undef HAVE_LIBRPM
452
Wes Hardakerb379f471998-09-09 22:37:15 +0000453/* define if you have gethostbyname */
454#undef HAVE_GETHOSTBYNAME
455
456/* define if you have getservbyname */
457#undef HAVE_GETSERVBYNAME
458
Wes Hardakerbe6bdff1997-03-04 14:46:30 +0000459/* Not-to-be-compiled macros for use by configure only */
460#define config_require(x)
Wes Hardaker72cd5ec1997-10-27 17:56:26 +0000461#define config_arch_require(x,y)
Wes Hardaker58b2f9f1998-10-23 20:59:44 +0000462#define config_parse_dot_conf(w,x,y,z)
Wes Hardakere5741d31997-12-15 19:08:01 +0000463#define config_add_mib(x)
Wes Hardaker4c927181997-03-05 08:49:59 +0000464
Wes Hardaker15918a41997-03-07 10:43:05 +0000465#include <mib_module_config.h>
466
Wes Hardaker78e2eff1997-10-28 22:30:55 +0000467#ifdef WIN32
468#define ENV_SEPARATOR ";"
Wes Hardaker4e5278b1997-10-29 19:20:54 +0000469#define ENV_SEPARATOR_CHAR ';'
Wes Hardaker78e2eff1997-10-28 22:30:55 +0000470#else
471#define ENV_SEPARATOR ":"
Wes Hardaker4e5278b1997-10-29 19:20:54 +0000472#define ENV_SEPARATOR_CHAR ':'
Wes Hardaker78e2eff1997-10-28 22:30:55 +0000473#endif
Wes Hardakerbdc5f111998-01-22 06:05:44 +0000474
475#include SYSTEM_INCLUDE_FILE
476#include MACHINE_INCLUDE_FILE
Wes Hardakera76cb391998-09-12 16:08:46 +0000477
478#if defined(HAVE_NLIST) && defined(STRUCT_NLIST_HAS_N_VALUE) && !defined(DONT_USE_NLIST)
479#define CAN_USE_NLIST
480#endif
Niels Baggesenfb372861999-11-14 14:32:25 +0000481
482#undef INET6