1 //==========================================================================
3 // ./lib/current/include/config.h
6 //==========================================================================
7 //####ECOSGPLCOPYRIGHTBEGIN####
8 // -------------------------------------------
9 // This file is part of eCos, the Embedded Configurable Operating System.
10 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12 // eCos is free software; you can redistribute it and/or modify it under
13 // the terms of the GNU General Public License as published by the Free
14 // Software Foundation; either version 2 or (at your option) any later version.
16 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
17 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 // You should have received a copy of the GNU General Public License along
22 // with eCos; if not, write to the Free Software Foundation, Inc.,
23 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 // As a special exception, if other files instantiate templates or use macros
26 // or inline functions from this file, or you compile this file and link it
27 // with other works to produce a work based on this file, this file does not
28 // by itself cause the resulting work to be covered by the GNU General Public
29 // License. However the source code for this file must still be made available
30 // in accordance with section (3) of the GNU General Public License.
32 // This exception does not invalidate any other reasons why a work based on
33 // this file might be covered by the GNU General Public License.
35 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
36 // at http://sources.redhat.com/ecos/ecos-license/
37 // -------------------------------------------
38 //####ECOSGPLCOPYRIGHTEND####
39 //####UCDSNMPCOPYRIGHTBEGIN####
41 // -------------------------------------------
43 // Portions of this software may have been derived from the UCD-SNMP
44 // project, <http://ucd-snmp.ucdavis.edu/> from the University of
45 // California at Davis, which was originally based on the Carnegie Mellon
46 // University SNMP implementation. Portions of this software are therefore
47 // covered by the appropriate copyright disclaimers included herein.
49 // The release used was version 4.1.2 of May 2000. "ucd-snmp-4.1.2"
50 // -------------------------------------------
52 //####UCDSNMPCOPYRIGHTEND####
53 //==========================================================================
54 //#####DESCRIPTIONBEGIN####
59 // Purpose: Port of UCD-SNMP distribution to eCos.
63 //####DESCRIPTIONEND####
65 //==========================================================================
66 /********************************************************************
67 Copyright 1989, 1991, 1992 by Carnegie Mellon University
70 Copyright 1996, 1998, 1999, 2000 The Regents of the University of California
74 Permission to use, copy, modify and distribute this software and its
75 documentation for any purpose and without fee is hereby granted,
76 provided that the above copyright notice appears in all copies and
77 that both that copyright notice and this permission notice appear in
78 supporting documentation, and that the name of CMU and The Regents of
79 the University of California not be used in advertising or publicity
80 pertaining to distribution of the software without specific written
83 CMU AND THE REGENTS OF THE UNIVERSITY OF CALIFORNIA DISCLAIM ALL
84 WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
85 WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL CMU OR
86 THE REGENTS OF THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY SPECIAL,
87 INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
88 FROM THE LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
89 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
90 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
91 *********************************************************************/
92 /* config.h. Generated automatically by configure. */
93 /* config.h.in. Generated automatically from configure.in by autoheader. */
94 /* config.h: a general config file */
97 #include <pkgconf/system.h>
98 #include <pkgconf/isoinfra.h>
99 #include <pkgconf/snmplib.h>
100 #include <pkgconf/snmpagent.h>
102 /* Define IN_UCD_SNMP_SOURCE if compiling inside the ucd-snmp source tree */
103 #define IN_UCD_SNMP_SOURCE 1
105 /* Our assigned enterprise number */
106 #define ENTERPRISE_NUMBER 2021
108 /* don't change these values! */
109 #define SNMPV1 0xAAAA /* readable by anyone */
110 #define SNMPV2ANY 0xA000 /* V2 Any type (includes NoAuth) */
111 #define SNMPV2AUTH 0x8000 /* V2 Authenticated requests only */
113 /* default list of mibs to load */
115 //#define DEFAULT_MIBS "IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:SNMPv2-MIB:RFC1213-MIB:UCD-SNMP-MIB:UCD-DEMO-MIB:SNMP-VIEW-BASED-ACM-MIB:SNMP-COMMUNITY-MIB:SNMP-FRAMEWORK-MIB:SNMP-MPD-MIB:SNMP-USER-BASED-SM-MIB"
117 //#define DEFAULT_MIBS "SNMPv2-MIB:RFC1213-MIB:UCD-SNMP-MIB"
118 #define DEFAULT_MIBS "all"
121 /* default location to look for mibs to load using the above tokens
122 and/or those in the MIBS envrionment variable*/
124 #define DEFAULT_MIBDIRS "MIBS/"
126 /* default mib files to load, specified by path. */
128 /* #undef DEFAULT_MIBFILES */
130 /* should we compile to use special opaque types: float, double,
131 counter64, i64, ui64, union? */
132 #define OPAQUE_SPECIAL_TYPES 1
134 /* comment the next line if you are compiling with libsnmp.h
135 and are not using the UC-Davis SNMP library. */
136 #define UCD_SNMP_LIBRARY 1
138 /* define if you want to compile support for both authentication and
140 #define SCAPI_AUTHPRIV 1
142 /* define if you are using the MD5 code ...*/
143 #define USE_INTERNAL_MD5 1
145 /* ... or define this if you're using openssl support */
146 #ifdef CYGPKG_OPENSSL
149 /* #undef USE_OPENSSL */
152 /* add in recent CMU library extensions (not complete) */
153 /* #undef CMU_COMPATIBLE */
155 /* add in recent resource lock functions (not complete) */
156 /* #undef _REENTRANT */
158 /* should "--" comments in mibs be a comment till the end of the line
159 or also until another "--", the latter being the technically
161 /* #undef MIB_COMMENT_IS_EOL_TERMINATED */
163 /* debugging stuff */
164 #ifdef CYGDBG_NET_SNMPLIB_DEBUG
165 // #undef SNMP_NO_DEBUGGING
167 #define SNMP_NO_DEBUGGING 1 /* if defined, we optimize the code
168 to exclude all debugging calls. */
171 #define SNMP_ALWAYS_DEBUG 0 /* Always print debugging information and
172 ignore the -D flag passed to the cmds */
174 /* PERSISTENT_DIRECTORY: If defined, the library is capabile of saving
175 persisant information to this directory in the form of configuration
176 lines: PERSISTENT_DIRECTORY/NAME.persistent.conf */
177 #ifdef CYGPKG_SNMPLIB_PERSISTENT_FILESYSTEM
178 #define PERSISTENT_DIRECTORY "/var/ucd-snmp"
180 #define PERSISTENT_DIRECTORY "/dev/null"
183 /* PERSISTENT_MASK: the umask permissions to set up the persistent files with */
184 //#define PERSISTENT_MASK 077
186 /* AGENT_DIRECTORY_MODE: the mode the agents should use to create
187 directories with. Since the data stored here is probably sensitive, it
188 probably should be read-only by root/administrator. */
189 #define AGENT_DIRECTORY_MODE 0700
191 /* MAX_PERSISTENT_BACKUPS:
192 * The maximum number of persistent backups the library will try to
193 * read from the persistent cache directory. If an application fails to
194 * close down successfully more than this number of times, data will be lost.
196 #define MAX_PERSISTENT_BACKUPS 10
199 /* Define if on AIX 3.
200 System headers sometimes define this.
201 We just want to avoid a redefinition error message. */
203 /* #undef _ALL_SOURCE */
206 /* Define if using alloca.c. */
207 /* #undef C_ALLOCA */
209 /* Define to empty if the keyword does not work. */
212 /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
213 This function is required for alloca.c support on those systems. */
214 /* #undef CRAY_STACKSEG_END */
216 /* Define if you have alloca, as a function or macro. */
217 #define HAVE_ALLOCA 0
219 /* Define if you have <alloca.h> and it should be used (not on Ultrix). */
220 #define HAVE_ALLOCA_H 0
222 /* Define if you have the getmntent function. */
223 #define HAVE_GETMNTENT 0
225 /* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
226 #define HAVE_SYS_WAIT_H 0
228 /* Define to `long' if <sys/types.h> doesn't define. */
231 /* Define to `int' if <sys/types.h> doesn't define. */
234 /* Define as the return type of signal handlers (int or void). */
235 #define RETSIGTYPE void
237 /* If using the C implementation of alloca, define if you know the
238 direction of stack growth for your system; otherwise it will be
239 automatically deduced at run-time.
240 STACK_DIRECTION > 0 => grows toward higher addresses
241 STACK_DIRECTION < 0 => grows toward lower addresses
242 STACK_DIRECTION = 0 => direction of growth unknown
244 /* #undef STACK_DIRECTION */
246 /* Define if you have the ANSI C header files. */
247 #define STDC_HEADERS 1
249 /* Define if you can safely include both <sys/time.h> and <time.h>. */
250 #define TIME_WITH_SYS_TIME 1
252 /* Define if your processor stores words with the most significant
253 byte first (like Motorola and SPARC, unlike Intel and VAX). */
254 /* #undef WORDS_BIGENDIAN */
256 /* define the system type include file here */
257 //#define SYSTEM_INCLUDE_FILE "s/linux.h"
259 /* define the machine (cpu) type include file here */
260 //#define MACHINE_INCLUDE_FILE "m/generic.h"
262 #define SNMPLIBPATH "/lib/snmp"
263 #define SNMPSHAREPATH "/share/snmp"
264 #define SNMPCONFPATH "/etc/snmp"
266 /* LOGFILE: If defined it closes stdout/err/in and opens this in out/err's
267 place. (stdin is closed so that sh scripts won't wait for it) */
269 //#define LOGFILE "/var/log/snmpd.log"
271 /* default system contact */
272 #ifdef CYGDAT_NET_SNMPAGENT_SYS_CONTACT
273 #define SYS_CONTACT CYGDAT_NET_SNMPAGENT_SYS_CONTACT
275 #define SYS_CONTACT "nobody@dev.null"
278 /* system location */
279 #ifdef CYGDAT_NET_SNMPAGENT_SYS_LOC
280 #define SYS_LOC CYGDAT_NET_SNMPAGENT_SYS_LOC
282 #define SYS_LOC "<unknown>"
285 /* Use libwrap to handle allow/deny hosts? */
286 /* #undef USE_LIBWRAP */
288 /* Use dmalloc to do malloc debugging? */
289 /* #undef HAVE_DMALLOC_H */
291 /* location of UNIX kernel */
292 #define KERNEL_LOC "unknown"
294 /* location of mount table list */
295 #define ETC_MNTTAB "/etc/mtab"
297 /* location of swap device (ok if not found) */
298 /* #undef DMEM_LOC */
300 //#define PSCMD "/bin/ps -e"
302 /* Where is the uname command */
303 //#define UNAMEPROG "/bin/uname"
305 /* testing code sections. */
306 /* #undef SNMP_TESTING_CODE */
308 /* If you don't want the agent to report on variables it doesn't have data for */
309 #define NO_DUMMY_VALUES 1
311 /* Define if statfs takes 2 args and the second argument has
312 type struct fs_data. [Ultrix] */
313 /* #undef STAT_STATFS_FS_DATA */
315 /* Define if the TCP timer constants in <netinet/tcp_timer.h>
316 depend on the integer variable `hz'. [FreeBSD 4.x] */
317 /* #undef TCPTV_NEEDS_HZ */
319 /* Define if you have the bcopy function. */
322 /* Define if you have the execv function. */
323 //#define HAVE_EXECV 1
325 /* Define if you have the fork function. */
326 //#define HAVE_FORK 1
328 /* Define if you have the getdtablesize function. */
329 //#define HAVE_GETDTABLESIZE 1
331 /* Define if you have the getfsstat function. */
332 /* #undef HAVE_GETFSSTAT */
334 /* Define if you have the gethostname function. */
335 //#define HAVE_GETHOSTNAME 1
337 /* Define if you have the getloadavg function. */
338 /* #undef HAVE_GETLOADAVG */
340 /* Define if you have the getpagesize function. */
341 //#define HAVE_GETPAGESIZE 1
343 /* Define if you have the getpid function. */
344 //#define HAVE_GETPID 1
346 /* Define if you have the gettimeofday function. */
347 #define HAVE_GETTIMEOFDAY 1
349 /* Define if you have the if_freenameindex function. */
350 //#define HAVE_IF_FREENAMEINDEX 1
352 /* Define if you have the if_nameindex function. */
353 //#define HAVE_IF_NAMEINDEX 1
355 /* Define if you have the index function. */
356 //#define HAVE_INDEX 1
358 /* Define if you have the knlist function. */
359 /* #undef HAVE_KNLIST */
361 /* Define if you have the kvm_getprocs function. */
362 /* #undef HAVE_KVM_GETPROCS */
364 /* Define if you have the kvm_openfiles function. */
365 /* #undef HAVE_KVM_OPENFILES */
367 /* Define if you have the lrand48 function. */
368 //#define HAVE_LRAND48 1
370 /* Define if you have the memcpy function. */
371 #define HAVE_MEMCPY 1
373 /* Define if you have the memmove function. */
374 #define HAVE_MEMMOVE 1
376 /* Define if you have the nlist function. */
377 //#define HAVE_NLIST 1
379 /* Define if you have the rand function. */
382 /* Define if you have the random function. */
383 //#define HAVE_RANDOM 1
385 /* Define if you have the regcomp function. */
386 //#define HAVE_REGCOMP 1
388 /* Define if you have the rpmGetPath function. */
389 /* #undef HAVE_RPMGETPATH */
391 /* Define if you have the select function. */
392 #define HAVE_SELECT 1
394 /* Define if you have the setenv function. */
395 #define HAVE_SETENV 1
397 /* Define if you have the setlocale function. */
398 //#define HAVE_SETLOCALE 1
400 /* Define if you have the setmntent function. */
401 //#define HAVE_SETMNTENT 1
403 /* Define if you have the sigalrm function. */
404 #define HAVE_SIGALRM 1
406 /* Define if you have the sigblock function. */
407 //#define HAVE_SIGBLOCK 1
409 /* Define if you have the sighold function. */
410 //#define HAVE_SIGHOLD 1
412 /* Define if you have the signal function. */
413 #define HAVE_SIGNAL 1
415 /* Define if you have the sigset function. */
416 #define HAVE_SIGSET 1
418 /* Define if you have the socket function. */
419 #define HAVE_SOCKET 1
421 /* Define if you have the statfs function. */
422 //#define HAVE_STATFS 1
424 /* Define if you have the statvfs function. */
425 //#define HAVE_STATVFS 1
427 /* Define if you have the strcasestr function. */
428 //#define HAVE_STRCASESTR 1
430 /* Define if you have the strchr function. */
431 #define HAVE_STRCHR 1
433 /* Define if you have the strdup function. */
434 //#define HAVE_STRDUP 1
436 /* Define if you have the strerror function. */
437 #define HAVE_STRERROR 1
439 /* Define if you have the strncasecmp function. */
440 //#define HAVE_STRNCASECMP 1
442 /* Define if you have the strtol function. */
443 #define HAVE_STRTOL 1
445 /* Define if you have the system function. */
446 //#define HAVE_SYSTEM 1
448 /* Define if you have the tcgetattr function. */
449 //#define HAVE_TCGETATTR 1
451 /* Define if you have the uname function. */
452 //#define HAVE_UNAME 1
454 /* Define if you have the usleep function. */
455 //#define HAVE_USLEEP 1
457 /* Define if you have the vsnprintf function. */
458 #define HAVE_VSNPRINTF 1
460 /* Define if you have the <arpa/inet.h> header file. */
461 #define HAVE_ARPA_INET_H 1
463 /* Define if you have the <asm/page.h> header file. */
464 //#define HAVE_ASM_PAGE_H 1
466 /* Define if you have the <dirent.h> header file. */
467 //#define HAVE_DIRENT_H 1
469 /* Define if you have the <err.h> header file. */
472 /* Define if you have the <fcntl.h> header file. */
473 //#define HAVE_FCNTL_H 1
475 /* Define if you have the <fstab.h> header file. */
476 //#define HAVE_FSTAB_H 1
478 /* Define if you have the <getopt.h> header file. */
479 //#define HAVE_GETOPT_H 1
481 /* Define if you have the <inet/mib2.h> header file. */
482 /* #undef HAVE_INET_MIB2_H */
484 /* Define if you have the <io.h> header file. */
485 /* #undef HAVE_IO_H */
487 /* Define if you have the <ioctls.h> header file. */
488 /* #undef HAVE_IOCTLS_H */
490 /* Define if you have the <kstat.h> header file. */
491 /* #undef HAVE_KSTAT_H */
493 /* Define if you have the <kvm.h> header file. */
494 /* #undef HAVE_KVM_H */
496 /* Define if you have the <limits.h> header file. */
497 #define HAVE_LIMITS_H 1
499 /* Define if you have the <linux/hdreg.h> header file. */
500 //#define HAVE_LINUX_HDREG_H 1
502 /* Define if you have the <locale.h> header file. */
503 #define HAVE_LOCALE_H 1
505 /* Define if you have the <machine/param.h> header file. */
506 /* #undef HAVE_MACHINE_PARAM_H */
508 /* Define if you have the <machine/pte.h> header file. */
509 /* #undef HAVE_MACHINE_PTE_H */
511 /* Define if you have the <machine/types.h> header file. */
512 /* #undef HAVE_MACHINE_TYPES_H */
514 /* Define if you have the <malloc.h> header file. */
515 //#define HAVE_MALLOC_H 1
517 /* Define if you have the <mntent.h> header file. */
518 //#define HAVE_MNTENT_H 1
520 /* Define if you have the <mtab.h> header file. */
521 /* #undef HAVE_MTAB_H */
523 /* Define if you have the <ndir.h> header file. */
524 /* #undef HAVE_NDIR_H */
526 /* Define if you have the <net/if.h> header file. */
527 #define HAVE_NET_IF_H 1
529 /* Define if you have the <net/if_dl.h> header file. */
530 #define HAVE_NET_IF_DL_H 1
532 /* Define if you have the <net/if_mib.h> header file. */
533 /* #undef HAVE_NET_IF_MIB_H */
535 /* Define if you have the <net/if_types.h> header file. */
536 #define HAVE_NET_IF_TYPES_H 1
538 /* Define if you have the <net/if_var.h> header file. */
539 /* #undef HAVE_NET_IF_VAR_H */
541 /* Define if you have the <net/route.h> header file. */
542 #define HAVE_NET_ROUTE_H 1
544 /* Define if you have the <netdb.h> header file. */
545 #define HAVE_NETDB_H 1
547 /* Define if you have the <netinet/icmp_var.h> header file. */
548 #define HAVE_NETINET_ICMP_VAR_H 1
550 /* Define if you have the <netinet/if_ether.h> header file. */
551 #define HAVE_NETINET_IF_ETHER_H 1
553 /* Define if you have the <netinet/in.h> header file. */
554 #define HAVE_NETINET_IN_H 1
556 /* Define if you have the <netinet/in_pcb.h> header file. */
557 #define HAVE_NETINET_IN_PCB_H 1
559 /* Define if you have the <netinet/in_systm.h> header file. */
560 #define HAVE_NETINET_IN_SYSTM_H 1
562 /* Define if you have the <netinet/in_var.h> header file. */
563 #define HAVE_NETINET_IN_VAR_H 1
565 /* Define if you have the <netinet/ip.h> header file. */
566 #define HAVE_NETINET_IP_H 1
568 /* Define if you have the <netinet/ip6.h> header file. */
569 #define HAVE_NETINET_IP6_H 1
571 /* Define if you have the <netinet/ip_var.h> header file. */
572 #define HAVE_NETINET_IP_VAR_H 1
574 /* Define if you have the <netinet/tcp.h> header file. */
575 #define HAVE_NETINET_TCP_H 1
577 /* Define if you have the <netinet/tcp_fsm.h> header file. */
578 #define HAVE_NETINET_TCP_FSM_H 1
580 /* Define if you have the <netinet/tcp_timer.h> header file. */
581 #define HAVE_NETINET_TCP_TIMER_H 1
583 /* Define if you have the <netinet/tcp_var.h> header file. */
584 #define HAVE_NETINET_TCP_VAR_H 1
586 /* Define if you have the <netinet/tcpip.h> header file. */
587 #define HAVE_NETINET_TCPIP_H 1
589 /* Define if you have the <netinet/udp.h> header file. */
590 #define HAVE_NETINET_UDP_H 1
592 /* Define if you have the <netinet/udp_var.h> header file. */
593 #define HAVE_NETINET_UDP_VAR_H 1
595 /* Define if you have the <netinet6/in6_pcb.h> header file. */
596 /* #undef HAVE_NETINET6_IN6_PCB_H */
598 /* Define if you have the <netinet6/in6_var.h> header file. */
599 /* #undef HAVE_NETINET6_IN6_VAR_H */
601 /* Define if you have the <netinet6/ip6_var.h> header file. */
602 /* #undef HAVE_NETINET6_IP6_VAR_H */
604 /* Define if you have the <netinet6/nd6.h> header file. */
605 /* #undef HAVE_NETINET6_ND6_H */
607 /* Define if you have the <netinet6/tcp6.h> header file. */
608 /* #undef HAVE_NETINET6_TCP6_H */
610 /* Define if you have the <netinet6/tcp6_fsm.h> header file. */
611 /* #undef HAVE_NETINET6_TCP6_FSM_H */
613 /* Define if you have the <netinet6/tcp6_timer.h> header file. */
614 /* #undef HAVE_NETINET6_TCP6_TIMER_H */
616 /* Define if you have the <netinet6/tcp6_var.h> header file. */
617 /* #undef HAVE_NETINET6_TCP6_VAR_H */
619 /* Define if you have the <nlist.h> header file. */
620 /* #undef HAVE_NLIST_H */
622 /* Define if you have the <openssl/evp.h> header file. */
623 /* #undef HAVE_OPENSSL_EVP_H */
625 /* Define if you have the <openssl/hmac.h> header file. */
626 /* #undef HAVE_OPENSSL_HMAC_H */
628 /* Define if you have the <osreldate.h> header file. */
629 /* #undef HAVE_OSRELDATE_H */
631 /* Define if you have the <pkglocs.h> header file. */
632 /* #undef HAVE_PKGLOCS_H */
634 /* Define if you have the <pthread.h> header file. */
635 //#define HAVE_PTHREAD_H 1
637 /* Define if you have the <regex.h> header file. */
638 //#define HAVE_REGEX_H 1
640 /* Define if you have the <sgtty.h> header file. */
641 //#define HAVE_SGTTY_H 1
643 /* Define if you have the <stdarg.h> header file. */
644 #define HAVE_STDARG_H 1
646 /* Define if you have the <stdlib.h> header file. */
647 #define HAVE_STDLIB_H 1
649 /* Define if you have the <string.h> header file. */
650 #define HAVE_STRING_H 1
652 /* Define if you have the <sys/cdefs.h> header file. */
653 #define HAVE_SYS_CDEFS_H 1
655 /* Define if you have the <sys/conf.h> header file. */
656 /* #undef HAVE_SYS_CONF_H */
658 /* Define if you have the <sys/dir.h> header file. */
659 /* #undef HAVE_SYS_DIR_H */
661 /* Define if you have the <sys/diskio.h> header file. */
662 /* #undef HAVE_SYS_DISKIO_H */
664 /* Define if you have the <sys/disklabel.h> header file. */
665 /* #undef HAVE_SYS_DISKLABEL_H */
667 /* Define if you have the <sys/dkio.h> header file. */
668 /* #undef HAVE_SYS_DKIO_H */
670 /* Define if you have the <sys/dmap.h> header file. */
671 /* #undef HAVE_SYS_DMAP_H */
673 /* Define if you have the <sys/file.h> header file. */
674 //#define HAVE_SYS_FILE_H 1
676 /* Define if you have the <sys/filio.h> header file. */
677 /* #undef HAVE_SYS_FILIO_H */
679 /* Define if you have the <sys/fixpoint.h> header file. */
680 /* #undef HAVE_SYS_FIXPOINT_H */
682 /* Define if you have the <sys/fs.h> header file. */
683 /* #undef HAVE_SYS_FS_H */
685 /* Define if you have the <sys/hashing.h> header file. */
686 /* #undef HAVE_SYS_HASHING_H */
688 /* Define if you have the <sys/ioctl.h> header file. */
689 #define HAVE_SYS_IOCTL_H 1
691 /* Define if you have the <sys/loadavg.h> header file. */
692 /* #undef HAVE_SYS_LOADAVG_H */
694 /* Define if you have the <sys/mbuf.h> header file. */
695 #define HAVE_SYS_MBUF_H 1
697 /* Define if you have the <sys/mntent.h> header file. */
698 /* #undef HAVE_SYS_MNTENT_H */
700 /* Define if you have the <sys/mnttab.h> header file. */
701 /* #undef HAVE_SYS_MNTTAB_H */
703 /* Define if you have the <sys/mount.h> header file. */
704 //#define HAVE_SYS_MOUNT_H 1
706 /* Define if you have the <sys/ndir.h> header file. */
707 /* #undef HAVE_SYS_NDIR_H */
709 /* Define if you have the <sys/param.h> header file. */
710 #define HAVE_SYS_PARAM_H 1
712 /* Define if you have the <sys/pool.h> header file. */
713 /* #undef HAVE_SYS_POOL_H */
715 /* Define if you have the <sys/proc.h> header file. */
716 /* #undef HAVE_SYS_PROC_H */
718 /* Define if you have the <sys/protosw.h> header file. */
719 #define HAVE_SYS_PROTOSW_H 1
721 /* Define if you have the <sys/pstat.h> header file. */
722 /* #undef HAVE_SYS_PSTAT_H */
724 /* Define if you have the <sys/queue.h> header file. */
725 #define HAVE_SYS_QUEUE_H 1
727 /* Define if you have the <sys/select.h> header file. */
728 #define HAVE_SYS_SELECT_H 1
730 /* Define if you have the <sys/socket.h> header file. */
731 #define HAVE_SYS_SOCKET_H 1
733 /* Define if you have the <sys/socketvar.h> header file. */
734 #define HAVE_SYS_SOCKETVAR_H 1
736 /* Define if you have the <sys/sockio.h> header file. */
737 #define HAVE_SYS_SOCKIO_H 1
739 /* Define if you have the <sys/stat.h> header file. */
740 //#define HAVE_SYS_STAT_H 1
742 /* Define if you have the <sys/statfs.h> header file. */
743 //#define HAVE_SYS_STATFS_H 1
745 /* Define if you have the <sys/statvfs.h> header file. */
746 //#define HAVE_SYS_STATVFS_H 1
748 /* Define if you have the <sys/stream.h> header file. */
749 /* #undef HAVE_SYS_STREAM_H */
751 /* Define if you have the <sys/swap.h> header file. */
752 //#define HAVE_SYS_SWAP_H 1
754 /* Define if you have the <sys/sysctl.h> header file. */
755 /* #undef HAVE_SYS_SYSCTL_H */
757 /* Define if you have the <sys/sysmp.h> header file. */
758 /* #undef HAVE_SYS_SYSMP_H */
760 /* Define if you have the <sys/tcpipstats.h> header file. */
761 /* #undef HAVE_SYS_TCPIPSTATS_H */
763 /* Define if you have the <sys/time.h> header file. */
764 #define HAVE_SYS_TIME_H 1
766 /* Define if you have the <sys/un.h> header file. */
767 //#define HAVE_SYS_UN_H 1
769 /* Define if you have the <sys/user.h> header file. */
770 //#define HAVE_SYS_USER_H 1
772 /* Define if you have the <sys/utsname.h> header file. */
773 //#define HAVE_SYS_UTSNAME_H 1
775 /* Define if you have the <sys/vfs.h> header file. */
776 //#define HAVE_SYS_VFS_H 1
778 /* Define if you have the <sys/vm.h> header file. */
779 /* #undef HAVE_SYS_VM_H */
781 /* Define if you have the <sys/vmmac.h> header file. */
782 /* #undef HAVE_SYS_VMMAC_H */
784 /* Define if you have the <sys/vmmeter.h> header file. */
785 /* #undef HAVE_SYS_VMMETER_H */
787 /* Define if you have the <sys/vmparam.h> header file. */
788 /* #undef HAVE_SYS_VMPARAM_H */
790 /* Define if you have the <sys/vmsystm.h> header file. */
791 /* #undef HAVE_SYS_VMSYSTM_H */
793 /* Define if you have the <sys/vnode.h> header file. */
794 /* #undef HAVE_SYS_VNODE_H */
796 /* Define if you have the <syslog.h> header file. */
797 //#define HAVE_SYSLOG_H 1
799 /* Define if you have the <ufs/ffs/fs.h> header file. */
800 /* #undef HAVE_UFS_FFS_FS_H */
802 /* Define if you have the <ufs/fs.h> header file. */
803 /* #undef HAVE_UFS_FS_H */
805 /* Define if you have the <ufs/ufs/dinode.h> header file. */
806 /* #undef HAVE_UFS_UFS_DINODE_H */
808 /* Define if you have the <ufs/ufs/inode.h> header file. */
809 /* #undef HAVE_UFS_UFS_INODE_H */
811 /* Define if you have the <ufs/ufs/quota.h> header file. */
812 /* #undef HAVE_UFS_UFS_QUOTA_H */
814 /* Define if you have the <unistd.h> header file. */
815 //#define HAVE_UNISTD_H 1
817 /* Define if you have the <utsname.h> header file. */
818 /* #undef HAVE_UTSNAME_H */
820 /* Define if you have the <vm/swap_pager.h> header file. */
821 /* #undef HAVE_VM_SWAP_PAGER_H */
823 /* Define if you have the <vm/vm.h> header file. */
824 /* #undef HAVE_VM_VM_H */
826 /* Define if you have the <winsock.h> header file. */
827 /* #undef HAVE_WINSOCK_H */
829 /* Define if you have the <xti.h> header file. */
830 /* #undef HAVE_XTI_H */
832 /* Define if you have the crypto library (-lcrypto). */
833 /* #undef HAVE_LIBCRYPTO */
835 /* Define if you have the efence library (-lefence). */
836 /* #undef HAVE_LIBEFENCE */
838 /* Define if you have the elf library (-lelf). */
839 //#define HAVE_LIBELF 1
841 /* Define if you have the kstat library (-lkstat). */
842 /* #undef HAVE_LIBKSTAT */
844 /* Define if you have the kvm library (-lkvm). */
845 /* #undef HAVE_LIBKVM */
847 /* Define if you have the m library (-lm). */
850 /* Define if you have the mld library (-lmld). */
851 /* #undef HAVE_LIBMLD */
853 /* Define if you have the nsl library (-lnsl). */
854 /* #undef HAVE_LIBNSL */
856 /* Define if you have the z library (-lz). */
857 //#define HAVE_LIBZ 1
859 /* define if you are using linux and /proc/net/dev has the compressed
860 field, which exists in linux kernels 2.2 and greater. */
861 /* #undef PROC_NET_DEV_HAS_COMPRESSED */
863 /* define rtentry to ortentry on SYSV machines (alphas) */
864 //#define RTENTRY struct rtentry
866 /* Use BSD 4.4 routing table entries? */
867 /* #undef RTENTRY_4_4 */
869 /* Does struct sigaction have a sa_sigaction field? */
870 #define STRUCT_SIGACTION_HAS_SA_SIGACTION 1
872 /* Does struct sockaddr have a sa_len field? */
873 #define STRUCT_SOCKADDR_HAS_SA_LEN
875 /* Does struct sockaddr have a sa_family2 field? */
876 /* #undef STRUCT_SOCKADDR_HAS_SA_UNION_SA_GENERIC_SA_FAMILY2 */
878 /* rtentry structure tests */
879 /* #undef RTENTRY_RT_NEXT */
880 //#define STRUCT_RTENTRY_HAS_RT_DST 1
881 /* #undef STRUCT_RTENTRY_HAS_RT_UNIT */
882 /* #undef STRUCT_RTENTRY_HAS_RT_USE */
883 /* #undef STRUCT_RTENTRY_HAS_RT_REFCNT */
884 /* #undef STRUCT_RTENTRY_HAS_RT_HASH */
886 /* ifnet structure tests */
887 /* #undef STRUCT_IFNET_HAS_IF_BAUDRATE */
888 #define STRUCT_IFNET_HAS_IF_SPEED 1
889 #define STRUCT_IFNET_HAS_IF_TYPE 1
890 /* #undef STRUCT_IFNET_HAS_IF_IMCASTS */
891 /* #undef STRUCT_IFNET_HAS_IF_IQDROPS */
892 /* #undef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_SEC */
893 /* #undef STRUCT_IFNET_HAS_IF_NOPROTO */
894 /* #undef STRUCT_IFNET_HAS_IF_OMCASTS */
895 /* #undef STRUCT_IFNET_HAS_IF_XNAME */
896 #define STRUCT_IFNET_HAS_IF_OBYTES 1
897 #define STRUCT_IFNET_HAS_IF_IBYTES 1
898 /* #undef STRUCT_IFNET_HAS_IF_ADDRLIST */
900 /* tcpstat.tcps_rcvmemdrop */
901 /* #undef STRUCT_TCPSTAT_HAS_TCPS_RCVMEMDROP */
903 /* udpstat.udps_discard */
904 /* #undef STRUCT_UDPSTAT_HAS_UDPS_DISCARD */
907 /* #undef STRUCT_ARPHD_HAS_AT_NEXT */
909 /* ifaddr.ifa_next */
910 #define STRUCT_IFADDR_HAS_IFA_NEXT 1
913 /* #undef STRUCT_IFNET_HAS_IF_MTU */
915 /* swdevt.sw_nblksenabled */
916 /* #undef STRUCT_SWDEVT_HAS_SW_NBLKSENABLED */
919 /* #undef STRUCT_NLIST_HAS_N_VALUE */
921 /* vfsstat.f_frsize */
922 //#define STRUCT_STATVFS_HAS_F_FRSIZE 1
924 /* vfsstat.f_files */
925 //#define STRUCT_STATVFS_HAS_F_FILES 1
927 /* ifnet needs to have _KERNEL defined */
928 /* #undef IFNET_NEEDS_KERNEL */
930 /* sysctl works to get boottime, etc... */
931 /* #undef CAN_USE_SYSCTL */
933 /* type check for in_addr_t */
934 //#define in_addr_t u_int
936 /* define if SIOCGIFADDR exists in sys/ioctl.h */
937 #define SYS_IOCTL_H_HAS_SIOCGIFADDR 1
939 /* define if your compiler (processor) defines __FUNCTION__ for you */
940 #define HAVE_CPP_UNDERBAR_FUNCTION_DEFINED 1
942 /* mib pointer to the top of the extensible tree. This has been
943 assigned to UCDavis by the iana group. Optionally, point this to the
944 location in the tree your company/organization has been allocated. */
946 /* location of the extensible mib tree */
947 #define EXTENSIBLEMIB 1,3,6,1,4,1,2021
948 /* location of the extensible mib tree */
949 #define EXTENSIBLEDOTMIB 1.3.6.1.4.1.2021
950 /* count the above numbers */
951 #define EXTENSIBLENUM 7
953 /* Mib-2 tree Info */
954 /* These are the system information variables. */
956 #ifdef CYGDAT_NET_SNMPAGENT_VERS_DESC
957 #define VERS_DESC CYGDAT_NET_SNMPAGENT_VERS_DESC
959 #define VERS_DESC "unknown" /* overridden at run time */
962 #ifdef CYGDAT_NET_SNMPAGENT_SYS_NAME
963 #define SYS_NAME CYGDAT_NET_SNMPAGENT_SYS_NAME
965 #define SYS_NAME "unknown" /* overridden at run time */
968 /* comment out the second define to turn off functionality for any of
969 these: (See README for details) */
971 /* proc PROCESSNAME [MAX] [MIN] */
972 //#define PROCMIBNUM 2
974 /* exec/shell NAME COMMAND */
975 //#define SHELLMIBNUM 8
978 //#define MEMMIBNUM 4
980 /* disk DISK MINSIZE */
981 //#define DISKMIBNUM 9
984 //#define LOADAVEMIBNUM 10
986 /* which version are you using? This mibloc will tell you */
987 #define VERSIONMIBNUM 100
989 /* Reports errors the agent runs into */
990 /* (typically its "can't fork, no mem" problems) */
991 #define ERRORMIBNUM 101
993 /* The sub id of EXENSIBLEMIB returned to queries of
994 .iso.org.dod.internet.mgmt.mib-2.system.sysObjectID.0 */
997 /* This ID is returned after the AGENTID above. IE, the resulting
998 value returned by a query to sysObjectID is
999 EXTENSIBLEMIB.AGENTID.???, where ??? is defined below by OSTYPE */
1012 #define OPENBSDID 12
1013 #define UNKNOWNID 255
1016 #define OSTYPE HPUX9ID
1019 #define OSTYPE HPUX10ID
1022 #define OSTYPE SUNOS4ID
1025 #define OSTYPE SOLARISID
1027 #if defined(osf3) || defined(osf4)
1028 #define OSTYPE OSFID
1031 #define OSTYPE ULTRIXID
1034 #define OSTYPE NETBSD1ID
1037 #define OSTYPE FREEBSDID
1039 #if defined(irix6) || defined(irix5)
1040 #define OSTYPE IRIXID
1043 #define OSTYPE LINUXID
1045 #if defined(bsdi2) || defined(bsdi3)
1046 #define OSTYPE BSDIID
1049 #define OSTYPE OPENBSDID
1053 #define OSTYPE UNKNOWNID
1056 /* how long to wait (seconds) for error querys before reseting the error trap.*/
1057 #define ERRORTIMELENGTH 600
1059 /* Exec command to fix PROC problems */
1060 /* %s will be replaced by the process name in error */
1062 /* #define PROCFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */
1064 /* Exec command to fix EXEC problems */
1065 /* %s will be replaced by the exec/script name in error */
1067 /* #define EXECFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */
1069 /* Should exec output Cashing be used (speeds up things greatly), and
1070 if so, After how many seconds should the cache re-newed? Note:
1071 Don't define CASHETIME to disable cashing completely */
1073 //#define EXCACHETIME 30
1074 #define CACHEFILE "/tmp/.snmp-exec-cache"
1075 #define MAXCACHESIZE (200*80) /* roughly 200 lines max */
1077 #define MAXDISKS 50 /* can't scan more than this number */
1081 /* default of 100 meg minimum if the minimum size is not specified in
1083 #define DEFDISKMINIMUMSPACE 100000
1085 #define DEFMAXLOADAVE 12.0 /* default maximum load average before error */
1087 #define MAXREADCOUNT 100 /* max times to loop reading output from
1088 execs. Because of sleep(1)s, this will also
1089 be time to wait (in seconds) for exec to finish */
1091 #define SNMPBLOCK 1 /* Set to 1 if you want snmpgets to block and never
1092 timeout. Original CMU code had this
1093 hardcoded into the code as = 1 */
1095 #define RESTARTSLEEP 5 /* How long to wait after a snmpset to
1096 EXTENSIBLEMIB.VERSIONMIBNUM.VERRESTARTAGENT
1097 before restarting the agent. This is
1098 necessary to finish the snmpset reply
1099 before restarting. */
1101 /* Number of community strings to store */
1102 #define NUM_COMMUNITIES 5
1104 /* UNdefine to allow specifying zero-length community string */
1105 /* #define NO_ZEROLENGTH_COMMUNITY 1 */
1107 /* #define EXIT_ON_BAD_KLREAD */
1108 /* define to exit the agent on a bad kernel read */
1110 #define LASTFIELD -1 /* internal define */
1112 /* configure options specified */
1113 #define CONFIGURE_OPTIONS "<manually hacked for eCos>"
1117 # define strchr index
1118 # define strrchr rindex
1124 # define index strchr
1125 # define rindex strrchr
1131 # define memcpy(d, s, n) bcopy ((s), (d), (n))
1132 # define memmove(d, s, n) bcopy ((s), (d), (n))
1133 # define memcmp bcmp
1137 #ifndef HAVE_MEMMOVE
1139 # define memmove memcpy
1145 # define bcopy(s, d, n) memcpy ((d), (s), (n))
1146 # define bzero(p,n) memset((p),(0),(n))
1147 # define bcmp memcmp
1152 /* define random functions */
1156 #define random lrand48
1157 #define srandom(s) srand48(s)
1161 #include <pkgconf/system.h>
1162 #ifndef CYGPKG_NET_FREEBSD_STACK
1166 #endif //CYGPKG_NET_FREEBSD_STACK
1168 #define srandom(s) srand(s)
1173 /* define signal if DNE */
1177 #define signal(a,b) sigset(a,b)
1181 /* define if you have librpm and libdb */
1182 #define HAVE_LIBDB 1
1183 #define HAVE_LIBRPM 1
1185 /* define if you have gethostbyname */
1186 #ifdef CYGINT_ISO_DNS
1187 # define HAVE_GETHOSTBYNAME 1
1190 /* define if you have getservbyname */
1191 #define HAVE_GETSERVBYNAME 1
1193 /* Not-to-be-compiled macros for use by configure only */
1194 #define config_require(x)
1195 #define config_arch_require(x,y)
1196 #define config_parse_dot_conf(w,x,y,z)
1197 #define config_add_mib(x)
1200 #define ENV_SEPARATOR ";"
1201 #define ENV_SEPARATOR_CHAR ';'
1203 #define ENV_SEPARATOR ":"
1204 #define ENV_SEPARATOR_CHAR ':'
1207 //#include SYSTEM_INCLUDE_FILE
1208 //#include MACHINE_INCLUDE_FILE
1210 #if defined(HAVE_NLIST) && defined(STRUCT_NLIST_HAS_N_VALUE) && !defined(DONT_USE_NLIST)
1211 #define CAN_USE_NLIST
1216 // Be rid of lots of warning because of use of #if instead of #ifdef:
1217 #define HAVE_SYSLOG_H 0
1218 #define HAVE_WINSOCK_H 0
1219 #define HAVE_DMALLOC_H 0
1220 #define SNMP_TESTING_CODE 0
1221 #define HAVE_DIRENT_H 0
1222 #define HAVE_SYS_NDIR_H 0
1223 #define HAVE_SYS_DIR_H 0
1224 #define HAVE_NDIR_H 0
1225 #define HAVE_UNISTD_H 0
1226 #define HAVE_FCNTL_H 0
1227 #define HAVE_MALLOC_H 0
1228 #define HAVE_SYS_FILE_H 0
1229 #define HAVE_KSTAT_H 0
1230 #define HAVE_SYS_UN_H 0
1231 #define SOCK_MAXADDRLEN 255
1232 #define HAVE_SYS_STREAM_H 0
1233 #define HAVE_INET_MIB2_H 0
1234 #define HAVE_GETPID 0
1239 #define ECOSFIXME_NEEDFILESYSTEM 1
1243 #define __time_t_defined
1247 #include <sys/types.h>
1252 #include <network.h>