diff --git a/.gitignore b/.gitignore index e65ea2d0d..c571ad716 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,9 @@ versioning/BRM/workernode writeengine/bulk/cpimport.bin writeengine/server/WriteEngineServer writeengine/splitter/cpimport +oamapps/columnstoreDB/columnstoreDBWrite +oamapps/columnstoreSupport/columnstoreSupport +net-snmp/net-snmp-5.7.3/include/net-snmp/net-snmp-config.h +net-snmp/net-snmp-5.7.3/net-snmp-config +net-snmp/net-snmp-5.7.3/net-snmp-create-v3-user + diff --git a/Makefile.am b/Makefile.am index cf1dd77f1..8dca85727 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,7 @@ ACLOCAL_AMFLAGS = -I m4 AM_LIBTOOLFLAGS = -Wl,-rpath -Wl,$(prefix)/lib -lrt -lboost_idb .PHONY: test coverage leakcheck docs bootstrap install -all-local: bootstrap +all-local: # cd utils && $(MAKE) && $(MAKE) install # cd oam; \ # $(MAKE) -C oamcpp install @@ -76,9 +76,9 @@ all-local: bootstrap # $(MAKE) -C writeengine/bulk install_bulk # $(MAKE) -C writeengine/splitter install_splitter # echo $(CXXFLAGS) $(DEBUG_FLAGS) > buildFlags + $(MAKE) -C net-snmp $(MAKE) -C utils $(MAKE) -C oam/oamcpp - $(MAKE) -C net-snmp $(MAKE) -C snmpd $(MAKE) -C dbcon/execplan $(MAKE) -C dbcon/joblist @@ -109,9 +109,9 @@ all-local: bootstrap echo $(CXXFLAGS) $(DEBUG_FLAGS) > buildFlags install: + $(MAKE) -C net-snmp install $(MAKE) -C utils install $(MAKE) -C oam/oamcpp install - $(MAKE) -C net-snmp install $(MAKE) -C snmpd install $(MAKE) -C dbcon/execplan install $(MAKE) -C dbcon/joblist install @@ -150,7 +150,5 @@ leakcheck: docs: -bootstrap: - clean: clean-am diff --git a/build/bootstrap b/build/bootstrap index cd7558af5..8f82efe1b 100755 --- a/build/bootstrap +++ b/build/bootstrap @@ -34,7 +34,7 @@ while true done if [ "$INCLUDE" == "" ]; then - INCLUDE="-I$PWD/../sql -I$PWD/../include -I$PWD/../pcre" + INCLUDE="-I$PWD/../sql -I$PWD/../include -I$PWD/../pcre -I$PWD/net-snmp/net-snmp -I$PWD/net-snmp/net-snmp/include -I$PWD/snmpd/snmpmanager -L$PWD/net-snmp/net-snmp/snmplib/.libs -L$PWD/net-snmp/net-snmp/agent/helpers/.libs -L$PWD/net-snmp/net-snmp/agent/.libs/ -L$PWD/net-snmp/net-snmp/apps/.libs/" fi export CXXFLAGS=$INCLUDE $CXXFLAGS @@ -60,12 +60,12 @@ cp dbcon/mysql/install_calpont_mysql.sh export/mysql/ && \ cp dbcon/mysql/my.cnf export/mysql/ && \ cp dbcon/mysql/mysql-Columnstore export/mysql/ -cp -p -r utils/net-snmp export/include +#cp -p -r utils/net-snmp export/include -d=utils/net-snmp-built-libs/lib64 -for lib in libnetsnmpagent.so libnetsnmphelpers.so libnetsnmpmibs.so libnetsnmp.so libnetsnmptrapd.so; do - ln -svf $lib.5.2.1 $d/$lib -done +#d=utils/net-snmp-built-libs/lib64 +#for lib in libnetsnmpagent.so libnetsnmphelpers.so libnetsnmpmibs.so libnetsnmp.so libnetsnmptrapd.so; do +# ln -svf $lib.5.2.1 $d/$lib +#done #FIXME: # This has to be terribly broken, especially for 32 bit # platforms. There should be no PRE-BUILT tools in someting @@ -74,19 +74,19 @@ done # as part of the bootstrap process. # I am commenting this out to see exactly what breaks in the build # process. - if [ `uname -m` == "x86_64" ]; then - cp -p utils/net-snmp-built-libs/lib64/* export/lib - cp -p utils/net-snmp-built-libs/bin64/* export/sbin - else - egrep -qs Constantine /etc/redhat-release - if [ $? -eq 0 ]; then - cp -p utils/net-snmp-built-libs/fc12lib/libnetsnmp*.so.* export/lib - cp -p utils/net-snmp-built-libs/fc12bin/* export/sbin - else - cp -p utils/net-snmp-built-libs/fc6lib/libnetsnmp*.so.* export/lib - cp -p utils/net-snmp-built-libs/fc6bin/* export/sbin - fi - fi +# if [ `uname -m` == "x86_64" ]; then +# cp -p utils/net-snmp-built-libs/lib64/* export/lib +# cp -p utils/net-snmp-built-libs/bin64/* export/sbin +# else +# egrep -qs Constantine /etc/redhat-release +# if [ $? -eq 0 ]; then +# cp -p utils/net-snmp-built-libs/fc12lib/libnetsnmp*.so.* export/lib +# cp -p utils/net-snmp-built-libs/fc12bin/* export/sbin +# else +# cp -p utils/net-snmp-built-libs/fc6lib/libnetsnmp*.so.* export/lib +# cp -p utils/net-snmp-built-libs/fc6bin/* export/sbin +# fi +# fi #FIXME: #This is not going to update the version in configure.ac @@ -135,7 +135,6 @@ cd net-snmp/net-snmp --without-openssl \ --with-ldflags="-Wl,-rpath -Wl,$PREFIX/lib" - #for x in \ #$(find . -name '[mM]akefile' \ # | xargs grep -l ^bootstrap: \ diff --git a/net-snmp/net-snmp-5.7.3/include/net-snmp/net-snmp-config.h b/net-snmp/net-snmp-5.7.3/include/net-snmp/net-snmp-config.h deleted file mode 100644 index 265eff4b4..000000000 --- a/net-snmp/net-snmp-5.7.3/include/net-snmp/net-snmp-config.h +++ /dev/null @@ -1,2464 +0,0 @@ -/* include/net-snmp/net-snmp-config.h. Generated from net-snmp-config.h.in by configure. */ -/* include/net-snmp/net-snmp-config.h.in. Generated from configure.ac by autoheader. */ -/* - * net-snmp configuration header file - * - * NOTE: DO NOT EDIT include/net-snmp/net-snmp-config.h.in as your changes - * will be overwritten. This content is in acconfig.h and merged - * into include/net-snmp/net-snmp-config.h.in by autoheader. - */ -/* Portions of this file are subject to the following copyright(s). See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/* - * Portions of this file are copyrighted by: - * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ - -#ifndef NET_SNMP_CONFIG_H -#define NET_SNMP_CONFIG_H - - -/* ********* NETSNMP_MARK_BEGIN_AUTOCONF_DEFINITIONS ********* */ -/* - * put all autoconf-specific definitions below here - * - */ -#ifndef NETSNMP_NO_AUTOCONF_DEFINITIONS - -/* definitions added by configure on-the-fly */ - -#define config_belongs_in(x) - -#define config_exclude(x) - -#define config_arch_require(x,y) - -#define config_version_require(x) - -#define config_require(x) - -#define config_add_mib(x) - -#define config_parse_dot_conf(w,x,y,z) - -#define config_error(x) - -#define config_warning(x) - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* location of swap device */ -/* #undef DMEM_LOC */ - -/* Define if you want local DNSSEC validation support */ -/* #undef DNSSEC_LOCAL_VALIDATION */ - -/* Environment separator character surrounded by double quotes. */ -#define ENV_SEPARATOR ":" - -/* Environment separator character surrounded by single quotes. */ -#define ENV_SEPARATOR_CHAR ':' - -/* location of mount table list */ -#define ETC_MNTTAB "/etc/mtab" - -/* Define to 1 if you have the `AES_cfb128_encrypt' function. */ -/* #undef HAVE_AES_CFB128_ENCRYPT */ - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ASM_PAGE_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ASM_TYPES_H 1 - -/* Define if using MY_INIT() causes a linker error */ -/* #undef HAVE_BROKEN_LIBMYSQLCLIENT */ - -/* Define to 1 if you have the `cgetnext' function. */ -/* #undef HAVE_CGETNEXT */ - -/* Define to 1 if you have the `chown' function. */ -#define HAVE_CHOWN 1 - -/* Define to 1 if you have the `clock_gettime' library */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `closedir' function. */ -#define HAVE_CLOSEDIR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_COM_ERR_H 1 - -/* Define to 1 if the system has the type `Counter64'. */ -/* #undef HAVE_COUNTER64 */ - -/* Define to 1 if you have the declaration of `sensors_get_all_subfeatures', - and to 0 if you don't. */ -/* #undef HAVE_DECL_SENSORS_GET_ALL_SUBFEATURES */ - -/* define to 1 if you have IRE_CACHE defined in header file. */ -/* #undef HAVE_DEFINED_IRE_CACHE */ - -/* define if you have devstat_getdevs() */ -/* #undef HAVE_DEVSTAT_GETDEVS */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#define HAVE_DIRENT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DMALLOC_H */ - -/* Set if the dpkg-query command is available */ -/* #undef HAVE_DPKG_QUERY */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERR_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ET_COM_ERR_H 1 - -/* Define to 1 if you have the `eval_pv' function. */ -/* #undef HAVE_EVAL_PV */ - -/* Define to 1 if you have the `EVP_MD_CTX_create' function. */ -/* #undef HAVE_EVP_MD_CTX_CREATE */ - -/* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */ -/* #undef HAVE_EVP_MD_CTX_DESTROY */ - -/* Define if you have EVP_sha224/256 in openssl */ -/* #undef HAVE_EVP_SHA224 */ - -/* Define if you have EVP_sha384/256 in openssl */ -/* #undef HAVE_EVP_SHA384 */ - -/* Define to 1 if you have the `execv' function. */ -#define HAVE_EXECV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `fgetc_unlocked' function. */ -#define HAVE_FGETC_UNLOCKED 1 - -/* Define to 1 if you have the `flockfile' function. */ -#define HAVE_FLOCKFILE 1 - -/* Define to 1 if you have the `fork' function. */ -#define HAVE_FORK 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FSTAB_H 1 - -/* Define to 1 if you have the `funlockfile' function. */ -#define HAVE_FUNLOCKFILE 1 - -/* Define to 1 if you have the `gai_strerror' function. */ -#define HAVE_GAI_STRERROR 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* define if you have getdevs() */ -/* #undef HAVE_GETDEVS */ - -/* Define to 1 if you have the `getdtablesize' function. */ -#define HAVE_GETDTABLESIZE 1 - -/* Define to 1 if you have the `getfsstat' function. */ -/* #undef HAVE_GETFSSTAT */ - -/* Define to 1 if you have the `getgrnam' function. */ -#define HAVE_GETGRNAM 1 - -/* Define to 1 if you have the `gethostbyaddr' function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the `gethostbyname' function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the `gethostbyname2' function. */ -#define HAVE_GETHOSTBYNAME2 1 - -/* Define to 1 if you have the `gethostname' function. */ -#define HAVE_GETHOSTNAME 1 - -/* Define to 1 if you have the `getipnodebyname' function. */ -/* #undef HAVE_GETIPNODEBYNAME */ - -/* Define to 1 if you have the `getloadavg' function. */ -#define HAVE_GETLOADAVG 1 - -/* Define to 1 if you have the `getmntent' function. */ -#define HAVE_GETMNTENT 1 - -/* Define to 1 if you have the `getopt' function. */ -#define HAVE_GETOPT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_GETOPT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getpid' function. */ -#define HAVE_GETPID 1 - -/* Define to 1 if you have the `getpwnam' function. */ -#define HAVE_GETPWNAM 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `getvfsstat' function. */ -/* #undef HAVE_GETVFSSTAT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_GRP_H 1 - -/* Define to 1 if you have the `hasmntopt' function. */ -#define HAVE_HASMNTOPT 1 - -/* Define to 1 if you have the `if_freenameindex' function. */ -#define HAVE_IF_FREENAMEINDEX 1 - -/* Define to 1 if you have the `if_indextoname' function. */ -#define HAVE_IF_INDEXTONAME 1 - -/* Define to 1 if you have the `if_nameindex' function. */ -#define HAVE_IF_NAMEINDEX 1 - -/* Define to 1 if you have the `if_nametoindex' function. */ -#define HAVE_IF_NAMETOINDEX 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INET_COMMON_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INET_IP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INET_MIB2_H */ - -/* Define to 1 if you have the `inet_ntop' function. */ -#define HAVE_INET_NTOP 1 - -/* Define to 1 if you have the `inet_pton' function. */ -#define HAVE_INET_PTON 1 - -/* Define to 1 if you have the `initgroups' function. */ -#define HAVE_INITGROUPS 1 - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if the system has the type `in_addr_t'. */ -#define HAVE_IN_ADDR_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IOCTLS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IPHLPAPI_H */ - -/* Set if IP_PKTINFO is usable */ -#define HAVE_IP_PKTINFO 1 - -/* Set if IP_RECVDSTADDR is usable */ -/* #undef HAVE_IP_RECVDSTADDR */ - -/* Define to 1 if you have the `kinfo_get_cpus' function. */ -/* #undef HAVE_KINFO_GET_CPUS */ - -/* Define if you have /dev/kmem */ -/* #undef HAVE_KMEM */ - -/* Define to 1 if you have the `knlist' function. */ -/* #undef HAVE_KNLIST */ - -/* Define to 1 if you have the `krb5_auth_con_getsendsubkey' function. */ -/* #undef HAVE_KRB5_AUTH_CON_GETSENDSUBKEY */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_KSTAT_H */ - -/* Define to 1 if you have the `kvm_getproc2' function. */ -/* #undef HAVE_KVM_GETPROC2 */ - -/* Define to 1 if you have the `kvm_getprocs' function. */ -/* #undef HAVE_KVM_GETPROCS */ - -/* Define to 1 if you have the `kvm_getswapinfo' function. */ -/* #undef HAVE_KVM_GETSWAPINFO */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_KVM_H */ - -/* Define to 1 if you have the `kvm_openfiles' function. */ -/* #undef HAVE_KVM_OPENFILES */ - -/* Define to 1 if you have the OpenSSL library (-lcrypto or -leay32). */ -/* #undef HAVE_LIBCRYPTO */ - -/* Define to 1 if you have the `elf' library (-lelf). */ -/* #undef HAVE_LIBELF */ - -/* Define to 1 if you have the `kstat' library (-lkstat). */ -/* #undef HAVE_LIBKSTAT */ - -/* Define to 1 if you have the `mld' library (-lmld). */ -/* #undef HAVE_LIBMLD */ - -/* Define to 1 if provides the libnl3 API */ -/* #undef HAVE_LIBNL3 */ - -/* define if you have libnm */ -/* #undef HAVE_LIBNM */ - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -/* #undef HAVE_LIBNSL */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBPERFSTAT_H */ - -/* Define to 1 if you have the `pkcs11' library (-lpkcs11). */ -/* #undef HAVE_LIBPKCS11 */ - -/* define if you have BSD pkg-ng */ -/* #undef HAVE_LIBPKG */ - -/* Define to 1 if you have the `pthread' library (-lpthread). */ -/* #undef HAVE_LIBPTHREAD */ - -/* Define to 1 if you have the `rpm' library (-lrpm). */ -/* #undef HAVE_LIBRPM */ - -/* Define to 1 if you have the `RSAglue' library (-lRSAglue). */ -/* #undef HAVE_LIBRSAGLUE */ - -/* Define to 1 if you have the `rsaref' library (-lrsaref). */ -/* #undef HAVE_LIBRSAREF */ - -/* Define to 1 if you have the `sres' library (-lsres). */ -/* #undef HAVE_LIBSRES */ - -/* Define to 1 if you have the `ssh2' library (-lssh2). */ -/* #undef HAVE_LIBSSH2 */ - -/* Define to 1 if you have the `ssl' library (-lssl). */ -/* #undef HAVE_LIBSSL */ - -/* Define to 1 if your `ssl' library supports DTLS (-lssl). */ -/* #undef HAVE_LIBSSL_DTLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LINUX_ETHTOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LINUX_HDREG_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LINUX_NETLINK_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LINUX_RTNETLINK_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LINUX_TASKS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if you have the `localtime_r' function. */ -#define HAVE_LOCALTIME_R 1 - -/* Define to 1 if the system has the type `long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Set if the lpstat command is available */ -#define HAVE_LPSTAT 1 - -/* Define to 1 if you have the `lrand48' function. */ -#define HAVE_LRAND48 1 - -/* Define to 1 if you have the `lseek64' function. */ -#define HAVE_LSEEK64 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_PTE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_TYPES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if the system has the type `mib2_ipIfStatsEntry_t'. */ -/* #undef HAVE_MIB2_IPIFSTATSENTRY_T */ - -/* Define to 1 if you have the `mkstemp' function. */ -#define HAVE_MKSTEMP 1 - -/* Define to 1 if you have the `mktime' function. */ -#define HAVE_MKTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MNTENT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MTAB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NBUTIL_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_IN6_PCB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_IN6_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_IP6_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_ND6_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_TCP6_FSM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_TCP6_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_TCP6_TIMER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_TCP6_VAR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_ICMP6_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_ICMP_VAR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IF_ETHER_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_PCB_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_SYSTM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_VAR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IP6_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IP_ICMP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IP_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_TCPIP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_TCP_FSM_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_TCP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_TCP_TIMER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_TCP_VAR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_UDP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_UDP_VAR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETIPX_IPX_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETLINK_NETLINK_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_ARP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NET_IF_DL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NET_IF_MIB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NET_IF_TYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NET_IF_VAR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_ROUTE_H 1 - -/* Define to 1 if the system has the type `nfds_t'. */ -#define HAVE_NFDS_T 1 - -/* Define to 1 if you have the `nlist' function. */ -/* #undef HAVE_NLIST */ - -/* Define to 1 if you have the `nlist64' function. */ -/* #undef HAVE_NLIST64 */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NLIST_H */ - -/* Define to 1 if the system has the type `off64_t'. */ -#define HAVE_OFF64_T 1 - -/* Define to 1 if you have the `opendir' function. */ -#define HAVE_OPENDIR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_AES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_DES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_DH_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_EVP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_HMAC_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OSRELDATE_H */ - -/* define if you have pci_lookup_name() */ -/* #undef HAVE_PCI_LOOKUP_NAME */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PCI_PCI_H */ - -/* on aix, if you have perfstat */ -/* #undef HAVE_PERFSTAT */ - -/* Define to 1 if you have `the perl_eval_pv' function. */ -/* #undef HAVE_PERL_EVAL_PV_LC */ - -/* Define to 1 if you have the `Perl_eval_pv' function. */ -/* #undef HAVE_PERL_EVAL_PV_UC */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PICL_H */ - -/* define if you have pkginfo */ -/* #undef HAVE_PKGINFO */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PKGINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PKGLOCS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PKG_H */ - -/* Define to 1 if you have the `poll' function. */ -#define HAVE_POLL 1 - -/* Define to 1 if you have the `pread64' function. */ -#define HAVE_PREAD64 1 - -/* Set if /etc/printcap exists */ -#define HAVE_PRINTCAP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PTHREAD_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PWD_H 1 - -/* Define to 1 if you have the `rand' function. */ -#define HAVE_RAND 1 - -/* Define to 1 if you have the `random' function. */ -#define HAVE_RANDOM 1 - -/* Define to 1 if you have the `readdir' function. */ -#define HAVE_READDIR 1 - -/* Define to 1 if you have the `regcomp' function. */ -#define HAVE_REGCOMP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_REGEX_H 1 - -/* Define to 1 if you have the `rpmGetPath' function. */ -/* #undef HAVE_RPMGETPATH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RPM_HEADER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RPM_RPMFILEUTIL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RPM_RPMLIB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RPM_RPMTS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SECURITY_CRYPTOKI_H */ - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SENSORS_SENSORS_H */ - -/* Define to 1 if you have the `setenv' function. */ -#define HAVE_SETENV 1 - -/* Define to 1 if you have the `setgid' function. */ -#define HAVE_SETGID 1 - -/* Define to 1 if you have the `setgroups' function. */ -#define HAVE_SETGROUPS 1 - -/* Define to 1 if you have the `setitimer' function. */ -#define HAVE_SETITIMER 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the `setmntent' function. */ -#define HAVE_SETMNTENT 1 - -/* Define to 1 if you have the `setsid' function. */ -#define HAVE_SETSID 1 - -/* Define to 1 if you have the `setuid' function. */ -#define HAVE_SETUID 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SGTTY_H 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigalrm' function. */ -/* #undef HAVE_SIGALRM */ - -/* Define to 1 if you have the `sigblock' function. */ -#define HAVE_SIGBLOCK 1 - -/* Define to 1 if you have the `sighold' function. */ -#define HAVE_SIGHOLD 1 - -/* Define if SIGHUP is defined in . */ -#define HAVE_SIGHUP 1 - -/* Define to 1 if you have the `signal' function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the `sigprocmask' function. */ -#define HAVE_SIGPROCMASK 1 - -/* Define to 1 if you have the `sigset' function. */ -#define HAVE_SIGSET 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if the system has the type `socklen_t'. */ -#define HAVE_SOCKLEN_T 1 - -/* Define to 1 if the system has the type `ssize_t'. */ -#define HAVE_SSIZE_T 1 - -/* Define to 1 if you have the `statfs' function. */ -#define HAVE_STATFS 1 - -/* Define to 1 if you have the `statvfs' function. */ -#define HAVE_STATVFS 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stime' function. */ -#define HAVE_STIME 1 - -/* Define to 1 if you have the `strcasestr' function. */ -#define HAVE_STRCASESTR 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcat' function. */ -/* #undef HAVE_STRLCAT */ - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - -/* Define to 1 if you have the `strncasecmp' function. */ -#define HAVE_STRNCASECMP 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `strtoull' function. */ -#define HAVE_STRTOULL 1 - -/* Define to 1 if `at_next' is a member of `struct arphd'. */ -/* #undef HAVE_STRUCT_ARPHD_AT_NEXT */ - -/* Define to 1 if `weak_key' is a member of `struct des_ks_struct'. */ -/* #undef HAVE_STRUCT_DES_KS_STRUCT_WEAK_KEY */ - -/* Define to 1 if `d_type' is a member of `struct dirent'. */ -#define HAVE_STRUCT_DIRENT_D_TYPE 1 - -/* Define to 1 if `speed_hi' is a member of `struct ethtool_cmd'. */ -#define HAVE_STRUCT_ETHTOOL_CMD_SPEED_HI 1 - -/* Define to 1 if `ifa_next' is a member of `struct ifaddr'. */ -#define HAVE_STRUCT_IFADDR_IFA_NEXT 1 - -/* Define to 1 if `if_addrhead.tqh_first' is a member of `struct ifnet'. */ -/* #undef HAVE_STRUCT_IFNET_IF_ADDRHEAD_TQH_FIRST */ - -/* Define to 1 if `if_addrlist' is a member of `struct ifnet'. */ -/* #undef HAVE_STRUCT_IFNET_IF_ADDRLIST */ - -/* Define to 1 if `if_baudrate' is a member of `struct ifnet'. */ -/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE */ - -/* Define to 1 if `if_baudrate.ifs_value' is a member of `struct ifnet'. */ -/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE */ - -/* Define to 1 if `if_ibytes' is a member of `struct ifnet'. */ -#define HAVE_STRUCT_IFNET_IF_IBYTES 1 - -/* Define to 1 if `if_imcasts' is a member of `struct ifnet'. */ -/* #undef HAVE_STRUCT_IFNET_IF_IMCASTS */ - -/* Define to 1 if `if_iqdrops' is a member of `struct ifnet'. */ -#define HAVE_STRUCT_IFNET_IF_IQDROPS 1 - -/* Define to 1 if `if_lastchange.tv_nsec' is a member of `struct ifnet'. */ -/* #undef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC */ - -/* Define to 1 if `if_lastchange.tv_sec' is a member of `struct ifnet'. */ -/* #undef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC */ - -/* Define to 1 if `if_mtu' is a member of `struct ifnet'. */ -#define HAVE_STRUCT_IFNET_IF_MTU 1 - -/* Define to 1 if `if_noproto' is a member of `struct ifnet'. */ -/* #undef HAVE_STRUCT_IFNET_IF_NOPROTO */ - -/* Define to 1 if `if_obytes' is a member of `struct ifnet'. */ -#define HAVE_STRUCT_IFNET_IF_OBYTES 1 - -/* Define to 1 if `if_omcasts' is a member of `struct ifnet'. */ -/* #undef HAVE_STRUCT_IFNET_IF_OMCASTS */ - -/* Define to 1 if `if_speed' is a member of `struct ifnet'. */ -#define HAVE_STRUCT_IFNET_IF_SPEED 1 - -/* Define to 1 if `if_type' is a member of `struct ifnet'. */ -#define HAVE_STRUCT_IFNET_IF_TYPE 1 - -/* Define to 1 if `if_xname' is a member of `struct ifnet'. */ -/* #undef HAVE_STRUCT_IFNET_IF_XNAME */ - -/* Define to 1 if `ip6s_exthdrtoolong ' is a member of `struct ip6stat'. */ -/* #undef HAVE_STRUCT_IP6STAT_IP6S_EXTHDRTOOLONG_ */ - -/* Define to 1 if `ips_cantforward' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFORWARD */ - -/* Define to 1 if `ips_cantfrag' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFRAG */ - -/* Define to 1 if `ips_delivered' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_DELIVERED */ - -/* Define to 1 if `ips_fragdropped' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGDROPPED */ - -/* Define to 1 if `ips_fragmented' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGMENTED */ - -/* Define to 1 if `ips_fragtimeout' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGTIMEOUT */ - -/* Define to 1 if `ips_localout' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_LOCALOUT */ - -/* Define to 1 if `ips_noproto' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_NOPROTO */ - -/* Define to 1 if `ips_noroute' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_NOROUTE */ - -/* Define to 1 if `ips_odropped' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_ODROPPED */ - -/* Define to 1 if `ips_ofragments' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_OFRAGMENTS */ - -/* Define to 1 if `ips_reassembled' is a member of `struct ipstat'. */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_REASSEMBLED */ - -/* Define to 1 if `m_clfree' is a member of `struct mbstat'. */ -/* #undef HAVE_STRUCT_MBSTAT_M_CLFREE */ - -/* Define to 1 if `m_clusters' is a member of `struct mbstat'. */ -/* #undef HAVE_STRUCT_MBSTAT_M_CLUSTERS */ - -/* Define to 1 if `m_mbufs' is a member of `struct mbstat'. */ -/* #undef HAVE_STRUCT_MBSTAT_M_MBUFS */ - -/* Define to 1 if `n_value' is a member of `struct nlist64'. */ -/* #undef HAVE_STRUCT_NLIST64_N_VALUE */ - -/* Define to 1 if `n_value' is a member of `struct nlist'. */ -/* #undef HAVE_STRUCT_NLIST_N_VALUE */ - -/* Define to 1 if `rt_dst' is a member of `struct rtentry'. */ -#define HAVE_STRUCT_RTENTRY_RT_DST 1 - -/* Define to 1 if `rt_hash' is a member of `struct rtentry'. */ -/* #undef HAVE_STRUCT_RTENTRY_RT_HASH */ - -/* Define to 1 if `rt_next' is a member of `struct rtentry'. */ -/* #undef HAVE_STRUCT_RTENTRY_RT_NEXT */ - -/* Define to 1 if `rt_refcnt' is a member of `struct rtentry'. */ -/* #undef HAVE_STRUCT_RTENTRY_RT_REFCNT */ - -/* Define to 1 if `rt_unit' is a member of `struct rtentry'. */ -/* #undef HAVE_STRUCT_RTENTRY_RT_UNIT */ - -/* Define to 1 if `rt_use' is a member of `struct rtentry'. */ -/* #undef HAVE_STRUCT_RTENTRY_RT_USE */ - -/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ -#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1 - -/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */ -#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */ -/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */ - -/* Define to 1 if `sa_union.sa_generic.sa_family2' is a member of `struct - sockaddr'. */ -/* #undef HAVE_STRUCT_SOCKADDR_SA_UNION_SA_GENERIC_SA_FAMILY2 */ - -/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 - -/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */ -/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */ - -/* Define to 1 if `f_favail' is a member of `struct statfs'. */ -/* #undef HAVE_STRUCT_STATFS_F_FAVAIL */ - -/* Define to 1 if `f_ffree' is a member of `struct statfs'. */ -#define HAVE_STRUCT_STATFS_F_FFREE 1 - -/* Define to 1 if `f_files' is a member of `struct statfs'. */ -#define HAVE_STRUCT_STATFS_F_FILES 1 - -/* Define to 1 if `f_flags' is a member of `struct statfs'. */ -#define HAVE_STRUCT_STATFS_F_FLAGS 1 - -/* Define to 1 if `f_frsize' is a member of `struct statfs'. */ -#define HAVE_STRUCT_STATFS_F_FRSIZE 1 - -/* Define to 1 if `f_files' is a member of `struct statvfs'. */ -#define HAVE_STRUCT_STATVFS_F_FILES 1 - -/* Define to 1 if `f_frsize' is a member of `struct statvfs'. */ -#define HAVE_STRUCT_STATVFS_F_FRSIZE 1 - -/* Define to 1 if `mnt_dir' is a member of `struct statvfs'. */ -/* #undef HAVE_STRUCT_STATVFS_MNT_DIR */ - -/* Define to 1 if `sw_nblksenabled' is a member of `struct swdevt'. */ -/* #undef HAVE_STRUCT_SWDEVT_SW_NBLKSENABLED */ - -/* Define to 1 if `tcp_rcvmemdrop' is a member of `struct tcpstat'. */ -/* #undef HAVE_STRUCT_TCPSTAT_TCP_RCVMEMDROP */ - -/* Define to 1 if `tz_dsttime' is a member of `struct timezone'. */ -#define HAVE_STRUCT_TIMEZONE_TZ_DSTTIME 1 - -/* Define to 1 if `tm_gmtoff' is a member of `struct tm'. */ -#define HAVE_STRUCT_TM_TM_GMTOFF 1 - -/* Define to 1 if `udps_discard' is a member of `struct udpstat'. */ -/* #undef HAVE_STRUCT_UDPSTAT_UDPS_DISCARD */ - -/* Define to 1 if `udps_fullsock' is a member of `struct udpstat'. */ -/* #undef HAVE_STRUCT_UDPSTAT_UDPS_FULLSOCK */ - -/* Define to 1 if `udps_ipackets' is a member of `struct udpstat'. */ -/* #undef HAVE_STRUCT_UDPSTAT_UDPS_IPACKETS */ - -/* Define to 1 if `udps_noport' is a member of `struct udpstat'. */ -/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORT */ - -/* Define to 1 if `udps_noportbcast' is a member of `struct udpstat'. */ -/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORTBCAST */ - -/* Define to 1 if `udps_opackets' is a member of `struct udpstat'. */ -/* #undef HAVE_STRUCT_UDPSTAT_UDPS_OPACKETS */ - -/* Define to 1 if `pgswapin' is a member of `struct uvmexp'. */ -/* #undef HAVE_STRUCT_UVMEXP_PGSWAPIN */ - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYSLOG_H 1 - -/* Define to 1 if you have the `system' function. */ -#define HAVE_SYSTEM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_CDEFS_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CONF_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_DISKIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_DISKLABEL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_DKIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_DKSTAT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_DMAP_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_FILE_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_FILIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_FIXPOINT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_FS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_HASHING_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_LOADAVG_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MBUF_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MNTENT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MNTTAB_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MOUNT_H 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_POLL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_POOL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROC_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROTOSW_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_QUEUE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SEMA_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKETVAR_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKIO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STATFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STATVFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STREAM_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SWAP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSGET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSMP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TCPIPSTATS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMEB_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIMEOUT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_USER_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UTSNAME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_VFS_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VMMAC_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VMMETER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VMPARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VMSYSTM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VNODE_H */ - -/* Define to 1 if you have that is POSIX.1 compatible. */ -#define HAVE_SYS_WAIT_H 1 - -/* Define to 1 if you have the `tcgetattr' function. */ -#define HAVE_TCGETATTR 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define if a timezone variable is declared in */ -#define HAVE_TIMEZONE_VARIABLE 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UFS_FFS_FS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UFS_FS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UFS_UFS_DINODE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UFS_UFS_INODE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UFS_UFS_QUOTA_H */ - -/* Define to 1 if the system has the type `uintmax_t'. */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if the system has the type `uintptr_t'. */ -#define HAVE_UINTPTR_T 1 - -/* Define to 1 if you have the `uname' function. */ -#define HAVE_UNAME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if the system has the type `unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define to 1 if you have the `usleep' function. */ -#define HAVE_USLEEP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UTMPX_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UTSNAME_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UVM_UVM_EXTERN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UVM_UVM_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VALGRIND_MEMCHECK_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VALGRIND_VALGRIND_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VALIDATOR_VALIDATOR_CONFIG_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VM_SWAP_PAGER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VM_VM_EXTERN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VM_VM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VM_VM_PARAM_H */ - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINDOWS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINSOCK2_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINSOCK_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WS2TCPIP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_XTI_H */ - -/* location of UNIX kernel */ -#define KERNEL_LOC "unknown" - -/* Path to the lpstat command */ -#define LPSTAT_PATH "/usr/bin/lpstat" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* define if agentx transport is to use domain sockets only */ -/* #undef NETSNMP_AGENTX_DOM_SOCK_ONLY */ - -/* Unix domain socket for AgentX master-subagent communication */ -#define NETSNMP_AGENTX_SOCKET "/var/agentx/master" - -/* Define if static inline functions are unsupported */ -/* #undef NETSNMP_BROKEN_INLINE */ - -/* "Define if crytography support is possible" */ -/* #undef NETSNMP_CAN_DO_CRYPTO */ - -/* sysctl works to get boottime, etc... */ -/* #undef NETSNMP_CAN_USE_SYSCTL */ - -/* configure options specified */ -#define NETSNMP_CONFIGURE_OPTIONS " '--prefix=/usr/local/mariadb/columnstore' '--with-mib-modules=disman/event-mib' '--with-cc=gcc' '--with-logfile=/var/log/snmpd.log' '--with-sys-location=Unknown' '--with-sys-contact=root@localhost.localdomain' '--with-default-snmp-version=3' '--with-persistent-directory=/var/net-snmp' '--without-openssl' '--with-ldflags=-Wl,-rpath -Wl,/usr/local/mariadb/columnstore/lib'" - -/* default location to look for mibs to load using the above tokens and/or - those in the MIBS envrionment variable */ -#define NETSNMP_DEFAULT_MIBDIRS "$HOME/.snmp/mibs:/usr/local/mariadb/columnstore/share/snmp/mibs" - -/* default mib files to load, specified by path. */ -/* #undef NETSNMP_DEFAULT_MIBFILES */ - -/* Define if no agent is built */ -/* #undef NETSNMP_DISABLE_AGENT */ - -/* Define if no apps are built */ -/* #undef NETSNMP_DISABLE_APPS */ - -/* Define if DES encryption should not be supported */ -/* #undef NETSNMP_DISABLE_DES */ - -/* Define if MD5 authentication should not be supported */ -/* #undef NETSNMP_DISABLE_MD5 */ - -/* Define if mib loading and parsing code should not be included */ -/* #undef NETSNMP_DISABLE_MIB_LOADING */ - -/* Define if SNMP SET support should be disabled */ -/* #undef NETSNMP_DISABLE_SET_SUPPORT */ - -/* Define if SNMPv1 code should not be included */ -/* #undef NETSNMP_DISABLE_SNMPV1 */ - -/* Define if SNMPv2c code should not be included */ -/* #undef NETSNMP_DISABLE_SNMPV2C */ - -/* Define if you are embedding perl in the main agent. */ -/* #undef NETSNMP_EMBEDDED_PERL */ - -/* define if you want to enable IPv6 support */ -/* #undef NETSNMP_ENABLE_IPV6 */ - -/* define if you want to restrict SMUX connections to localhost by default */ -/* #undef NETSNMP_ENABLE_LOCAL_SMUX */ - -/* Define if you want to build MFD module rewrites */ -/* #undef NETSNMP_ENABLE_MFD_REWRITES */ - -/* define if you want to compile support for both authentication and privacy - support. */ -#define NETSNMP_ENABLE_SCAPI_AUTHPRIV 1 - -/* testing code sections. */ -/* #undef NETSNMP_ENABLE_TESTING_CODE */ - -/* Should evaluate to the name of the current function if defined */ -#define NETSNMP_FUNCTION __func__ - -/* ifnet needs to have _KERNEL defined */ -/* #undef NETSNMP_IFNET_NEEDS_KERNEL */ - -/* ifnet needs to have _KERNEL_STRUCTURES defined */ -/* #undef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES */ - -/* Define if you want to remove all non-essential code features. */ -/* #undef NETSNMP_MINIMAL_CODE */ - -/* Define if you want to only support sending notifications */ -/* #undef NETSNMP_NOTIFY_ONLY */ - -/* Define to suppress inclusion of deprecated functions */ -/* #undef NETSNMP_NO_DEPRECATED_FUNCTIONS */ - -/* If you don't want the agent to report on variables it doesn't have data for - */ -#define NETSNMP_NO_DUMMY_VALUES 1 - -/* If we don't want to use kmem. */ -/* #undef NETSNMP_NO_KMEM_USAGE */ - -/* Define if you want to remove all listening support from the code */ -/* #undef NETSNMP_NO_LISTEN_SUPPORT */ - -/* If you don't have root access don't exit upon kmem errors */ -/* #undef NETSNMP_NO_ROOT_ACCESS */ - -/* Define if you want to remove all SET/write access from the code */ -/* #undef NETSNMP_NO_WRITE_SUPPORT */ - -/* umask permissions to set up persistent files with */ -#define NETSNMP_PERSISTENT_MASK 077 - -/* Size prefix to use to printf a uint32_t */ -#define NETSNMP_PRI32 "" - -/* Size prefix to use to printf a size_t or ssize_t */ -#define NETSNMP_PRIz "l" - -/* Define to 1 if you want to build with reentrant/threaded code (incomplete). - */ -/* #undef NETSNMP_REENTRANT */ - -/* define if you do not want snmptrapd to register as an AgentX subagent */ -/* #undef NETSNMP_SNMPTRAPD_DISABLE_AGENTX */ - -/* Pattern of temporary files */ -#define NETSNMP_TEMP_FILE_PATTERN "/tmp/snmpdXXXXXX" - -/* "Define if internal cryptography code should be used" */ -/* #undef NETSNMP_USE_INTERNAL_CRYPTO */ - -/* define if you are using the MD5 code ... */ -#define NETSNMP_USE_INTERNAL_MD5 1 - -/* Define this if you're using Heimdal Kerberos */ -/* #undef NETSNMP_USE_KERBEROS_HEIMDAL */ - -/* Define this if we're using the new MIT crypto API */ -/* #undef NETSNMP_USE_KERBEROS_MIT */ - -/* define if you are using the mysql code for snmptrapd ... */ -/* #undef NETSNMP_USE_MYSQL */ - -/* Define if you are using the codeS11 library ... */ -/* #undef NETSNMP_USE_PKCS11 */ - -/* Define this if you have lm_sensors v3 or later */ -/* #undef NETSNMP_USE_SENSORS_V3 */ - -/* Should we compile to use special opaque types: float, double, counter64, - i64, ui64, union? */ -#define NETSNMP_WITH_OPAQUE_SPECIAL_TYPES 1 - -/* Define to the address where bug reports for this package should be sent. */ -#ifndef PACKAGE_BUGREPORT -#define PACKAGE_BUGREPORT "net-snmp-coders@lists.sourceforge.net" -#endif - -/* Define to the full name of this package. */ -#ifndef PACKAGE_NAME -#define PACKAGE_NAME "Net-SNMP" -#endif - -/* Define to the full name and version of this package. */ -#ifndef PACKAGE_STRING -#define PACKAGE_STRING "Net-SNMP 5.7.3" -#endif - -/* Define to the one symbol short name of this package. */ -#ifndef PACKAGE_TARNAME -#define PACKAGE_TARNAME "net-snmp" -#endif - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "5.7.3" -#endif - -/* Command to generate ps output, the final column must be the process name - withOUT arguments */ -#define PSCMD "/usr/bin/ps -e" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* define rtentry to ortentry on SYSV machines (alphas) */ -#define RTENTRY struct rtentry - -/* Use BSD 4.4 routing table entries? */ -/* #undef RTENTRY_4_4 */ - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `intmax_t', as computed by sizeof. */ -#define SIZEOF_INTMAX_T 8 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 8 - -/* The size of `long long', as computed by sizeof. */ -#define SIZEOF_LONG_LONG 8 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* The size of `sockaddr_un.sun_path', as computed by sizeof. */ -#define SIZEOF_SOCKADDR_UN_SUN_PATH 108 - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define if statfs takes 2 args and the second argument has type struct - fs_data. [Ultrix] */ -/* #undef STAT_STATFS_FS_DATA */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* define if SIOCGIFADDR exists in sys/ioctl.h */ -#define SYS_IOCTL_H_HAS_SIOCGIFADDR 1 - -/* Define if the TCP timer constants in depend on the - integer variable 'hz'. [FreeBSD 4.x] */ -/* #undef TCPTV_NEEDS_HZ */ - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Where is the uname command */ -#define UNAMEPROG "/usr/bin/uname" - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define if you have RPM 4.6 or newer to turn on legacy API */ -/* #undef _RPM_4_4_COMPAT */ - -/* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT32_T */ - -/* Define for Solaris 2.5.1 so the uint64_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT64_T */ - -/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT8_T */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the type of a signed integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int16_t */ - -/* Define to the type of a signed integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int32_t */ - -/* Define to the type of a signed integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int64_t */ - -/* Define to the type of a signed integer type of width exactly 8 bits if such - a type exists and the standard includes do not define it. */ -/* #undef int8_t */ - -/* Define to the widest signed integer type if and do - not define. */ -/* #undef intmax_t */ - -/* Define to the type of a signed integer type wide enough to hold a pointer, - if such a type exists, and if the system does not define it. */ -/* #undef intptr_t */ - -/* Define to `long int' if does not define. */ -/* #undef off_t */ - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define to the type of an unsigned integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint16_t */ - -/* Define to the type of an unsigned integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint32_t */ - -/* Define to the type of an unsigned integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint64_t */ - -/* Define to the type of an unsigned integer type of width exactly 8 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint8_t */ - -/* Define to the widest unsigned integer type if and - do not define. */ -/* #undef uintmax_t */ - -/* Define to the type of an unsigned integer type wide enough to hold a - pointer, if such a type exists, and if the system does not define it. */ -/* #undef uintptr_t */ - -/* end of definitions added by configure on-the-fly */ - -/* If you have openssl 0.9.7 or above, you likely have AES support. */ -/* #undef NETSNMP_USE_OPENSSL */ -#if (defined(NETSNMP_USE_OPENSSL) && defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT)) || defined(NETSNMP_USE_INTERNAL_CRYPTO) -#define HAVE_AES 1 -#endif - -/* define random functions */ - -#ifndef HAVE_RANDOM -#ifdef HAVE_LRAND48 -#define random lrand48 -#define srandom(s) srand48(s) -#else -#ifdef HAVE_RAND -#define random rand -#define srandom(s) srand(s) -#endif -#endif -#endif - -/* define signal if DNE */ - -#ifndef HAVE_SIGNAL -#ifdef HAVE_SIGSET -#define signal(a,b) sigset(a,b) -#endif -#endif - -#ifdef HAVE_DMALLOC_H -#define DMALLOC_FUNC_CHECK -#endif - -#endif /* NETSNMP_NO_AUTOCONF_DEFINITIONS */ - - - - -/* ********* NETSNMP_MARK_BEGIN_CLEAN_NAMESPACE ********* */ -/* - * put all new net-snmp-specific definitions here - * - * all definitions MUST have a NETSNMP_ prefix - * - */ - -/* Default (SNMP) version number for the tools to use */ -#define NETSNMP_DEFAULT_SNMP_VERSION 3 - -/* don't change these values! */ -#define NETSNMP_SNMPV1 0xAAAA /* readable by anyone */ -#define NETSNMP_SNMPV2ANY 0xA000 /* V2 Any type (includes NoAuth) */ -#define NETSNMP_SNMPV2AUTH 0x8000 /* V2 Authenticated requests only */ - -/* default list of mibs to load */ -#define NETSNMP_DEFAULT_MIBS ":SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB:HOST-RESOURCES-MIB:NOTIFICATION-LOG-MIB:DISMAN-EVENT-MIB:DISMAN-SCHEDULE-MIB:UCD-SNMP-MIB:UCD-DEMO-MIB:SNMP-TARGET-MIB:NET-SNMP-AGENT-MIB:HOST-RESOURCES-TYPES:SNMP-MPD-MIB:SNMP-USER-BASED-SM-MIB:SNMP-FRAMEWORK-MIB:SNMP-VIEW-BASED-ACM-MIB:SNMP-COMMUNITY-MIB:IP-FORWARD-MIB:NET-SNMP-PASS-MIB:NET-SNMP-EXTEND-MIB:UCD-DLMOD-MIB:SNMP-NOTIFICATION-MIB:SNMPv2-TM:NET-SNMP-VACM-MIB" - -/* debugging stuff */ -/* if defined, we optimize the code to exclude all debugging calls. */ -/* #undef NETSNMP_NO_DEBUGGING */ -/* ignore the -D flag and always print debugging information */ -#define NETSNMP_ALWAYS_DEBUG 0 - -/* reverse encoding BER packets is both faster and more efficient in space. */ -#define NETSNMP_USE_REVERSE_ASNENCODING 1 -#define NETSNMP_DEFAULT_ASNENCODING_DIRECTION 1 /* 1 = reverse, 0 = forwards */ - -/* PERSISTENT_DIRECTORY: If defined, the library is capabile of saving - persisant information to this directory in the form of configuration - lines: PERSISTENT_DIRECTORY/NAME.persistent.conf */ -#define NETSNMP_PERSISTENT_DIRECTORY "/var/net-snmp" - -/* AGENT_DIRECTORY_MODE: the mode the agents should use to create - directories with. Since the data stored here is probably sensitive, it - probably should be read-only by root/administrator. */ -#define NETSNMP_AGENT_DIRECTORY_MODE 0700 - -/* MAX_PERSISTENT_BACKUPS: - * The maximum number of persistent backups the library will try to - * read from the persistent cache directory. If an application fails to - * close down successfully more than this number of times, data will be lost. - */ -#define NETSNMP_MAX_PERSISTENT_BACKUPS 10 - -/* define the system type include file here */ -#define NETSNMP_SYSTEM_INCLUDE_FILE "net-snmp/system/linux.h" - -/* define the machine (cpu) type include file here */ -#define NETSNMP_MACHINE_INCLUDE_FILE "net-snmp/machine/generic.h" - -/* define the UDP buffer defaults undefined means use the OS buffers - * by default */ -/* #undef NETSNMP_DEFAULT_SERVER_SEND_BUF */ -/* #undef NETSNMP_DEFAULT_SERVER_RECV_BUF */ -/* #undef NETSNMP_DEFAULT_CLIENT_SEND_BUF */ -/* #undef NETSNMP_DEFAULT_CLIENT_RECV_BUF */ - -/* net-snmp's major path names */ -#define SNMPLIBPATH "/usr/local/mariadb/columnstore/lib/snmp" -#define SNMPSHAREPATH "/usr/local/mariadb/columnstore/share/snmp" -#define SNMPCONFPATH "/usr/local/mariadb/columnstore/etc/snmp" -#define SNMPDLMODPATH "/usr/local/mariadb/columnstore/lib/snmp/dlmod" - -/* NETSNMP_LOGFILE: If defined it closes stdout/err/in and opens this in - out/err's place. (stdin is closed so that sh scripts won't wait for it) */ -#define NETSNMP_LOGFILE "/var/log/snmpd.log" - -/* default system contact */ -#define NETSNMP_SYS_CONTACT "root@localhost.localdomain" - -/* system location */ -#define NETSNMP_SYS_LOC "Unknown" - -/* Use libwrap to handle allow/deny hosts? */ -/* #undef NETSNMP_USE_LIBWRAP */ - -/* Mib-2 tree Info */ -/* These are the system information variables. */ - -#define NETSNMP_VERS_DESC "unknown" /* overridden at run time */ -#define NETSNMP_SYS_NAME "unknown" /* overridden at run time */ - -/* comment out the second define to turn off functionality for any of - these: (See README for details) */ - -/* proc PROCESSNAME [MAX] [MIN] */ -#define NETSNMP_PROCMIBNUM 2 - -/* exec/shell NAME COMMAND */ -#define NETSNMP_SHELLMIBNUM 8 - -/* swap MIN */ -#define NETSNMP_MEMMIBNUM 4 - -/* disk DISK MINSIZE */ -#define NETSNMP_DISKMIBNUM 9 - -/* load 1 5 15 */ -#define NETSNMP_LOADAVEMIBNUM 10 - -/* which version are you using? This mibloc will tell you */ -#define NETSNMP_VERSIONMIBNUM 100 - -/* Reports errors the agent runs into */ -/* (typically its "can't fork, no mem" problems) */ -#define NETSNMP_ERRORMIBNUM 101 - -/* The sub id of EXTENSIBLEMIB returned to queries of - .iso.org.dod.internet.mgmt.mib-2.system.sysObjectID.0 */ -#define NETSNMP_AGENTID 250 - -/* This ID is returned after the AGENTID above. IE, the resulting - value returned by a query to sysObjectID is - EXTENSIBLEMIB.AGENTID.???, where ??? is defined below by OSTYPE */ - -#define NETSNMP_HPUX9ID 1 -#define NETSNMP_SUNOS4ID 2 -#define NETSNMP_SOLARISID 3 -#define NETSNMP_OSFID 4 -#define NETSNMP_ULTRIXID 5 -#define NETSNMP_HPUX10ID 6 -#define NETSNMP_NETBSD1ID 7 -#define NETSNMP_FREEBSDID 8 -#define NETSNMP_IRIXID 9 -#define NETSNMP_LINUXID 10 -#define NETSNMP_BSDIID 11 -#define NETSNMP_OPENBSDID 12 -#define NETSNMP_WIN32ID 13 -#define NETSNMP_HPUX11ID 14 -#define NETSNMP_AIXID 15 -#define NETSNMP_MACOSXID 16 -#define NETSNMP_DRAGONFLYID 17 -#define NETSNMP_UNKNOWNID 255 - -#ifdef hpux9 -#define NETSNMP_OSTYPE NETSNMP_HPUX9ID -#endif -#ifdef hpux10 -#define NETSNMP_OSTYPE NETSNMP_HPUX10ID -#endif -#ifdef hpux11 -#define NETSNMP_OSTYPE NETSNMP_HPUX11ID -#endif -#ifdef sunos4 -#define NETSNMP_OSTYPE NETSNMP_SUNOS4ID -#endif -#ifdef solaris2 -#define NETSNMP_OSTYPE NETSNMP_SOLARISID -#endif -#if defined(osf3) || defined(osf4) || defined(osf5) -#define NETSNMP_OSTYPE NETSNMP_OSFID -#endif -#ifdef ultrix4 -#define NETSNMP_OSTYPE NETSNMP_ULTRIXID -#endif -#if defined(netbsd1) || defined(netbsd2) -#define NETSNMP_OSTYPE NETSNMP_NETBSD1ID -#endif -#if defined(__FreeBSD__) -#define NETSNMP_OSTYPE NETSNMP_FREEBSDID -#endif -#if defined(__DragonFly__) -#define NETSNMP_OSTYPE NETSNMP_DRAGONFLYID -#endif -#if defined(irix6) || defined(irix5) -#define NETSNMP_OSTYPE NETSNMP_IRIXID -#endif -#ifdef linux -#define NETSNMP_OSTYPE NETSNMP_LINUXID -#endif -#if defined(bsdi2) || defined(bsdi3) || defined(bsdi4) -#define NETSNMP_OSTYPE NETSNMP_BSDIID -#endif -#if defined(openbsd) -#define NETSNMP_OSTYPE NETSNMP_OPENBSDID -#endif -#ifdef WIN32 -#define NETSNMP_OSTYPE NETSNMP_WIN32ID -#endif -#if defined(aix3) || defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) -#define NETSNMP_OSTYPE NETSNMP_AIXID -#endif -#if defined(darwin) && (darwin >= 8) -#define NETSNMP_OSTYPE NETSNMP_MACOSXID -#endif -/* unknown */ -#ifndef NETSNMP_OSTYPE -#define NETSNMP_OSTYPE NETSNMP_UNKNOWNID -#endif - -/* The enterprise number has been assigned by the IANA group. */ -/* Optionally, this may point to the location in the tree your */ -/* company/organization has been allocated. */ -/* The assigned enterprise number for the NET_SNMP MIB modules. */ -#define NETSNMP_ENTERPRISE_OID 8072 -#define NETSNMP_ENTERPRISE_MIB 1,3,6,1,4,1,8072 -#define NETSNMP_ENTERPRISE_DOT_MIB 1.3.6.1.4.1.8072 -#define NETSNMP_ENTERPRISE_DOT_MIB_LENGTH 7 - -/* The assigned enterprise number for sysObjectID. */ -#define NETSNMP_SYSTEM_MIB 1,3,6,1,4,1,8072,3,2,NETSNMP_OSTYPE -#define NETSNMP_SYSTEM_DOT_MIB 1.3.6.1.4.1.8072.3.2.NETSNMP_OSTYPE -#define NETSNMP_SYSTEM_DOT_MIB_LENGTH 10 - -/* The assigned enterprise number for notifications. */ -#define NETSNMP_NOTIFICATION_MIB 1,3,6,1,4,1,8072,4 -#define NETSNMP_NOTIFICATION_DOT_MIB 1.3.6.1.4.1.8072.4 -#define NETSNMP_NOTIFICATION_DOT_MIB_LENGTH 8 - -/* this is the location of the ucdavis mib tree. It shouldn't be - changed, as the places it is used are expected to be constant - values or are directly tied to the UCD-SNMP-MIB. */ -#define NETSNMP_UCDAVIS_OID 2021 -#define NETSNMP_UCDAVIS_MIB 1,3,6,1,4,1,2021 -#define NETSNMP_UCDAVIS_DOT_MIB 1.3.6.1.4.1.2021 -#define NETSNMP_UCDAVIS_DOT_MIB_LENGTH 7 - -/* how long to wait (seconds) for error querys before reseting the error trap.*/ -#define NETSNMP_ERRORTIMELENGTH 600 - -/* Exec command to fix PROC problems */ -/* %s will be replaced by the process name in error */ - -/* #define NETSNMP_PROCFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */ - -/* Exec command to fix EXEC problems */ -/* %s will be replaced by the exec/script name in error */ - -/* #define NETSNMP_EXECFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */ - -/* Should exec output Cashing be used (speeds up things greatly), and - if so, After how many seconds should the cache re-newed? Note: - Don't define CASHETIME to disable cashing completely */ - -#define NETSNMP_EXCACHETIME 30 -#define NETSNMP_CACHEFILE ".snmp-exec-cache" -#define NETSNMP_MAXCACHESIZE (1500*80) /* roughly 1500 lines max */ - -/* misc defaults */ - -/* default of 100 meg minimum if the minimum size is not specified in - the config file */ -#define NETSNMP_DEFDISKMINIMUMSPACE 100000 - -/* default maximum load average before error */ -#define NETSNMP_DEFMAXLOADAVE 12.0 - -/* max times to loop reading output from execs. */ -/* Because of sleep(1)s, this will also be time to wait (in seconds) for exec - to finish */ -#define NETSNMP_MAXREADCOUNT 100 - -/* Set if snmpgets should block and never timeout */ -/* The original CMU code had this hardcoded as = 1 */ -#define NETSNMP_SNMPBLOCK 1 - -/* How long to wait before restarting the agent after a snmpset to - EXTENSIBLEMIB.VERSIONMIBNUM.VERRESTARTAGENT. This is - necessary to finish the snmpset reply before restarting. */ -#define NETSNMP_RESTARTSLEEP 5 - -/* UNdefine to allow specifying zero-length community string */ -/* #define NETSNMP_NO_ZEROLENGTH_COMMUNITY 1 */ - -/* Number of community strings to store */ -#define NETSNMP_NUM_COMMUNITIES 5 - -/* internal define */ -#define NETSNMP_LASTFIELD -1 - -/* Pluggable transports. */ - -/* This is defined if support for the UDP/IP transport domain is - available. */ -#define NETSNMP_TRANSPORT_UDP_DOMAIN 1 - -/* This is defined if support for the "callback" transport domain is - available. */ -#define NETSNMP_TRANSPORT_CALLBACK_DOMAIN 1 - -/* This is defined if support for the TCP/IP transport domain is - available. */ -#define NETSNMP_TRANSPORT_TCP_DOMAIN 1 - -/* This is defined if support for the Unix transport domain - (a.k.a. "local IPC") is available. */ -#define NETSNMP_TRANSPORT_UNIX_DOMAIN 1 - -/* This is defined if support for the AAL5 PVC transport domain is - available. */ -/* #undef NETSNMP_TRANSPORT_AAL5PVC_DOMAIN */ - -/* This is defined if support for the IPX transport domain is - available. */ -/* #undef NETSNMP_TRANSPORT_IPX_DOMAIN */ - -/* This is defined if support for the UDP/IPv6 transport domain is - available. */ -/* #undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN */ - -/* This is defined if support for the TCP/IPv6 transport domain is - available. */ -/* #undef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN */ - -/* This is defined if support for the TLS transport domain is - available. */ -/* #undef NETSNMP_TRANSPORT_TLSBASE_DOMAIN */ - -/* This is defined if support for the Alias transport domain is - available. */ -#define NETSNMP_TRANSPORT_ALIAS_DOMAIN 1 - -/* This is defined if support for the SSH transport domain is - available. */ -/* #undef NETSNMP_TRANSPORT_SSH_DOMAIN */ - -/* This is defined if support for the DTLS/UDP transport domain is - available. */ -/* #undef NETSNMP_TRANSPORT_DTLSUDP_DOMAIN */ - -/* This is defined if support for the TLS/TCP transport domain is - available. */ -/* #undef NETSNMP_TRANSPORT_TLSTCP_DOMAIN */ - -/* This is defined if support for stdin/out transport domain is available. */ -/* #undef NETSNMP_TRANSPORT_STD_DOMAIN */ - -/* This is defined if support for the IPv4Base transport domain is available. */ -#define NETSNMP_TRANSPORT_IPV4BASE_DOMAIN 1 - -/* define this if the USM security module is available */ -#define NETSNMP_SECMOD_USM 1 - -/* define this if the KSM (kerberos based snmp) security module is available */ -/* #undef NETSNMP_SECMOD_KSM */ - -/* define this if the local security module is available */ -/* #undef NETSNMP_SECMOD_LOCALSM */ - -/* define if configured as a "mini-agent" */ -/* #undef NETSNMP_MINI_AGENT */ - -/* this is the location of the net-snmp mib tree. It shouldn't be - changed, as the places it is used are expected to be constant - values or are directly tied to the UCD-SNMP-MIB. */ -#define NETSNMP_OID 8072 -#define NETSNMP_MIB 1,3,6,1,4,1,8072 -#define NETSNMP_DOT_MIB 1.3.6.1.4.1.8072 -#define NETSNMP_DOT_MIB_LENGTH 7 - -/* pattern for temporary file names */ -#define NETSNMP_TEMP_FILE_PATTERN "/tmp/snmpdXXXXXX" - -/* - * this must be before the system/machine includes, to allow them to - * override and turn off inlining. To do so, they should do the - * following: - * - * #undef NETSNMP_ENABLE_INLINE - * #define NETSNMP_ENABLE_INLINE 0 - * - * A user having problems with their compiler can also turn off - * the use of inline by defining NETSNMP_NO_INLINE via their cflags: - * - * -DNETSNMP_NO_INLINE - * - * Header and source files should only test against NETSNMP_USE_INLINE: - * - * #ifdef NETSNMP_USE_INLINE - * NETSNMP_INLINE function(int parm) { return parm -1; } - * #endif - * - * Functions which should be static, regardless of whether or not inline - * is available or enabled should use the NETSNMP_STATIC_INLINE macro, - * like so: - * - * NETSNMP_STATIC_INLINE function(int parm) { return parm -1; } - * - * NOT like this: - * - * static NETSNMP_INLINE function(int parm) { return parm -1; } - * - */ -#ifdef NETSNMP_BROKEN_INLINE -# define NETSNMP_ENABLE_INLINE 0 -#else -# define NETSNMP_ENABLE_INLINE 1 -#endif - -#include NETSNMP_SYSTEM_INCLUDE_FILE -#include NETSNMP_MACHINE_INCLUDE_FILE - -#if NETSNMP_ENABLE_INLINE && !defined(NETSNMP_NO_INLINE) -# define NETSNMP_USE_INLINE 1 -# ifndef NETSNMP_INLINE -# define NETSNMP_INLINE inline -# endif -# ifndef NETSNMP_STATIC_INLINE -# define NETSNMP_STATIC_INLINE static inline -# endif -#else -# define NETSNMP_INLINE -# define NETSNMP_STATIC_INLINE static -#endif - -#ifndef NETSNMP_IMPORT -# define NETSNMP_IMPORT extern -#endif - -/* comment the next line if you are compiling with libsnmp.h - and are not using the UC-Davis SNMP library. */ -#define UCD_SNMP_LIBRARY 1 - -/* final conclusion on nlist usage */ -#if defined(HAVE_NLIST) && defined(HAVE_STRUCT_NLIST_N_VALUE) && !defined(NETSNMP_DONT_USE_NLIST) && defined(HAVE_KMEM) && !defined(NETSNMP_NO_KMEM_USAGE) -#define NETSNMP_CAN_USE_NLIST -#endif - - -/* ********* NETSNMP_MARK_BEGIN_LEGACY_DEFINITIONS *********/ -/* - * existing definitions prior to Net-SNMP 5.4 - * - * do not add anything new here - * - */ - -#ifndef NETSNMP_NO_LEGACY_DEFINITIONS - -#ifdef NETSNMP_DEFAULT_SNMP_VERSION -# define DEFAULT_SNMP_VERSION NETSNMP_DEFAULT_SNMP_VERSION -#endif - -#ifdef NETSNMP_SNMPV1 -# define SNMPV1 NETSNMP_SNMPV1 -#endif - -#ifdef NETSNMP_SNMPV2ANY -# define SNMPV2ANY NETSNMP_SNMPV2ANY -#endif - -#ifdef NETSNMP_SNMPV2AUTH -# define SNMPV2AUTH NETSNMP_SNMPV2AUTH -#endif - -#ifdef NETSNMP_DEFAULT_MIBS -# define DEFAULT_MIBS NETSNMP_DEFAULT_MIBS -#endif - -#ifdef NETSNMP_DEFAULT_MIBDIRS -# define DEFAULT_MIBDIRS NETSNMP_DEFAULT_MIBDIRS -#endif - -#ifdef NETSNMP_DEFAULT_MIBFILES -# define DEFAULT_MIBFILES NETSNMP_DEFAULT_MIBFILES -#endif - -#ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES -# define OPAQUE_SPECIAL_TYPES NETSNMP_WITH_OPAQUE_SPECIAL_TYPES -#endif - -#ifdef NETSNMP_ENABLE_SCAPI_AUTHPRIV -# define SCAPI_AUTHPRIV NETSNMP_ENABLE_SCAPI_AUTHPRIV -#endif - -#ifdef NETSNMP_USE_INTERNAL_MD5 -# define USE_INTERNAL_MD5 NETSNMP_USE_INTERNAL_MD5 -#endif - -#ifdef NETSNMP_USE_PKCS11 -# define USE_PKCS NETSNMP_USE_PKCS11 -#endif - -#ifdef NETSNMP_USE_OPENSSL -# define USE_OPENSSL NETSNMP_USE_OPENSSL -#endif - -#ifdef NETSNMP_NO_DEBUGGING -# define SNMP_NO_DEBUGGING NETSNMP_NO_DEBUGGING -#endif - -#ifdef NETSNMP_ALWAYS_DEBUG -# define SNMP_ALWAYS_DEBUG NETSNMP_ALWAYS_DEBUG -#endif - -#ifdef NETSNMP_USE_REVERSE_ASNENCODING -# define USE_REVERSE_ASNENCODING NETSNMP_USE_REVERSE_ASNENCODING -#endif -#ifdef NETSNMP_DEFAULT_ASNENCODING_DIRECTION -# define DEFAULT_ASNENCODING_DIRECTION NETSNMP_DEFAULT_ASNENCODING_DIRECTION -#endif - -#define PERSISTENT_DIRECTORY NETSNMP_PERSISTENT_DIRECTORY -#define PERSISTENT_MASK NETSNMP_PERSISTENT_MASK -#define AGENT_DIRECTORY_MODE NETSNMP_AGENT_DIRECTORY_MODE -#define MAX_PERSISTENT_BACKUPS NETSNMP_MAX_PERSISTENT_BACKUPS -#define SYSTEM_INCLUDE_FILE NETSNMP_SYSTEM_INCLUDE_FILE -#define MACHINE_INCLUDE_FILE NETSNMP_MACHINE_INCLUDE_FILE - -#ifdef NETSNMP_DEFAULT_SERVER_SEND_BUF -# define DEFAULT_SERVER_SEND_BUF NETSNMP_DEFAULT_SERVER_SEND_BUF -#endif -#ifdef NETSNMP_DEFAULT_SERVER_RECV_BUF -# define DEFAULT_SERVER_RECV_BUF NETSNMP_DEFAULT_SERVER_RECV_BUF -#endif -#ifdef NETSNMP_DEFAULT_CLIENT_SEND_BUF -# define DEFAULT_CLIENT_SEND_BUF NETSNMP_DEFAULT_CLIENT_SEND_BUF -#endif -#ifdef NETSNMP_DEFAULT_CLIENT_RECV_BUF -# define DEFAULT_CLIENT_RECV_BUF NETSNMP_DEFAULT_CLIENT_RECV_BUF -#endif - -#ifdef NETSNMP_LOGFILE -# define LOGFILE NETSNMP_LOGFILE -#endif - -#ifdef NETSNMP_SYS_CONTACT -# define SYS_CONTACT NETSNMP_SYS_CONTACT -#endif - -#ifdef NETSNMP_SYS_LOC -# define SYS_LOC NETSNMP_SYS_LOC -#endif - -#ifdef NETSNMP_USE_LIBWRAP -# define USE_LIBWRAP NETSNMP_USE_LIBWRAP -#endif - -#ifdef NETSNMP_ENABLE_TESTING_CODE -# define SNMP_TESTING_CODE NETSNMP_ENABLE_TESTING_CODE -#endif - -#ifdef NETSNMP_NO_ROOT_ACCESS -# define NO_ROOT_ACCESS NETSNMP_NO_ROOT_ACCESS -#endif - -#ifdef NETSNMP_NO_KMEM_USAGE -# define NO_KMEM_USAGE NETSNMP_NO_KMEM_USAGE -#endif - -#ifdef NETSNMP_NO_DUMMY_VALUES -# define NO_DUMMY_VALUES NETSNMP_NO_DUMMY_VALUES -#endif - -#define VERS_DESC NETSNMP_VERS_DESC -#define SYS_NAME NETSNMP_SYS_NAME - -#define PROCMIBNUM NETSNMP_PROCMIBNUM -#define SHELLMIBNUM NETSNMP_SHELLMIBNUM -#define MEMMIBNUM NETSNMP_MEMMIBNUM -#define DISKMIBNUM NETSNMP_DISKMIBNUM - -#define LOADAVEMIBNUM NETSNMP_LOADAVEMIBNUM -#define VERSIONMIBNUM NETSNMP_VERSIONMIBNUM -#define ERRORMIBNUM NETSNMP_ERRORMIBNUM -#define AGENTID NETSNMP_AGENTID - -#define HPUX9ID NETSNMP_HPUX9ID -#define SUNOS4ID NETSNMP_SUNOS4ID -#define SOLARISID NETSNMP_SOLARISID -#define OSFID NETSNMP_OSFID -#define ULTRIXID NETSNMP_ULTRIXID -#define HPUX10ID NETSNMP_HPUX10ID -#define NETBSD1ID NETSNMP_NETBSD1ID -#define FREEBSDID NETSNMP_FREEBSDID -#define IRIXID NETSNMP_IRIXID -#define LINUXID NETSNMP_LINUXID -#define BSDIID NETSNMP_BSDIID -#define OPENBSDID NETSNMP_OPENBSDID -#define WIN32ID NETSNMP_WIN32ID -#define HPUX11ID NETSNMP_HPUX11ID -#define AIXID NETSNMP_AIXID -#define MACOSXID NETSNMP_MACOSXID -#define UNKNOWNID NETSNMP_UNKNOWNID - -#define ENTERPRISE_OID NETSNMP_ENTERPRISE_OID -#define ENTERPRISE_MIB NETSNMP_ENTERPRISE_MIB -#define ENTERPRISE_DOT_MIB NETSNMP_ENTERPRISE_DOT_MIB -#define ENTERPRISE_DOT_MIB_LENGTH NETSNMP_ENTERPRISE_DOT_MIB_LENGTH - -#define SYSTEM_MIB NETSNMP_SYSTEM_MIB -#define SYSTEM_DOT_MIB NETSNMP_SYSTEM_DOT_MIB -#define SYSTEM_DOT_MIB_LENGTH NETSNMP_SYSTEM_DOT_MIB_LENGTH - -#define NOTIFICATION_MIB NETSNMP_NOTIFICATION_MIB -#define NOTIFICATION_DOT_MIB NETSNMP_NOTIFICATION_DOT_MIB -#define NOTIFICATION_DOT_MIB_LENGTH NETSNMP_NOTIFICATION_DOT_MIB_LENGTH - -#define UCDAVIS_OID NETSNMP_UCDAVIS_OID -#define UCDAVIS_MIB NETSNMP_UCDAVIS_MIB -#define UCDAVIS_DOT_MIB NETSNMP_UCDAVIS_DOT_MIB -#define UCDAVIS_DOT_MIB_LENGTH NETSNMP_UCDAVIS_DOT_MIB_LENGTH - -#define ERRORTIMELENGTH NETSNMP_ERRORTIMELENGTH - -#ifdef NETSNMP_PROCFIXCMD -# define PROCFIXCMD NETSNMP_PROCFIXCMD -#endif - -#ifdef NETSNMP_EXECFIXCMD -# define EXECFIXCMD NETSNMP_EXECFIXCMD -#endif - -#define EXCACHETIME NETSNMP_EXCACHETIME -#define CACHEFILE NETSNMP_CACHEFILE -#define MAXCACHESIZE NETSNMP_MAXCACHESIZE - -#define DEFDISKMINIMUMSPACE NETSNMP_DEFDISKMINIMUMSPACE -#define DEFMAXLOADAVE NETSNMP_DEFMAXLOADAVE -#define MAXREADCOUNT NETSNMP_MAXREADCOUNT - -#define SNMPBLOCK NETSNMP_SNMPBLOCK -#define RESTARTSLEEP NETSNMP_RESTARTSLEEP - -#define NUM_COMMUNITIES NETSNMP_NUM_COMMUNITIES - -#ifdef NETSNMP_NO_ZEROLENGTH_COMMUNITY -# define NO_ZEROLENGTH_COMMUNITY NETSNMP_NO_ZEROLENGTH_COMMUNITY -#endif - -#define LASTFIELD NETSNMP_LASTFIELD - -#define CONFIGURE_OPTIONS NETSNMP_CONFIGURE_OPTIONS - -#ifdef NETSNMP_TRANSPORT_UDP_DOMAIN -# define SNMP_TRANSPORT_UDP_DOMAIN NETSNMP_TRANSPORT_UDP_DOMAIN -#endif - -#ifdef NETSNMP_TRANSPORT_CALLBACK_DOMAIN -# define SNMP_TRANSPORT_CALLBACK_DOMAIN NETSNMP_TRANSPORT_CALLBACK_DOMAIN -#endif - -#ifdef NETSNMP_TRANSPORT_TCP_DOMAIN -# define SNMP_TRANSPORT_TCP_DOMAIN NETSNMP_TRANSPORT_TCP_DOMAIN -#endif - -#ifdef NETSNMP_TRANSPORT_UNIX_DOMAIN -# define SNMP_TRANSPORT_UNIX_DOMAIN NETSNMP_TRANSPORT_UNIX_DOMAIN -#endif - -#ifdef NETSNMP_TRANSPORT_AAL5PVC_DOMAIN -# define SNMP_TRANSPORT_AAL5PVC_DOMAIN NETSNMP_TRANSPORT_AAL5PVC_DOMAIN -#endif - -#ifdef NETSNMP_TRANSPORT_IPX_DOMAIN -# define SNMP_TRANSPORT_IPX_DOMAIN NETSNMP_TRANSPORT_IPX_DOMAIN -#endif - -#ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN -# define SNMP_TRANSPORT_UDPIPV6_DOMAIN NETSNMP_TRANSPORT_UDPIPV6_DOMAIN -#endif - -#ifdef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN -# define SNMP_TRANSPORT_TCPIPV6_DOMAIN NETSNMP_TRANSPORT_TCPIPV6_DOMAIN -#endif - -#ifdef NETSNMP_TRANSPORT_TLS_DOMAIN -# define SNMP_TRANSPORT_TLS_DOMAIN NETSNMP_TRANSPORT_TLS_DOMAIN -#endif - -#ifdef NETSNMP_TRANSPORT_STD_DOMAIN -# define SNMP_TRANSPORT_STD_DOMAIN NETSNMP_TRANSPORT_STD_DOMAIN -#endif - -#ifdef NETSNMP_SECMOD_USM -# define SNMP_SECMOD_USM NETSNMP_SECMOD_USM -#endif - -#ifdef NETSNMP_SECMOD_KSM -# define SNMP_SECMOD_KSM NETSNMP_SECMOD_KSM -#endif - -#ifdef NETSNMP_SECMOD_LOCALSM -# define SNMP_SECMOD_LOCALSM NETSNMP_SECMOD_LOCALSM -#endif - -#ifdef NETSNMP_REENTRANT -# define NS_REENTRANT NETSNMP_REENTRANT -#endif - -#ifdef NETSNMP_ENABLE_IPV6 -# define INET6 NETSNMP_ENABLE_IPV6 -#endif - -#ifdef NETSNMP_ENABLE_LOCAL_SMUX -# define LOCAL_SMUX NETSNMP_ENABLE_LOCAL_SMUX -#endif - -#ifdef NETSNMP_AGENTX_DOM_SOCK_ONLY -# define AGENTX_DOM_SOCK_ONLY NETSNMP_AGENTX_DOM_SOCK_ONLY -#endif - -#ifdef NETSNMP_SNMPTRAPD_DISABLE_AGENTX -# define SNMPTRAPD_DISABLE_AGENTX -#endif - -#ifdef NETSNMP_USE_KERBEROS_MIT -# define MIT_NEW_CRYPTO NETSNMP_USE_KERBEROS_MIT -#endif - -#ifdef NETSNMP_USE_KERBEROS_HEIMDAL -# define HEIMDAL NETSNMP_USE_KERBEROS_HEIMDAL -#endif - -#ifdef NETSNMP_AGENTX_SOCKET -# define AGENTX_SOCKET NETSNMP_AGENTX_SOCKET -#endif - -#ifdef NETSNMP_DISABLE_MIB_LOADING -# define DISABLE_MIB_LOADING NETSNMP_DISABLE_MIB_LOADING -#endif - -#ifdef NETSNMP_DISABLE_SNMPV1 -# define DISABLE_SNMPV1 NETSNMP_DISABLE_SNMPV1 -#endif - -#ifdef NETSNMP_DISABLE_SNMPV2C -# define DISABLE_SNMPV2C NETSNMP_DISABLE_SNMPV2C -#endif - -#ifdef NETSNMP_DISABLE_SET_SUPPORT -# define DISABLE_SET_SUPPORT NETSNMP_DISABLE_SET_SUPPORT -#endif - -#ifdef NETSNMP_DISABLE_DES -# define DISABLE_DES NETSNMP_DISABLE_DES -#endif - -#ifdef NETSNMP_DISABLE_MD5 -# define DISABLE_MD5 NETSNMP_DISABLE_MD5 -#endif - -#ifdef NETSNMP_DONT_USE_NLIST -# define DONT_USE_NLIST NETSNMP_DONT_USE_NLIST -#endif - -#ifdef NETSNMP_CAN_USE_NLIST -# define CAN_USE_NLIST NETSNMP_CAN_USE_NLIST -#endif - -#ifdef NETSNMP_CAN_USE_SYSCTL -# define CAN_USE_SYSCTL NETSNMP_CAN_USE_SYSCTL -#endif - -#endif /* NETSNMP_NO_LEGACY_DEFINITIONS */ - - -#endif /* NET_SNMP_CONFIG_H */ diff --git a/net-snmp/net-snmp-5.7.3/net-snmp-config b/net-snmp/net-snmp-5.7.3/net-snmp-config deleted file mode 100755 index f8b483735..000000000 --- a/net-snmp/net-snmp-5.7.3/net-snmp-config +++ /dev/null @@ -1,700 +0,0 @@ -#!/bin/sh -# -# $Id$ -# -# this shell script is designed to merely dump the configuration -# information about how the net-snmp package was compiled. The -# information is particularly useful for applications that need to -# link against the net-snmp libraries and hence must know about any -# other libraries that must be linked in as well. - -check_build_dir() -{ - build_dir=$1 - - if test "x$build_dir" = "x" ; then - echo "You must specify a build directory." - exit 1 - fi - # is it the src dir? - if test -f $build_dir/net-snmp-config.in ; then - return - fi - # make sure we can find build dir - if test ! -d $build_dir/snmplib/.libs ; then - echo "$build_dir does not appear to be a build directory." - exit 1 - fi -} - -# usage: index n arguments -# effect: returns the (n+1)th argument -index() -{ - eval echo \$`expr $1 + 1` -} - -# usage: count arguments -# effect: returns the number of arguments -count() -{ - echo $# -} - -prefix=/usr/local/mariadb/columnstore -exec_prefix=${prefix} -includedir=${prefix}/include -libdir=${exec_prefix}/lib -datarootdir=${prefix}/share -NSC_LDFLAGS="-Wl,-rpath -Wl,/usr/local/mariadb/columnstore/lib" - -NSC_LIBS="-lm " -NSC_LNETSNMPLIBS="" -NSC_LAGENTLIBS=" " -NSC_LMIBLIBS="-ldl " - -NSC_INCLUDEDIR=${includedir} -NSC_LIBDIR=-L${libdir} - -NSC_SNMPLIBS="-lnetsnmp ${NSC_LNETSNMPLIBS}" -NSC_SUBAGENTLIBS="-lnetsnmpagent ${NSC_LAGENTLIBS} ${NSC_SNMPLIBS}" -NSC_AGENTLIBS="-lnetsnmpmibs ${NSC_LMIBLIBS} ${NSC_SUBAGENTLIBS}" - -NSC_PREFIX=$prefix -NSC_EXEC_PREFIX=$exec_prefix -NSC_SRCDIR=. -NSC_INCDIR=${NSC_PREFIX}/include - -NSC_BASE_SNMP_LIBS="-lnetsnmp" -NSC_BASE_SUBAGENT_LIBS="-lnetsnmpagent ${NSC_BASE_SNMP_LIBS}" -NSC_BASE_AGENT_LIBS="-lnetsnmpmibs ${NSC_BASE_SUBAGENT_LIBS}" - -NSC_SRC_LIBDIRS="agent/.libs snmplib/.libs" -NSC_SRC_LIBDEPS="agent/.libs/libnetsnmpmibs.a agent/.libs/libnetsnmpagent.a snmplib/.libs/libnetsnmp.a" - -if test "x$NSC_SRCDIR" = "x." ; then - NSC_SRCDIR="NET-SNMP-SOURCE-DIR" -fi - -if test "x$1" = "x"; then - usage="yes" -else - while test "x$done" = "x" -a "x$1" != "x" -a "x$usage" != "xyes"; do - case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - unset shifted - case $1 in - --prefix=*) - prefix=$optarg - NSC_PREFIX=${prefix} - NSC_INCLUDEDIR=${prefix}/include - NSC_LIBDIR=-L${prefix}/lib - ;; - - --exec-prefix=*) - exec_prefix=$optarg - NSC_EXEC_PREFIX=${exec_prefix} - NSC_LIBDIR=-L${exec_prefix}/lib - ;; - - --debug-tokens|--deb*|--dbg*) - echo "find $NSC_SRCDIR -name \"*.c\" -print | xargs grep DEBUGMSGT | grep \\\" | cut -f 2 -d\\\" | sort -u" - if test "x$NSC_SRCDIR" != "xNET-SNMP-SOURCE-DIR" ; then - /usr/bin/find $NSC_SRCDIR -name "*.c" -print | xargs grep DEBUGMSGT | grep \" | cut -f 2 -d\" | sort -u - fi - ;; - --indent-options|--in*) - echo "indent -orig -nbc -bap -nut -nfca `(cd $NSC_INCDIR/net-snmp; perl -n -e 'print "-T $1 " if (/}\s*(netsnmp_\w+)\s*;/);' */*.h)`" - ;; - --configure-options|--con*) - echo " '--prefix=/usr/local/mariadb/columnstore' '--with-mib-modules=disman/event-mib' '--with-cc=gcc' '--with-logfile=/var/log/snmpd.log' '--with-sys-location=Unknown' '--with-sys-contact=root@localhost.localdomain' '--with-default-snmp-version=3' '--with-persistent-directory=/var/net-snmp' '--without-openssl' '--with-ldflags=-Wl,-rpath -Wl,/usr/local/mariadb/columnstore/lib'" - ;; - --snmpd-module-list|--mod*) -echo snmpv3/snmpMPDStats_5_5 snmpv3/usmStats_5_5 snmpv3/snmpEngine snmpv3/usmConf snmpv3/usmUser mibII/snmp_mib_5_5 mibII/system_mib mibII/sysORTable mibII/vacm_vars mibII/setSerialNo mibII/at mibII/ip mibII/tcp mibII/icmp mibII/udp ucd-snmp/disk_hw ucd-snmp/proc ucd-snmp/versioninfo ucd-snmp/pass ucd-snmp/pass_persist ucd-snmp/loadave agent/extend ucd-snmp/errormib ucd-snmp/file ucd-snmp/dlmod ucd-snmp/proxy ucd-snmp/logmatch ucd-snmp/memory ucd-snmp/vmstat notification/snmpNotifyTable notification/snmpNotifyFilterProfileTable notification-log-mib/notification_log target/target_counters_5_5 target/snmpTargetAddrEntry target/snmpTargetParamsEntry target/target agent/nsTransactionTable agent/nsModuleTable agent/nsDebug agent/nsCache agent/nsLogging agent/nsVacmAccessTable agentx/master agentx/subagent disman/event/mteScalars disman/event/mteTrigger disman/event/mteTriggerTable disman/event/mteTriggerDeltaTable disman/event/mteTriggerExistenceTable disman/event/mteTriggerBooleanTable disman/event/mteTriggerThresholdTable disman/event/mteTriggerConf disman/event/mteEvent disman/event/mteEventTable disman/event/mteEventSetTable disman/event/mteEventNotificationTable disman/event/mteEventConf disman/event/mteObjects disman/event/mteObjectsTable disman/event/mteObjectsConf disman/schedule/schedCore disman/schedule/schedConf disman/schedule/schedTable utilities/override utilities/execute utilities/iquery host/hrh_storage host/hrh_filesys host/hrSWInstalledTable host/hrSWRunTable host/hr_system host/hr_device host/hr_other host/hr_proc host/hr_network host/hr_print host/hr_disk host/hr_partition util_funcs/header_generic mibII/updates util_funcs mibII/vacm_context mibII/vacm_conf mibII/kernel_linux mibII/ipAddr mibII/var_route mibII/route_write mibII/tcpTable mibII/udpTable ip-mib/ip_scalars util_funcs/header_simple_table util_funcs/restart ucd-snmp/pass_common header_complex snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable agentx/protocol agentx/client agentx/master_admin agentx/agentx_config host/data_access/swinst host/data_access/swrun host/hrSWRunPerfTable if-mib/ifTable/ifTable if-mib/ifXTable/ifXTable ip-mib/ipAddressTable/ipAddressTable ip-mib/ipAddressPrefixTable/ipAddressPrefixTable ip-mib/ipDefaultRouterTable/ipDefaultRouterTable ip-mib/inetNetToMediaTable/inetNetToMediaTable ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access ip-mib/ipSystemStatsTable/ipSystemStatsTable ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable ip-mib/ipIfStatsTable/ipIfStatsTable ip-mib/ipIfStatsTable/ipIfStatsTable_interface ip-mib/ipIfStatsTable/ipIfStatsTable_data_access ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable tcp-mib/tcpConnectionTable/tcpConnectionTable tcp-mib/tcpListenerTable/tcpListenerTable udp-mib/udpEndpointTable/udpEndpointTable hardware/fsys/hw_fsys hardware/fsys/fsys_mntent hardware/memory/hw_mem hardware/memory/memory_linux hardware/cpu/cpu hardware/cpu/cpu_linux snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access host/data_access/swinst_pkginfo host/data_access/swrun_procfs_status if-mib/data_access/interface if-mib/ifTable/ifTable_interface if-mib/ifTable/ifTable_data_access if-mib/ifXTable/ifXTable_interface if-mib/ifXTable/ifXTable_data_access ip-mib/ipAddressTable/ipAddressTable_interface ip-mib/ipAddressTable/ipAddressTable_data_access ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get ip-mib/data_access/arp_common ip-mib/data_access/arp_netlink ip-mib/data_access/systemstats_common ip-mib/data_access/systemstats_linux ip-mib/data_access/scalars_linux ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access ip-mib/ipIfStatsTable/ipIfStatsTable_data_get ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access tcp-mib/data_access/tcpConn_common tcp-mib/data_access/tcpConn_linux util_funcs/get_pid_from_inode tcp-mib/tcpConnectionTable/tcpConnectionTable_interface tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access tcp-mib/tcpListenerTable/tcpListenerTable_interface tcp-mib/tcpListenerTable/tcpListenerTable_data_access udp-mib/udpEndpointTable/udpEndpointTable_interface udp-mib/udpEndpointTable/udpEndpointTable_data_access if-mib/data_access/interface_linux if-mib/data_access/interface_ioctl ip-mib/data_access/ipaddress_common ip-mib/data_access/ipaddress_linux ip-mib/data_access/defaultrouter_common ip-mib/data_access/defaultrouter_linux ip-mib/data_access/ipv6scopezone_common ip-mib/data_access/ipv6scopezone_linux ip-forward-mib/data_access/route_common ip-forward-mib/data_access/route_linux ip-forward-mib/data_access/route_ioctl udp-mib/data_access/udp_endpoint_common udp-mib/data_access/udp_endpoint_linux ip-mib/data_access/ipaddress_ioctl - ;; - --default-mibs|--mibs|--MIBS) - echo :SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB:HOST-RESOURCES-MIB:NOTIFICATION-LOG-MIB:DISMAN-EVENT-MIB:DISMAN-SCHEDULE-MIB:UCD-SNMP-MIB:UCD-DEMO-MIB:SNMP-TARGET-MIB:NET-SNMP-AGENT-MIB:HOST-RESOURCES-TYPES:SNMP-MPD-MIB:SNMP-USER-BASED-SM-MIB:SNMP-FRAMEWORK-MIB:SNMP-VIEW-BASED-ACM-MIB:SNMP-COMMUNITY-MIB:IP-FORWARD-MIB:NET-SNMP-PASS-MIB:NET-SNMP-EXTEND-MIB:UCD-DLMOD-MIB:SNMP-NOTIFICATION-MIB:SNMPv2-TM:NET-SNMP-VACM-MIB - ;; - --default-mibdirs|--mibdirs|--MIBDIRS) - echo $HOME/.snmp/mibs:/usr/local/mariadb/columnstore/share/snmp/mibs - ;; - --env-separator) - echo ":" - ;; - --exeext) - echo "" - ;; - --snmpconfpath|--SNMPCONFPATH) - echo "/usr/local/mariadb/columnstore/etc/snmp:/usr/local/mariadb/columnstore/share/snmp:/usr/local/mariadb/columnstore/lib/snmp:$HOME/.snmp:/var/net-snmp" - ;; - --persistent-directory|--persistent-dir) - echo /var/net-snmp - ;; - --perlprog|--perl) - echo /usr/bin/perl - ;; - #################################################### compile - --base-cflags) - echo -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -I${NSC_INCLUDEDIR} - ;; - --cflags|--cf*) - echo -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -I. -I${NSC_INCLUDEDIR} - ;; - --srcdir) - echo $NSC_SRCDIR - ;; - #################################################### linking - --libdir|--lib-dir) - echo $NSC_LIBDIR - ;; - --ldflags|--ld*) - echo $NSC_LDFLAGS - ;; - --build-lib-dirs) - shift - build_dir=$1 - check_build_dir $build_dir - for dir in $NSC_SRC_LIBDIRS; do - result="$result -L$build_dir/$dir" - done - echo $result - ;; - --build-lib-deps) - shift - build_dir=$1 - check_build_dir $build_dir - for dir in $NSC_SRC_LIBDEPS; do - result="$result $build_dir/$dir" - done - echo $result - ;; - --build-includes) - shift - build_dir=$1 - check_build_dir $build_dir - result="-I$build_dir/include" - if test "$build_dir" != "$NSC_SRCDIR" -a "$NSC_SRCDIR" != "NET-SNMP-SOURCE-DIR" - then - result="$result -I$NSC_SRCDIR/include" - fi - echo $result - ;; - --build-command) - echo "gcc -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux " - ;; - #################################################### client lib - --libs) - # use this one == --netsnmp-libs + --external-libs - echo $NSC_LDFLAGS $NSC_LIBDIR $NSC_SNMPLIBS $NSC_LIBS - ;; - --netsnmp-libs) - echo $NSC_LIBDIR $NSC_BASE_SNMP_LIBS - ;; - --external-libs) - echo $NSC_LDFLAGS $NSC_LNETSNMPLIBS $NSC_LIBS - ;; - #################################################### agent lib - --base-agent-libs) - echo $NSC_BASE_AGENT_LIBS - ;; - --base-subagent-libs) - echo $NSC_BASE_SUBAGENT_LIBS - ;; - --agent-libs) - # use this one == --netsnmp-agent-libs + --external-libs - echo $NSC_LDFLAGS $NSC_LIBDIR $NSC_AGENTLIBS $NSC_LIBS - ;; - --netsnmp-agent-libs) - echo $NSC_LIBDIR $NSC_BASE_AGENT_LIBS - ;; - --external-agent-libs) - echo $NSC_LDFLAGS $NSC_LMIBLIBS $NSC_LAGENTLIBS $NSC_LNETSNMPLIBS $NSC_LIBS - ;; - #################################################### - --version|--ver*) - echo 5.7.3 - ;; - --help) - usage="yes" - ;; - --prefix|--pre*) - echo $NSC_PREFIX - ;; - --exec-prefix) - echo $NSC_EXEC_PREFIX - ;; - #################################################### - --create-snmpv3-user) - done=1 - shift - net-snmp-create-v3-user $* - exit $? - ;; - - #################################################### - --compile-subagent) - shift - shifted=1 - while test "x$done" = "x" -a "x$1" != "x" ; do - case $1 in - --norm) - norm=1 - shift - ;; - --cflags) - shift - if test "x$1" = "x" ; then - echo "You must specify the extra cflags" - exit 1 - fi - cflags=$1 - echo "setting extra cflags: $cflags" - shift - ;; - --ldflags) - shift - if test "x$1" = "x" ; then - echo "You must specify the extra ldflags" - exit 1 - fi - ldflags=$1 - echo "setting extra ldflags: $ldflags" - shift - ;; - --*) - echo "unknown suboption to --compile-subagent: $1" - exit 1 - ;; - *) - if test "x$outname" = "x"; then - outname=$1 - shift - else - done=1 - fi - ;; - esac - done - tmpfile=netsnmptmp.$$.c - if test -f $tmpfile; then - echo "Ack. Can't create $tmpfile: already exists" - exit 1 - fi - echo "generating the temporary code file: $tmpfile" - rm -f $tmpfile - cat > $tmpfile < -#ifdef HAVE_SIGNAL -#include -#endif /* HAVE_SIGNAL */ -#include -#include -EOF - - # If we were only given a single filename - # (and no explicit output name) - # then use that as the base of the output name - # - # If we weren't even given that, then bomb out - if test "x$1" = "x"; then - if test "x$outname" = "x"; then - echo "No MIB module codefile specified" - rm -f $tmpfile - exit 1 - else - cfiles=$outname - outname=`basename $cfiles | sed 's/\.[co]$//'` - if test -f $outname.h; then - if grep "init_$outname" $outname.h; then - echo " #include \"$outname.h\"" >> $tmpfile - fi - fi - fi - fi - - # add include files - while test "$1" != ""; do - cfiles="$cfiles $1" - name=`basename $1 | sed 's/\.[co]$//'` - if test -f $name.h; then - if grep "init_$name" $name.h; then - echo " #include \"$name.h\"" >> $tmpfile - fi - fi - shift - done - - cat >> $tmpfile <> $tmpfile - fi - done - - # handle the main loop - cat >> $tmpfile <> $tmpfile - fi - i=`expr $i - 1` - done - - # finish file - cat >> $tmpfile < /dev/null 2>&1 ; then - echo "Apparently at least one snmpd demon is already running." - echo "You must stop them in order to use this command." - exit 1 -fi - -Aalgorithm="MD5" -Xalgorithm="DES" -token=rwuser - -while test "x$done" = "x" -a "x$1" != "x" -a "x$usage" != "xyes"; do -case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; -esac - -unset shifted -case $1 in - --version|--ver*) - echo 5.7.3 - ;; - --help) - usage="yes" - ;; - - -A|-a) - shift - if test "x$1" = "x" ; then - echo "You must specify an authentication algorithm or pass phrase" - exit 1 - fi - case $1 in - MD5|SHA) - Aalgorithm=$1 - shift - ;; - md5|sha) - Aalgorithm=`echo $1 | tr a-z A-Z` - shift - ;; - *) - apassphrase=$1 - shift - ;; - esac - ;; - -X|-x) - shift - if test "x$1" = "x" ; then - echo "You must specify an encryption algorithm or pass phrase" - exit 1 - fi - case $1 in - DES|AES|AES128) - Xalgorithm=$1 - shift - ;; - des|aes|aes128) - Xalgorithm=`echo $1 | tr a-z A-Z` - shift - ;; - *) - xpassphrase=$1 - shift - ;; - esac - ;; - -ro) - token="rouser" - shift - ;; - -*) - echo "unknown suboption to $0: $1" - usage=yes - done=1 - ;; - *) - done=1 - ;; - esac -done - -if test "x$usage" = "xyes"; then - echo "" - echo "Usage:" - echo " net-snmp-create-v3-user [-ro] [-A authpass] [-X privpass]" - echo " [-a MD5|SHA] [-x DES|AES] [username]" - echo "" - exit -fi - -if test "x$1" = "x" ; then - prompt=yes - echo "Enter a SNMPv3 user name to create: " - read user -else - user=$1 - shift -fi -if test "x$user" = "x" ; then - echo "You must specify a user name" - exit 1 -fi -if test "x$apassphrase" = "x" ; then - prompt=yes - echo "Enter authentication pass-phrase: " - read apassphrase -fi -if test "x$apassphrase" = "x" ; then - echo "You must specify an authentication pass-phrase" - exit 1 -fi - if test "x$prompt" = "xyes" -a "x$xpassphrase" = "x" ; then - echo "Enter encryption pass-phrase: " - echo " [press return to reuse the authentication pass-phrase]" - read xpassphrase -fi -outdir="/var/net-snmp" -outfile="$outdir/snmpd.conf" -line="createUser $user $Aalgorithm \"$apassphrase\" $Xalgorithm $xpassphrase" -echo "adding the following line to $outfile:" -echo " " $line -# in case it hasn't ever been started yet, start it. -if test ! -d $outdir ; then - mkdir $outdir -fi -if test ! -d $outfile ; then - touch $outfile -fi -echo $line >> $outfile -outfile="${datarootdir}/snmp/snmpd.conf" -line="$token $user" -echo "adding the following line to $outfile:" -echo " " $line -if test ! -d $outfile ; then - touch $outfile -fi -echo $line >> $outfile diff --git a/oamapps/Makefile.am b/oamapps/Makefile.am index d7670f180..956ae99ef 100644 --- a/oamapps/Makefile.am +++ b/oamapps/Makefile.am @@ -17,7 +17,7 @@ # $Id: Makefile.am 878 2009-04-03 20:34:32Z rdempsey $ # -.PHONY install +#.PHONY: install SUBDIRS = mcsadmin columnstoreDB postConfigure serverMonitor traphandler \ sendtrap columnstoreSupport @@ -30,9 +30,7 @@ leakcheck: docs: -install: - for subdir in $(SUBDIRS); \ - do $(MAKE) -C $$subdir install - done - - +#install: +# for subdir in $(SUBDIRS); \ +# do $(MAKE) -C $$subdir install +# done diff --git a/oamapps/columnstoreDB/columnstoreDBWrite b/oamapps/columnstoreDB/columnstoreDBWrite deleted file mode 100755 index 5f8aff105..000000000 --- a/oamapps/columnstoreDB/columnstoreDBWrite +++ /dev/null @@ -1,228 +0,0 @@ -#! /bin/sh - -# columnstoreDBWrite - temporary wrapper script for .libs/columnstoreDBWrite -# Generated by libtool (GNU libtool) 2.4.2 -# -# The columnstoreDBWrite program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="(cd /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/oamapps/columnstoreDB; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/justin/.local/bin:/home/justin/bin; export PATH; g++ -g0 -O3 -fno-strict-aliasing -Wall -I/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/../sql -I/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/../include -I/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/../pcre -Wl,--rpath -Wl,/usr/local/lib -Wl,--no-as-needed -Wl,--add-needed -o \$progdir/\$file columnstoreDBWrite-columnstoreDB.o -L/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/net-snmp-built-libs/lib64 /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/joblist/.libs/libjoblist.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/execplan/.libs/libexecplan.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/windowfunction/.libs/libwindowfunction.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/joiner/.libs/libjoiner.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rowgroup/.libs/librowgroup.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/funcexp/.libs/libfuncexp.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/udfsdk/.libs/libudfsdk.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/dataconvert/.libs/libdataconvert.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/common/.libs/libcommon.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/compress/.libs/libcompress.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/mysqlcl_idb/.libs/libmysqlcl_idb.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querystats/.libs/libquerystats.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querytele/.libs/libquerytele.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/thrift/.libs/libthrift.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/threadpool/.libs/libthreadpool.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/versioning/BRM/.libs/libbrm.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/idbdatafile/.libs/libidbdatafile.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/cacheutils/.libs/libcacheutils.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rwlock/.libs/librwlock.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/oam/oamcpp/.libs/liboamcpp.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/snmpd/snmpmanager/.libs/libsnmpmanager.so -lnetsnmpagent -lnetsnmp -lnetsnmpmibs -lnetsnmphelpers /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/messageqcpp/.libs/libmessageqcpp.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/loggingcpp/.libs/libloggingcpp.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/configcpp/.libs/libconfigcpp.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/startup/libidbboot.a /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/boost_idb/.libs/libboost_idb.so -lxml2 -lpthread -lrt -lreadline -lncurses -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/joblist/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/execplan/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/windowfunction/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/joiner/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rowgroup/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/funcexp/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/udfsdk/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/dataconvert/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/common/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/compress/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/mysqlcl_idb/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querystats/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querytele/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/thrift/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/threadpool/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/versioning/BRM/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/idbdatafile/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/cacheutils/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rwlock/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/oam/oamcpp/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/snmpd/snmpmanager/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/messageqcpp/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/loggingcpp/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/configcpp/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/boost_idb/.libs -Wl,-rpath -Wl,/usr/local/lib)" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variables: - generated_by_libtool_version='2.4.2' - notinst_deplibs=' /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/joblist/libjoblist.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/execplan/libexecplan.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/windowfunction/libwindowfunction.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/joiner/libjoiner.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rowgroup/librowgroup.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/funcexp/libfuncexp.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/udfsdk/libudfsdk.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/dataconvert/libdataconvert.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/common/libcommon.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/compress/libcompress.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/mysqlcl_idb/libmysqlcl_idb.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querystats/libquerystats.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querytele/libquerytele.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/thrift/libthrift.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/threadpool/libthreadpool.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/versioning/BRM/libbrm.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/idbdatafile/libidbdatafile.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/cacheutils/libcacheutils.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rwlock/librwlock.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/oam/oamcpp/liboamcpp.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/snmpd/snmpmanager/libsnmpmanager.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/messageqcpp/libmessageqcpp.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/loggingcpp/libloggingcpp.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/configcpp/libconfigcpp.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/boost_idb/libboost_idb.la' -else - # When we are sourced in execute mode, $file and $ECHO are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - file="$0" - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - ECHO="printf %s\\n" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string --lt- -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's ../../libtool value, followed by no. -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=$0 - shift - for lt_opt - do - case "$lt_opt" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` - test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. - lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'` - cat "$lt_dump_D/$lt_dump_F" - exit 0 - ;; - --lt-*) - $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n "$lt_option_debug"; then - echo "columnstoreDBWrite:columnstoreDBWrite:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - $ECHO "columnstoreDBWrite:columnstoreDBWrite:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" - lt_dump_args_N=`expr $lt_dump_args_N + 1` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ - - if test -n "$lt_option_debug"; then - $ECHO "columnstoreDBWrite:columnstoreDBWrite:${LINENO}: newargv[0]: $progdir/$program" 1>&2 - func_lt_dump_args ${1+"$@"} 1>&2 - fi - exec "$progdir/$program" ${1+"$@"} - - $ECHO "$0: cannot exec $program $*" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from $@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case " $* " in - *\ --lt-*) - for lt_wr_arg - do - case $lt_wr_arg in - --lt-*) ;; - *) set x "$@" "$lt_wr_arg"; shift;; - esac - shift - done ;; - esac - func_exec_program_core ${1+"$@"} -} - - # Parse options - func_parse_lt_options "$0" ${1+"$@"} - - # Find the directory that this script lives in. - thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no - if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then - # special case for '.' - if test "$thisdir" = "."; then - thisdir=`pwd` - fi - # remove .libs from thisdir - case "$thisdir" in - *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;; - .libs ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program=lt-'columnstoreDBWrite' - progdir="$thisdir/.libs" - - if test ! -f "$progdir/$program" || - { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /usr/bin/sed 1q`; \ - test "X$file" != "X$progdir/$program"; }; then - - file="$$-$program" - - if test ! -d "$progdir"; then - mkdir "$progdir" - else - rm -f "$progdir/$file" - fi - - # relink executable if necessary - if test -n "$relink_command"; then - if relink_command_output=`eval $relink_command 2>&1`; then : - else - printf %s\n "$relink_command_output" >&2 - rm -f "$progdir/$file" - exit 1 - fi - fi - - mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || - { rm -f "$progdir/$program"; - mv -f "$progdir/$file" "$progdir/$program"; } - rm -f "$progdir/$file" - fi - - if test -f "$progdir/$program"; then - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - func_exec_program ${1+"$@"} - fi - else - # The program doesn't exist. - $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 - $ECHO "This script is just a wrapper for $program." 1>&2 - $ECHO "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff --git a/oamapps/columnstoreSupport/columnstoreSupport b/oamapps/columnstoreSupport/columnstoreSupport deleted file mode 100755 index 897f0ec0a..000000000 --- a/oamapps/columnstoreSupport/columnstoreSupport +++ /dev/null @@ -1,228 +0,0 @@ -#! /bin/sh - -# columnstoreSupport - temporary wrapper script for .libs/columnstoreSupport -# Generated by libtool (GNU libtool) 2.4.2 -# -# The columnstoreSupport program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="(cd /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/oamapps/columnstoreSupport; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/justin/.local/bin:/home/justin/bin; export PATH; g++ -g0 -O3 -fno-strict-aliasing -Wall -I/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/../sql -I/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/../include -I/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/../pcre -Wl,--rpath -Wl,/usr/local/lib -Wl,--no-as-needed -Wl,--add-needed -o \$progdir/\$file columnstoreSupport-columnstoreSupport.o -L/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/net-snmp-built-libs/lib64 /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/joblist/.libs/libjoblist.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/execplan/.libs/libexecplan.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/windowfunction/.libs/libwindowfunction.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/joiner/.libs/libjoiner.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rowgroup/.libs/librowgroup.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/funcexp/.libs/libfuncexp.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/udfsdk/.libs/libudfsdk.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/dataconvert/.libs/libdataconvert.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/common/.libs/libcommon.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/compress/.libs/libcompress.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/mysqlcl_idb/.libs/libmysqlcl_idb.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querystats/.libs/libquerystats.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querytele/.libs/libquerytele.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/thrift/.libs/libthrift.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/threadpool/.libs/libthreadpool.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/versioning/BRM/.libs/libbrm.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/idbdatafile/.libs/libidbdatafile.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/cacheutils/.libs/libcacheutils.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rwlock/.libs/librwlock.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/oam/oamcpp/.libs/liboamcpp.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/snmpd/snmpmanager/.libs/libsnmpmanager.so -lnetsnmpagent -lnetsnmp -lnetsnmpmibs -lnetsnmphelpers /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/messageqcpp/.libs/libmessageqcpp.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/loggingcpp/.libs/libloggingcpp.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/configcpp/.libs/libconfigcpp.so /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/startup/libidbboot.a /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/boost_idb/.libs/libboost_idb.so -lxml2 -lpthread -lrt -lreadline -lncurses -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/joblist/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/execplan/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/windowfunction/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/joiner/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rowgroup/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/funcexp/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/udfsdk/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/dataconvert/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/common/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/compress/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/mysqlcl_idb/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querystats/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querytele/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/thrift/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/threadpool/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/versioning/BRM/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/idbdatafile/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/cacheutils/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rwlock/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/oam/oamcpp/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/snmpd/snmpmanager/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/messageqcpp/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/loggingcpp/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/configcpp/.libs -Wl,-rpath -Wl,/home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/boost_idb/.libs -Wl,-rpath -Wl,/usr/local/lib)" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variables: - generated_by_libtool_version='2.4.2' - notinst_deplibs=' /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/joblist/libjoblist.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/execplan/libexecplan.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/windowfunction/libwindowfunction.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/joiner/libjoiner.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rowgroup/librowgroup.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/funcexp/libfuncexp.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/udfsdk/libudfsdk.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/dataconvert/libdataconvert.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/common/libcommon.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/compress/libcompress.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/mysqlcl_idb/libmysqlcl_idb.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querystats/libquerystats.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/querytele/libquerytele.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/thrift/libthrift.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/threadpool/libthreadpool.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/versioning/BRM/libbrm.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/idbdatafile/libidbdatafile.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/cacheutils/libcacheutils.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/rwlock/librwlock.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/oam/oamcpp/liboamcpp.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/snmpd/snmpmanager/libsnmpmanager.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/messageqcpp/libmessageqcpp.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/loggingcpp/libloggingcpp.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/configcpp/libconfigcpp.la /home/justin/src/mariadb-columnstore-server/mariadb-columnstore-engine/utils/boost_idb/libboost_idb.la' -else - # When we are sourced in execute mode, $file and $ECHO are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - file="$0" - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - ECHO="printf %s\\n" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string --lt- -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's ../../libtool value, followed by no. -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=$0 - shift - for lt_opt - do - case "$lt_opt" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` - test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. - lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'` - cat "$lt_dump_D/$lt_dump_F" - exit 0 - ;; - --lt-*) - $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n "$lt_option_debug"; then - echo "columnstoreSupport:columnstoreSupport:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - $ECHO "columnstoreSupport:columnstoreSupport:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" - lt_dump_args_N=`expr $lt_dump_args_N + 1` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ - - if test -n "$lt_option_debug"; then - $ECHO "columnstoreSupport:columnstoreSupport:${LINENO}: newargv[0]: $progdir/$program" 1>&2 - func_lt_dump_args ${1+"$@"} 1>&2 - fi - exec "$progdir/$program" ${1+"$@"} - - $ECHO "$0: cannot exec $program $*" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from $@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case " $* " in - *\ --lt-*) - for lt_wr_arg - do - case $lt_wr_arg in - --lt-*) ;; - *) set x "$@" "$lt_wr_arg"; shift;; - esac - shift - done ;; - esac - func_exec_program_core ${1+"$@"} -} - - # Parse options - func_parse_lt_options "$0" ${1+"$@"} - - # Find the directory that this script lives in. - thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no - if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then - # special case for '.' - if test "$thisdir" = "."; then - thisdir=`pwd` - fi - # remove .libs from thisdir - case "$thisdir" in - *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;; - .libs ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program=lt-'columnstoreSupport' - progdir="$thisdir/.libs" - - if test ! -f "$progdir/$program" || - { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /usr/bin/sed 1q`; \ - test "X$file" != "X$progdir/$program"; }; then - - file="$$-$program" - - if test ! -d "$progdir"; then - mkdir "$progdir" - else - rm -f "$progdir/$file" - fi - - # relink executable if necessary - if test -n "$relink_command"; then - if relink_command_output=`eval $relink_command 2>&1`; then : - else - printf %s\n "$relink_command_output" >&2 - rm -f "$progdir/$file" - exit 1 - fi - fi - - mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || - { rm -f "$progdir/$program"; - mv -f "$progdir/$file" "$progdir/$program"; } - rm -f "$progdir/$file" - fi - - if test -f "$progdir/$program"; then - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - func_exec_program ${1+"$@"} - fi - else - # The program doesn't exist. - $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 - $ECHO "This script is just a wrapper for $program." 1>&2 - $ECHO "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff --git a/oamapps/sendtrap/sendtrap.cpp b/oamapps/sendtrap/sendtrap.cpp index f1e2afdb9..d02cd3724 100644 --- a/oamapps/sendtrap/sendtrap.cpp +++ b/oamapps/sendtrap/sendtrap.cpp @@ -79,7 +79,7 @@ int main(int argc, char **argv) } // session initialization - create_trap_session(ipAdd.c_str(), + create_trap_session((char*)ipAdd.c_str(), SNMP_TRAP_PORT, "public", SNMP_VERSION_1, diff --git a/utils/net-snmp-built-libs/bin/snmpd b/utils/net-snmp-built-libs/bin/snmpd deleted file mode 100755 index 43f9e6cf0..000000000 Binary files a/utils/net-snmp-built-libs/bin/snmpd and /dev/null differ diff --git a/utils/net-snmp-built-libs/bin/snmptrapd b/utils/net-snmp-built-libs/bin/snmptrapd deleted file mode 100755 index 608c717c3..000000000 Binary files a/utils/net-snmp-built-libs/bin/snmptrapd and /dev/null differ diff --git a/utils/net-snmp-built-libs/bin64/snmpd b/utils/net-snmp-built-libs/bin64/snmpd deleted file mode 100755 index 24df3167a..000000000 Binary files a/utils/net-snmp-built-libs/bin64/snmpd and /dev/null differ diff --git a/utils/net-snmp-built-libs/bin64/snmptrapd b/utils/net-snmp-built-libs/bin64/snmptrapd deleted file mode 100755 index 9886b8af6..000000000 Binary files a/utils/net-snmp-built-libs/bin64/snmptrapd and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc12bin/snmpd b/utils/net-snmp-built-libs/fc12bin/snmpd deleted file mode 100755 index 0d9374a63..000000000 Binary files a/utils/net-snmp-built-libs/fc12bin/snmpd and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc12bin/snmptrapd b/utils/net-snmp-built-libs/fc12bin/snmptrapd deleted file mode 100755 index 9ba3cc074..000000000 Binary files a/utils/net-snmp-built-libs/fc12bin/snmptrapd and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc12lib/libnetsnmp.so.5.2.1 b/utils/net-snmp-built-libs/fc12lib/libnetsnmp.so.5.2.1 deleted file mode 100755 index 7259ef140..000000000 Binary files a/utils/net-snmp-built-libs/fc12lib/libnetsnmp.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc12lib/libnetsnmpagent.so.5.2.1 b/utils/net-snmp-built-libs/fc12lib/libnetsnmpagent.so.5.2.1 deleted file mode 100755 index b51ec921c..000000000 Binary files a/utils/net-snmp-built-libs/fc12lib/libnetsnmpagent.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc12lib/libnetsnmphelpers.so.5.2.1 b/utils/net-snmp-built-libs/fc12lib/libnetsnmphelpers.so.5.2.1 deleted file mode 100755 index 2e4b952a1..000000000 Binary files a/utils/net-snmp-built-libs/fc12lib/libnetsnmphelpers.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc12lib/libnetsnmpmibs.so.5.2.1 b/utils/net-snmp-built-libs/fc12lib/libnetsnmpmibs.so.5.2.1 deleted file mode 100755 index ee9dbda90..000000000 Binary files a/utils/net-snmp-built-libs/fc12lib/libnetsnmpmibs.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc12lib/libnetsnmptrapd.so.5.2.1 b/utils/net-snmp-built-libs/fc12lib/libnetsnmptrapd.so.5.2.1 deleted file mode 100755 index fa44976da..000000000 Binary files a/utils/net-snmp-built-libs/fc12lib/libnetsnmptrapd.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc6bin/snmpd b/utils/net-snmp-built-libs/fc6bin/snmpd deleted file mode 100755 index f431d506f..000000000 Binary files a/utils/net-snmp-built-libs/fc6bin/snmpd and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc6bin/snmptrapd b/utils/net-snmp-built-libs/fc6bin/snmptrapd deleted file mode 100755 index 5a0f93abf..000000000 Binary files a/utils/net-snmp-built-libs/fc6bin/snmptrapd and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc6lib/libnetsnmp.so.5.2.1 b/utils/net-snmp-built-libs/fc6lib/libnetsnmp.so.5.2.1 deleted file mode 100755 index 7a1ff08b6..000000000 Binary files a/utils/net-snmp-built-libs/fc6lib/libnetsnmp.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc6lib/libnetsnmpagent.so.5.2.1 b/utils/net-snmp-built-libs/fc6lib/libnetsnmpagent.so.5.2.1 deleted file mode 100755 index 64c4d0be2..000000000 Binary files a/utils/net-snmp-built-libs/fc6lib/libnetsnmpagent.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc6lib/libnetsnmphelpers.so.5.2.1 b/utils/net-snmp-built-libs/fc6lib/libnetsnmphelpers.so.5.2.1 deleted file mode 100755 index 729925b26..000000000 Binary files a/utils/net-snmp-built-libs/fc6lib/libnetsnmphelpers.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc6lib/libnetsnmpmibs.so.5.2.1 b/utils/net-snmp-built-libs/fc6lib/libnetsnmpmibs.so.5.2.1 deleted file mode 100755 index 2ee8cd2c1..000000000 Binary files a/utils/net-snmp-built-libs/fc6lib/libnetsnmpmibs.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/fc6lib/libnetsnmptrapd.so.5.2.1 b/utils/net-snmp-built-libs/fc6lib/libnetsnmptrapd.so.5.2.1 deleted file mode 100755 index 75ec9718b..000000000 Binary files a/utils/net-snmp-built-libs/fc6lib/libnetsnmptrapd.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/lib64/libnetsnmp.so.5.2.1 b/utils/net-snmp-built-libs/lib64/libnetsnmp.so.5.2.1 deleted file mode 100755 index bae60734a..000000000 Binary files a/utils/net-snmp-built-libs/lib64/libnetsnmp.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/lib64/libnetsnmpagent.so.5.2.1 b/utils/net-snmp-built-libs/lib64/libnetsnmpagent.so.5.2.1 deleted file mode 100755 index cee70a91c..000000000 Binary files a/utils/net-snmp-built-libs/lib64/libnetsnmpagent.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/lib64/libnetsnmphelpers.so.5.2.1 b/utils/net-snmp-built-libs/lib64/libnetsnmphelpers.so.5.2.1 deleted file mode 100755 index 50041107f..000000000 Binary files a/utils/net-snmp-built-libs/lib64/libnetsnmphelpers.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/lib64/libnetsnmpmibs.so.5.2.1 b/utils/net-snmp-built-libs/lib64/libnetsnmpmibs.so.5.2.1 deleted file mode 100755 index 218822975..000000000 Binary files a/utils/net-snmp-built-libs/lib64/libnetsnmpmibs.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/lib64/libnetsnmptrapd.so.5.2.1 b/utils/net-snmp-built-libs/lib64/libnetsnmptrapd.so.5.2.1 deleted file mode 100755 index ba6a925ec..000000000 Binary files a/utils/net-snmp-built-libs/lib64/libnetsnmptrapd.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/libnetsnmp.so.5.2.1 b/utils/net-snmp-built-libs/libnetsnmp.so.5.2.1 deleted file mode 100755 index 0b64ae93e..000000000 Binary files a/utils/net-snmp-built-libs/libnetsnmp.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/libnetsnmpagent.so.5.2.1 b/utils/net-snmp-built-libs/libnetsnmpagent.so.5.2.1 deleted file mode 100755 index a7982cd25..000000000 Binary files a/utils/net-snmp-built-libs/libnetsnmpagent.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/libnetsnmphelpers.so.5.2.1 b/utils/net-snmp-built-libs/libnetsnmphelpers.so.5.2.1 deleted file mode 100755 index 5389263e2..000000000 Binary files a/utils/net-snmp-built-libs/libnetsnmphelpers.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/libnetsnmpmibs.so.5.2.1 b/utils/net-snmp-built-libs/libnetsnmpmibs.so.5.2.1 deleted file mode 100755 index 3abddb623..000000000 Binary files a/utils/net-snmp-built-libs/libnetsnmpmibs.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp-built-libs/libnetsnmptrapd.so.5.2.1 b/utils/net-snmp-built-libs/libnetsnmptrapd.so.5.2.1 deleted file mode 100755 index 927554b5c..000000000 Binary files a/utils/net-snmp-built-libs/libnetsnmptrapd.so.5.2.1 and /dev/null differ diff --git a/utils/net-snmp/Makefile.am b/utils/net-snmp/Makefile.am deleted file mode 100644 index f46ed78d6..000000000 --- a/utils/net-snmp/Makefile.am +++ /dev/null @@ -1,159 +0,0 @@ -netsnmp_HEADERS = \ -config_api.h \ -definitions.h \ -mib_api.h \ -net-snmp-config.h \ -net-snmp-includes.h \ -output_api.h \ -pdu_api.h \ -session_api.h \ -snmpv3_api.h \ -types.h \ -utilities.h \ -varbind_api.h \ -version.h - -netsnmpsys_HEADERS = \ -system/aix.h \ -system/bsd.h \ -system/bsdi.h \ -system/bsdi3.h \ -system/bsdi4.h \ -system/cygwin.h \ -system/darwin.h \ -system/darwin7.h \ -system/dynix.h \ -system/freebsd.h \ -system/freebsd2.h \ -system/freebsd3.h \ -system/freebsd4.h \ -system/freebsd5.h \ -system/freebsd6.h \ -system/generic.h \ -system/hpux.h \ -system/irix.h \ -system/linux.h \ -system/mingw32.h \ -system/mips.h \ -system/netbsd.h \ -system/openbsd.h \ -system/osf5.h \ -system/solaris.h \ -system/solaris2.6.h \ -system/solaris2.7.h \ -system/solaris2.8.h \ -system/solaris2.9.h \ -system/sunos.h \ -system/svr5.h \ -system/sysv.h \ -system/ultrix4.h - -netsnmpmach_HEADERS = \ -machine/generic.h - -netsnmplibr_HEADERS = \ -library/README \ -library/asn1.h \ -library/callback.h \ -library/check_varbind.h \ -library/cmu_compat.h \ -library/container.h \ -library/container_binary_array.h \ -library/container_iterator.h \ -library/container_list_ssll.h \ -library/container_null.h \ -library/data_list.h \ -library/default_store.h \ -library/factory.h \ -library/getopt.h \ -library/int64.h \ -library/keytools.h \ -library/lcd_time.h \ -library/md5.h \ -library/mib.h \ -library/mt_support.h \ -library/oid_stash.h \ -library/parse.h \ -library/read_config.h \ -library/scapi.h \ -library/snmp-tc.h \ -library/snmp.h \ -library/snmpCallbackDomain.h \ -library/snmpTCPDomain.h \ -library/snmpUDPDomain.h \ -library/snmpUnixDomain.h \ -library/snmp_alarm.h \ -library/snmp_api.h \ -library/snmp_assert.h \ -library/snmp_client.h \ -library/snmp_debug.h \ -library/snmp_enum.h \ -library/snmp_impl.h \ -library/snmp_locking.h \ -library/snmp_logging.h \ -library/snmp_parse_args.h \ -library/snmp_secmod.h \ -library/snmp_transport.h \ -library/snmpusm.h \ -library/snmpv3-security-includes.h \ -library/snmpv3.h \ -library/system.h \ -library/tools.h \ -library/transform_oids.h \ -library/ucd_compat.h \ -library/vacm.h \ -library/winpipe.h \ -library/winservice.h - -netsnmpagnt_HEADERS = \ -agent/agent_callbacks.h \ -agent/agent_handler.h \ -agent/agent_index.h \ -agent/agent_module_config.h \ -agent/agent_read_config.h \ -agent/agent_registry.h \ -agent/agent_trap.h \ -agent/all_helpers.h \ -agent/auto_nlist.h \ -agent/baby_steps.h \ -agent/bulk_to_next.h \ -agent/cache_handler.h \ -agent/debug_handler.h \ -agent/ds_agent.h \ -agent/instance.h \ -agent/mfd.h \ -agent/mib_module_config.h \ -agent/mib_module_includes.h \ -agent/mib_modules.h \ -agent/mode_end_call.h \ -agent/multiplexer.h \ -agent/net-snmp-agent-includes.h \ -agent/null.h \ -agent/old_api.h \ -agent/read_only.h \ -agent/row_merge.h \ -agent/scalar.h \ -agent/scalar_group.h \ -agent/serialize.h \ -agent/set_helper.h \ -agent/snmp_agent.h \ -agent/snmp_vars.h \ -agent/table.h \ -agent/table_array.h \ -agent/table_container.h \ -agent/table_data.h \ -agent/table_dataset.h \ -agent/table_iterator.h \ -agent/var_struct.h \ -agent/watcher.h - -test: - -coverage: - -leakcheck: - -docs: - -bootstrap: install-data-am - diff --git a/utils/net-snmp/agent/agent_callbacks.h b/utils/net-snmp/agent/agent_callbacks.h deleted file mode 100644 index 9c560c625..000000000 --- a/utils/net-snmp/agent/agent_callbacks.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef AGENT_CALLBACKS_H -#define AGENT_CALLBACKS_H - -#define SNMPD_CALLBACK_ACM_CHECK 0 -#define SNMPD_CALLBACK_REGISTER_OID 1 -#define SNMPD_CALLBACK_UNREGISTER_OID 2 -#define SNMPD_CALLBACK_REG_SYSOR 3 -#define SNMPD_CALLBACK_UNREG_SYSOR 4 -#define SNMPD_CALLBACK_ACM_CHECK_INITIAL 5 -#define SNMPD_CALLBACK_SEND_TRAP1 6 -#define SNMPD_CALLBACK_SEND_TRAP2 7 -#define SNMPD_CALLBACK_REGISTER_NOTIFICATIONS 8 -#define SNMPD_CALLBACK_PRE_UPDATE_CONFIG 9 -#define SNMPD_CALLBACK_INDEX_START 10 -#define SNMPD_CALLBACK_INDEX_STOP 11 -#define SNMPD_CALLBACK_ACM_CHECK_SUBTREE 12 - -#endif /* AGENT_CALLBACKS_H */ diff --git a/utils/net-snmp/agent/agent_handler.h b/utils/net-snmp/agent/agent_handler.h deleted file mode 100644 index 027bf1d90..000000000 --- a/utils/net-snmp/agent/agent_handler.h +++ /dev/null @@ -1,266 +0,0 @@ -/* Portions of this file are subject to the following copyright(s). See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/* - * Portions of this file are copyrighted by: - * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ -#ifndef AGENT_HANDLER_H -#define AGENT_HANDLER_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** @file agent_handler.h - * - * @addtogroup handler - * - * @{ - */ - -struct netsnmp_handler_registration_s; - -/* - * per mib handler flags. - * NOTE: The last 4 bits are reserved for the handler's own use. - */ -#define MIB_HANDLER_AUTO_NEXT 0x00000001 -#define MIB_HANDLER_AUTO_NEXT_OVERRIDE_ONCE 0x00000002 - -#define MIB_HANDLER_CUSTOM4 0x10000000 -#define MIB_HANDLER_CUSTOM3 0x20000000 -#define MIB_HANDLER_CUSTOM2 0x40000000 -#define MIB_HANDLER_CUSTOM1 0x80000000 - - -/** @typedef struct netsnmp_mib_handler_s netsnmp_mib_handler - * Typedefs the netsnmp_mib_handler_s struct into netsnmp_mib_handler */ - -/** @struct netsnmp_mib_handler_s - * the mib handler structure to be registered - */ -typedef struct netsnmp_mib_handler_s { - char *handler_name; - /** for handler's internal use */ - void *myvoid; - /** for agent_handler's internal use */ - int flags; - - /** if you add more members, you probably also want to update */ - /** _clone_handler in snmp_agent.c. */ - - int (*access_method) (struct netsnmp_mib_handler_s *, - struct - netsnmp_handler_registration_s *, - struct - netsnmp_agent_request_info_s *, - struct netsnmp_request_info_s *); - - struct netsnmp_mib_handler_s *next; - struct netsnmp_mib_handler_s *prev; -} netsnmp_mib_handler; - -/* - * per registration flags - */ -#define HANDLER_CAN_GETANDGETNEXT 0x01 /* must be able to do both */ -#define HANDLER_CAN_SET 0x02 /* implies create, too */ -#define HANDLER_CAN_GETBULK 0x04 -#define HANDLER_CAN_NOT_CREATE 0x08 /* auto set if ! CAN_SET */ -#define HANDLER_CAN_BABY_STEP 0x10 - - -#define HANDLER_CAN_RONLY (HANDLER_CAN_GETANDGETNEXT) -#define HANDLER_CAN_RWRITE (HANDLER_CAN_GETANDGETNEXT | HANDLER_CAN_SET) -#define HANDLER_CAN_SET_ONLY (HANDLER_CAN_SET | HANDLER_CAN_NOT_CREATE) -#define HANDLER_CAN_DEFAULT (HANDLER_CAN_RONLY | HANDLER_CAN_NOT_CREATE) - -/** @typedef struct netsnmp_handler_registration_s netsnmp_handler_registration - * Typedefs the netsnmp_handler_registration_s struct into netsnmp_handler_registration */ - -/** @struct netsnmp_handler_registration_s - * Root registration info. - * The variables handlerName, contextName, and rootoid need to be allocated - * on the heap, when the registration structure is unregistered using - * unregister_mib_context() the code attempts to free them. - */ -typedef struct netsnmp_handler_registration_s { - - /** for mrTable listings, and other uses */ - char *handlerName; - /** NULL = default context */ - char *contextName; - - /** - * where are we registered at? - */ - oid *rootoid; - size_t rootoid_len; - - /** - * handler details - */ - netsnmp_mib_handler *handler; - int modes; - - /** - * more optional stuff - */ - int priority; - int range_subid; - oid range_ubound; - int timeout; - int global_cacheid; - - /** - * void ptr for registeree - */ - void * my_reg_void; - -} netsnmp_handler_registration; - -/* - * function handler definitions - */ - -typedef int (Netsnmp_Node_Handler) (netsnmp_mib_handler *handler, - /** pointer to registration struct */ - netsnmp_handler_registration *reginfo, - /** pointer to current transaction */ - netsnmp_agent_request_info *reqinfo, - netsnmp_request_info *requests); - - typedef struct netsnmp_handler_args_s { - netsnmp_mib_handler *handler; - netsnmp_handler_registration *reginfo; - netsnmp_agent_request_info *reqinfo; - netsnmp_request_info *requests; - } netsnmp_handler_args; - - typedef struct netsnmp_delegated_cache_s { - int transaction_id; - netsnmp_mib_handler *handler; - netsnmp_handler_registration *reginfo; - netsnmp_agent_request_info *reqinfo; - netsnmp_request_info *requests; - void *localinfo; - } netsnmp_delegated_cache; - - /* - * handler API functions - */ - void netsnmp_init_handler_conf(void); - int netsnmp_register_handler(netsnmp_handler_registration - *reginfo); - int netsnmp_unregister_handler(netsnmp_handler_registration - *reginfo); - int - netsnmp_register_handler_nocallback(netsnmp_handler_registration - *reginfo); - int netsnmp_inject_handler(netsnmp_handler_registration - *reginfo, - netsnmp_mib_handler *handler); - int - netsnmp_inject_handler_before(netsnmp_handler_registration *reginfo, - netsnmp_mib_handler *handler, - const char *before_what); - netsnmp_mib_handler - *netsnmp_find_handler_by_name(netsnmp_handler_registration - *reginfo, const char *name); - void - *netsnmp_find_handler_data_by_name(netsnmp_handler_registration - *reginfo, const char *name); - int netsnmp_call_handlers(netsnmp_handler_registration - *reginfo, - netsnmp_agent_request_info - *reqinfo, - netsnmp_request_info *requests); - int netsnmp_call_handler(netsnmp_mib_handler *next_handler, - netsnmp_handler_registration - *reginfo, - netsnmp_agent_request_info - *reqinfo, - netsnmp_request_info *requests); - int netsnmp_call_next_handler(netsnmp_mib_handler *current, - netsnmp_handler_registration - *reginfo, - netsnmp_agent_request_info - *reqinfo, - netsnmp_request_info - *requests); - int netsnmp_call_next_handler_one_request(netsnmp_mib_handler *current, - netsnmp_handler_registration *reginfo, - netsnmp_agent_request_info *reqinfo, - netsnmp_request_info *requests); - - netsnmp_mib_handler *netsnmp_create_handler(const char *name, - Netsnmp_Node_Handler * - handler_access_method); - netsnmp_handler_registration * - netsnmp_handler_registration_create(const char *name, - netsnmp_mib_handler *handler, - oid * reg_oid, size_t reg_oid_len, - int modes); - netsnmp_handler_registration * - netsnmp_create_handler_registration(const char *name, Netsnmp_Node_Handler* - handler_access_method, oid *reg_oid, - size_t reg_oid_len, int modes); - - NETSNMP_INLINE netsnmp_delegated_cache - *netsnmp_create_delegated_cache(netsnmp_mib_handler *, - netsnmp_handler_registration *, - netsnmp_agent_request_info *, - netsnmp_request_info *, void *); - NETSNMP_INLINE void netsnmp_free_delegated_cache(netsnmp_delegated_cache - *dcache); - NETSNMP_INLINE netsnmp_delegated_cache - *netsnmp_handler_check_cache(netsnmp_delegated_cache *dcache); - void netsnmp_register_handler_by_name(const char *, - netsnmp_mib_handler - *); - - void netsnmp_clear_handler_list(void); - - NETSNMP_INLINE void - netsnmp_request_add_list_data(netsnmp_request_info *request, - netsnmp_data_list *node); - - NETSNMP_INLINE int - netsnmp_request_remove_list_data(netsnmp_request_info *request, - const char *name); - - NETSNMP_INLINE void *netsnmp_request_get_list_data(netsnmp_request_info - *request, - const char *name); - - NETSNMP_INLINE void - netsnmp_free_request_data_set(netsnmp_request_info *request); - - NETSNMP_INLINE void - netsnmp_free_request_data_sets(netsnmp_request_info *request); - - void netsnmp_handler_free(netsnmp_mib_handler *); - netsnmp_mib_handler *netsnmp_handler_dup(netsnmp_mib_handler *); - netsnmp_handler_registration - *netsnmp_handler_registration_dup(netsnmp_handler_registration *); - void - netsnmp_handler_registration_free(netsnmp_handler_registration *); - -#define REQUEST_IS_DELEGATED 1 -#define REQUEST_IS_NOT_DELEGATED 0 - void - netsnmp_handler_mark_requests_as_delegated(netsnmp_request_info *, - int); - void *netsnmp_handler_get_parent_data(netsnmp_request_info *, - const char *); - -#ifdef __cplusplus -} -#endif - -#endif /* AGENT_HANDLER_H */ -/** @} */ diff --git a/utils/net-snmp/agent/agent_index.h b/utils/net-snmp/agent/agent_index.h deleted file mode 100644 index 49ee7fdcc..000000000 --- a/utils/net-snmp/agent/agent_index.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef AGENT_INDEX_H -#define AGENT_INDEX_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define ALLOCATE_THIS_INDEX 0x0 -#define ALLOCATE_ANY_INDEX 0x1 -#define ALLOCATE_NEW_INDEX 0x3 - /* - * N.B: it's deliberate that NEW_INDEX & ANY_INDEX == ANY_INDEX - */ - -#define ANY_INTEGER_INDEX -1 -#define ANY_STRING_INDEX NULL -#define ANY_OID_INDEX NULL - -#define INDEX_ERR_GENERR -1 -#define INDEX_ERR_WRONG_TYPE -2 -#define INDEX_ERR_NOT_ALLOCATED -3 -#define INDEX_ERR_WRONG_SESSION -4 - -char *register_string_index(oid *, size_t, char *); -int register_int_index(oid *, size_t, int); -netsnmp_variable_list *register_oid_index(oid *, size_t, oid *, size_t); -netsnmp_variable_list *register_index(netsnmp_variable_list *, int, - netsnmp_session *); - -int unregister_string_index(oid *, size_t, char *); -int unregister_int_index(oid *, size_t, int); -int unregister_oid_index(oid *, size_t, oid *, size_t); - -int release_index(netsnmp_variable_list *); -int remove_index(netsnmp_variable_list *, netsnmp_session *); -void unregister_index_by_session(netsnmp_session *); -int unregister_index(netsnmp_variable_list *, int, - netsnmp_session *); - -unsigned long count_indexes(oid * name, size_t namelen, - int include_unallocated); - -#ifdef __cplusplus -} -#endif -#endif /* AGENT_INDEX_H */ diff --git a/utils/net-snmp/agent/agent_module_config.h b/utils/net-snmp/agent/agent_module_config.h deleted file mode 100644 index 3ca130f45..000000000 --- a/utils/net-snmp/agent/agent_module_config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* This file is automatically generated by configure. Do not modify by hand. */ -/* Define if compiling with the snmpv3/usmConf module files. */ -#define USING_SNMPV3_USMCONF_MODULE 1 - -/* Define if compiling with the agentx/master module files. */ -#define USING_AGENTX_MASTER_MODULE 1 - -/* Define if compiling with the agentx/subagent module files. */ -#define USING_AGENTX_SUBAGENT_MODULE 1 - -/* Define if compiling with the mibII/vacm_conf module files. */ -#define USING_MIBII_VACM_CONF_MODULE 1 - -/* Define if compiling with the utilities/execute module files. */ -#define USING_UTILITIES_EXECUTE_MODULE 1 - -/* Define if compiling with the agentx/protocol module files. */ -#define USING_AGENTX_PROTOCOL_MODULE 1 - -/* Define if compiling with the agentx/client module files. */ -#define USING_AGENTX_CLIENT_MODULE 1 - -/* Define if compiling with the agentx/master_admin module files. */ -#define USING_AGENTX_MASTER_ADMIN_MODULE 1 - -/* Define if compiling with the agentx/agentx_config module files. */ -#define USING_AGENTX_AGENTX_CONFIG_MODULE 1 - diff --git a/utils/net-snmp/agent/agent_read_config.h b/utils/net-snmp/agent/agent_read_config.h deleted file mode 100644 index e9af89d8c..000000000 --- a/utils/net-snmp/agent/agent_read_config.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * agent_read_config.h: reads configuration files for extensible sections. - * - */ -#ifndef _AGENT_READ_CONFIG_H -#define _AGENT_READ_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif - - void init_agent_read_config(const char *); - void update_config(void); - void snmpd_register_config_handler(const char *, - void (*parser) (const - char *, - char *), - void (*releaser) (void), - const char *); - void snmpd_unregister_config_handler(const char *); - void snmpd_store_config(const char *); - -#ifdef __cplusplus -} -#endif -#endif /* _AGENT_READ_CONFIG_H */ diff --git a/utils/net-snmp/agent/agent_registry.h b/utils/net-snmp/agent/agent_registry.h deleted file mode 100644 index 5a4bee9d4..000000000 --- a/utils/net-snmp/agent/agent_registry.h +++ /dev/null @@ -1,204 +0,0 @@ -#ifndef AGENT_REGISTRY_H -#define AGENT_REGISTRY_H - -/***********************************************************************/ -/* - * new version2 agent handler API structures - */ -/***********************************************************************/ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/***********************************************************************/ - /* - * requests api definitions - */ -/***********************************************************************/ - - /* - * the structure of parameters passed to registered ACM modules - */ -struct view_parameters { - netsnmp_pdu *pdu; - oid *name; - size_t namelen; - int test; - int errorcode; /* Do not change unless you're - specifying an error, as it starts - in a success state. */ - int check_subtree; -}; - -struct register_parameters { - oid *name; - size_t namelen; - int priority; - int range_subid; - oid range_ubound; - int timeout; - u_char flags; - const char *contextName; -}; - -typedef struct subtree_context_cache_s { - char *context_name; - struct netsnmp_subtree_s *first_subtree; - struct subtree_context_cache_s *next; -} subtree_context_cache; - - - -void setup_tree (void); -void shutdown_tree (void); - - -netsnmp_subtree *netsnmp_subtree_find (oid *, size_t, netsnmp_subtree *, - const char *context_name); - -netsnmp_subtree *netsnmp_subtree_find_next(oid *, size_t, netsnmp_subtree *, - const char *context_name); - -netsnmp_subtree *netsnmp_subtree_find_prev(oid *, size_t,netsnmp_subtree *, - const char *context_name); - -netsnmp_subtree *netsnmp_subtree_find_first(const char *context_name); - -netsnmp_session *get_session_for_oid (oid *, size_t, - const char *context_name); - -subtree_context_cache *get_top_context_cache(void); - -void netsnmp_set_lookup_cache_size(int newsize); -int netsnmp_get_lookup_cache_size(void); - -#define MIB_REGISTERED_OK 0 -#define MIB_DUPLICATE_REGISTRATION -1 -#define MIB_REGISTRATION_FAILED -2 -#define MIB_UNREGISTERED_OK 0 -#define MIB_NO_SUCH_REGISTRATION -1 -#define MIB_UNREGISTRATION_FAILED -2 -#define DEFAULT_MIB_PRIORITY 127 - -int register_mib (const char *, struct variable *, - size_t, size_t, oid *, size_t); - -int register_mib_priority (const char *, struct variable *, - size_t, size_t, oid *, size_t, - int); - -int register_mib_range (const char *, struct variable *, - size_t, size_t, oid *, size_t, - int, int, oid, netsnmp_session *); - -int register_mib_context (const char *, struct variable *, - size_t, size_t, oid *, size_t, - int, int, oid, netsnmp_session *, - const char *, int, int); - -int netsnmp_register_mib_table_row (const char *, struct variable *, - size_t, size_t, oid *, size_t, - int, int, netsnmp_session *, - const char *, int, int); - -int unregister_mib (oid *, size_t); - -int unregister_mib_priority (oid *, size_t, int); -int unregister_mib_range (oid *, size_t, int, int, oid); -int unregister_mib_context (oid *, size_t, int, int, oid, - const char *); -void clear_context (void); -void unregister_mibs_by_session (netsnmp_session *); -int netsnmp_unregister_mib_table_row (oid *mibloc, size_t mibloclen, - int priority, int var_subid, - oid range_ubound, - const char *context); - -int compare_tree (const oid *, size_t, - const oid *, size_t); -int in_a_view (oid *, size_t *, - netsnmp_pdu *, int); -int check_access (netsnmp_pdu *pdu); -int netsnmp_acm_check_subtree (netsnmp_pdu *, oid *, size_t); -void register_mib_reattach (void); -void register_mib_detach (void); - -/* - * REGISTER_MIB(): This macro simply loads register_mib with less pain: - * - * descr: A short description of the mib group being loaded. - * var: The variable structure to load. - * vartype: The variable structure used to define it (variable[2, 4, ...]) - * theoid: An *initialized* *exact length* oid pointer. - * (sizeof(theoid) *must* return the number of elements!) - */ - -#define REGISTER_MIB(descr, var, vartype, theoid) \ - if (register_mib(descr, (struct variable *) var, sizeof(struct vartype), \ - sizeof(var)/sizeof(struct vartype), \ - theoid, sizeof(theoid)/sizeof(oid)) != MIB_REGISTERED_OK ) \ - DEBUGMSGTL(("register_mib", "%s registration failed\n", descr)); - - - -#define NUM_EXTERNAL_FDS 32 -#define FD_REGISTERED_OK 0 -#define FD_REGISTRATION_FAILED -2 -#define FD_UNREGISTERED_OK 0 -#define FD_NO_SUCH_REGISTRATION -1 - -extern int external_readfd[NUM_EXTERNAL_FDS], external_readfdlen; -extern int external_writefd[NUM_EXTERNAL_FDS], external_writefdlen; -extern int external_exceptfd[NUM_EXTERNAL_FDS], external_exceptfdlen; - -extern void (*external_readfdfunc[NUM_EXTERNAL_FDS]) (int, void *); -extern void (*external_writefdfunc[NUM_EXTERNAL_FDS]) (int, void *); -extern void (*external_exceptfdfunc[NUM_EXTERNAL_FDS]) (int, void *); - -extern void *external_readfd_data[NUM_EXTERNAL_FDS]; -extern void *external_writefd_data[NUM_EXTERNAL_FDS]; -extern void *external_exceptfd_data[NUM_EXTERNAL_FDS]; - -int register_readfd(int, void (*func)(int, void *), void *); -int register_writefd(int, void (*func)(int, void *), void *); -int register_exceptfd(int, void (*func)(int, void *), void *); -int unregister_readfd(int); -int unregister_writefd(int); -int unregister_exceptfd(int); - - - -#define NUM_EXTERNAL_SIGS 32 -#define SIG_REGISTERED_OK 0 -#define SIG_REGISTRATION_FAILED -2 -#define SIG_UNREGISTERED_OK 0 - -extern int external_signal_scheduled[NUM_EXTERNAL_SIGS]; -extern void (*external_signal_handler[NUM_EXTERNAL_SIGS])(int); - -int register_signal(int, void (*func)(int)); -int unregister_signal(int); - - - -/* - * internal API. Don't use this. Use netsnmp_register_handler instead - */ - -struct netsnmp_handler_registration_s; - -int netsnmp_register_mib(const char *, struct variable *, - size_t, size_t, oid *, size_t, - int, int, oid, netsnmp_session *, - const char *, int, int, - struct netsnmp_handler_registration_s *, - int); - -#ifdef __cplusplus -} -#endif - -#endif /* AGENT_REGISTRY_H */ diff --git a/utils/net-snmp/agent/agent_trap.h b/utils/net-snmp/agent/agent_trap.h deleted file mode 100644 index 1599ffead..000000000 --- a/utils/net-snmp/agent/agent_trap.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef AGENT_TRAP_H -#define AGENT_TRAP_H - -#ifdef __cplusplus -extern "C" { -#endif - -struct agent_add_trap_args { - netsnmp_session *ss; - int confirm; -}; - -void init_traps(void); -void send_easy_trap(int, int); -void send_trap_pdu(netsnmp_pdu *); -void send_v2trap(netsnmp_variable_list *); -void send_trap_vars(int, int, netsnmp_variable_list *); -void send_enterprise_trap_vars(int trap, int specific, - oid * enterprise, - int enterprise_length, - netsnmp_variable_list * vars); -int netsnmp_send_traps(int trap, int specific, - oid * enterprise, int enterprise_length, - netsnmp_variable_list * vars, - /* These next two are currently unused */ - char * context, int flags); -void snmpd_parse_config_authtrap(const char *, char *); -void snmpd_parse_config_trapsink(const char *, char *); -void snmpd_parse_config_trap2sink(const char *, char *); -void snmpd_parse_config_informsink(const char *, char *); -void snmpd_parse_config_trapsess(const char *, char *); -void snmpd_free_trapsinks(void); -void snmpd_parse_config_trapcommunity(const char *, char *); -void snmpd_free_trapcommunity(void); -void send_trap_to_sess(netsnmp_session * sess, - netsnmp_pdu *template_pdu); - -int create_trap_session(const char *, u_short, const char *, int, int); -int add_trap_session(netsnmp_session *, int, int, int); -int remove_trap_session(netsnmp_session *); - -void convert_v2_to_v1(netsnmp_variable_list *, netsnmp_pdu *); -netsnmp_variable_list *convert_v1_to_v2(netsnmp_pdu *); -netsnmp_pdu *convert_v2pdu_to_v1(netsnmp_pdu *); -netsnmp_pdu *convert_v1pdu_to_v2(netsnmp_pdu *); - -#ifdef __cplusplus -} -#endif -#endif /* AGENT_TRAP_H */ diff --git a/utils/net-snmp/agent/all_helpers.h b/utils/net-snmp/agent/all_helpers.h deleted file mode 100644 index 55959076f..000000000 --- a/utils/net-snmp/agent/all_helpers.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef ALL_HANDLERS_H -#define ALL_HANDLERS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -/* - * #include - */ -#include -#include -#include -#include -#include -/* - * #include - */ - -#include - - -void netsnmp_init_helpers(void); - -#ifdef __cplusplus -} -#endif -#endif /* ALL_HANDLERS_H */ diff --git a/utils/net-snmp/agent/auto_nlist.h b/utils/net-snmp/agent/auto_nlist.h deleted file mode 100644 index f31d9b95b..000000000 --- a/utils/net-snmp/agent/auto_nlist.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * auto_nlist.h - */ -#ifndef AUTO_NLIST_H -#define AUTO_NLIST_H -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(irix6) && defined(IRIX64) -#define nlist nlist64 -#endif - -#ifdef CAN_USE_NLIST -int auto_nlist(const char *, char *, int); -long auto_nlist_value(const char *); -int KNLookup(struct nlist *, int, char *, int); -#else -int auto_nlist_noop(void); -# define auto_nlist(x,y,z) auto_nlist_noop() -# define auto_nlist_value(z) auto_nlist_noop() -# define KNLookup(w,x,y,z) auto_nlist_noop() -#endif - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/agent/baby_steps.h b/utils/net-snmp/agent/baby_steps.h deleted file mode 100644 index a9e5ce6c5..000000000 --- a/utils/net-snmp/agent/baby_steps.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * $Id: baby_steps.h,v 1.7 2004/09/14 02:29:15 rstory Exp $ - */ -#ifndef BABY_STEPS_H -#define BABY_STEPS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - - /* - * Flags for baby step modes - */ -#define BABY_STEP_NONE 0 -#define BABY_STEP_PRE_REQUEST (0x1 << 1) -#define BABY_STEP_OBJECT_LOOKUP (0x1 << 2) -#define BABY_STEP_CHECK_VALUE (0x1 << 3) -#define BABY_STEP_ROW_CREATE (0x1 << 4) -#define BABY_STEP_UNDO_SETUP (0x1 << 5) -#define BABY_STEP_SET_VALUE (0x1 << 6) -#define BABY_STEP_CHECK_CONSISTENCY (0x1 << 7) -#define BABY_STEP_UNDO_SET (0x1 << 8) -#define BABY_STEP_COMMIT (0x1 << 9) -#define BABY_STEP_UNDO_COMMIT (0x1 << 10) -#define BABY_STEP_IRREVERSIBLE_COMMIT (0x1 << 11) -#define BABY_STEP_UNDO_CLEANUP (0x1 << 12) -#define BABY_STEP_POST_REQUEST (0x1 << 13) - -#define BABY_STEP_ALL (0xffffffff) - - -#define BABY_STEP_CHECK_OBJECT BABY_STEP_CHECK_VALUE -#define BABY_STEP_SET_VALUES BABY_STEP_SET_VALUE -#define BABY_STEP_UNDO_SETS BABY_STEP_UNDO_SET - -/** @name baby_steps - * - * This helper expands the original net-snmp set modes into the newer, finer - * grained modes. - * - * @{ */ - - typedef struct netsnmp_baby_steps_modes_s { - u_int registered; - u_int completed; - } netsnmp_baby_steps_modes; - -void netsnmp_baby_steps_init(void); - -netsnmp_mib_handler *netsnmp_baby_steps_handler_get(u_long modes); - -/** @} */ - - -/** @name access_multiplexer - * - * This helper calls individual access methods based on the mode. All - * access methods share the same handler, and the same myvoid pointer. - * If you need individual myvoid pointers, check out the multiplexer - * handler (though it currently only works for traditional modes). - * - * @{ */ - -/** @struct netsnmp_mib_handler_access_methods - * Defines the access methods to be called by the access_multiplexer helper - */ -typedef struct netsnmp_baby_steps_access_methods_s { - - /* - * baby step modes - */ - Netsnmp_Node_Handler *pre_request; - Netsnmp_Node_Handler *object_lookup; - Netsnmp_Node_Handler *get_values; - Netsnmp_Node_Handler *object_syntax_checks; - Netsnmp_Node_Handler *row_creation; - Netsnmp_Node_Handler *undo_setup; - Netsnmp_Node_Handler *set_values; - Netsnmp_Node_Handler *consistency_checks; - Netsnmp_Node_Handler *commit; - Netsnmp_Node_Handler *undo_sets; - Netsnmp_Node_Handler *undo_cleanup; - Netsnmp_Node_Handler *undo_commit; - Netsnmp_Node_Handler *irreversible_commit; - Netsnmp_Node_Handler *post_request; - - void *my_access_void; - -} netsnmp_baby_steps_access_methods; - - netsnmp_mib_handler * netsnmp_baby_steps_access_multiplexer_get( - netsnmp_baby_steps_access_methods *); - - int netsnmp_baby_step_mode2flag( u_int mode ); - -/** @} */ - - -/** backwards compatability. don't use in new code */ -#define netsnmp_get_baby_steps_handler netsnmp_baby_steps_handler_get -#define netsnmp_init_baby_steps_helper netsnmp_baby_steps_handler_init - - -#ifdef __cplusplus -} -#endif -#endif /* baby_steps */ diff --git a/utils/net-snmp/agent/bulk_to_next.h b/utils/net-snmp/agent/bulk_to_next.h deleted file mode 100644 index b578da580..000000000 --- a/utils/net-snmp/agent/bulk_to_next.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * bulk_to_next.h - */ -#ifndef BULK_TO_NEXT_H -#define BULK_TO_NEXT_H - -#ifdef __cplusplus -extern "C" { -#endif - - -/* - * The helper merely intercepts GETBULK requests and converts them to - * * GETNEXT reequests. - */ - - -netsnmp_mib_handler *netsnmp_get_bulk_to_next_handler(void); -void netsnmp_init_bulk_to_next_helper(void); -void netsnmp_bulk_to_next_fix_requests(netsnmp_request_info - *requests); - -Netsnmp_Node_Handler netsnmp_bulk_to_next_helper; - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/agent/cache_handler.h b/utils/net-snmp/agent/cache_handler.h deleted file mode 100644 index dbb07c22d..000000000 --- a/utils/net-snmp/agent/cache_handler.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef NETSNMP_CACHE_HANDLER_H -#define NETSNMP_CACHE_HANDLER_H - -/* - * This caching helper provides a generalised (SNMP-manageable) caching - * mechanism. Individual SNMP table and scalar/scalar group MIB - * implementations can use data caching in a consistent manner, without - * needing to handle the generic caching details themselves. - */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define CACHE_NAME "cache_info" - - typedef struct netsnmp_cache_s netsnmp_cache; - - typedef int (NetsnmpCacheLoad)(netsnmp_cache *, void*); - typedef void (NetsnmpCacheFree)(netsnmp_cache *, void*); - - struct netsnmp_cache_s { - /* - * For operation of the data caches - */ - int flags; - int enabled; - int valid; - char expired; - int timeout; /* Length of time the cache is valid (in s) */ - marker_t timestamp; /* When the cache was last loaded */ - u_long timer_id; /* periodic timer id */ - - NetsnmpCacheLoad *load_cache; - NetsnmpCacheFree *free_cache; - - /* - * void pointer for the user that created the cache. - * You never know when it might not come in useful .... - */ - void *magic; - - /* - * hint from the cache helper - */ - void *cache_hint; - - /* - * For SNMP-management of the data caches - */ - netsnmp_cache *next, *prev; - oid *rootoid; - int rootoid_len; - }; - - - void netsnmp_cache_reqinfo_insert(netsnmp_cache* cache, - netsnmp_agent_request_info * reqinfo, - const char *name); - netsnmp_cache * - netsnmp_cache_reqinfo_extract(netsnmp_agent_request_info * reqinfo, - const char *name); - netsnmp_cache* netsnmp_extract_cache_info(netsnmp_agent_request_info *); - - int netsnmp_cache_check_and_reload(netsnmp_cache * cache); - int netsnmp_cache_check_expired(netsnmp_cache *cache); - int netsnmp_cache_is_valid( netsnmp_agent_request_info *, - const char *name); - /** for backwards compat */ - int netsnmp_is_cache_valid( netsnmp_agent_request_info *); - netsnmp_mib_handler *netsnmp_get_cache_handler(int, NetsnmpCacheLoad *, - NetsnmpCacheFree *, - oid*, int); - int netsnmp_register_cache_handler(netsnmp_handler_registration *reginfo, - int, NetsnmpCacheLoad *, - NetsnmpCacheFree *); - - Netsnmp_Node_Handler netsnmp_cache_helper_handler; - - netsnmp_cache * - netsnmp_cache_create(int timeout, NetsnmpCacheLoad * load_hook, - NetsnmpCacheFree * free_hook, - oid * rootoid, int rootoid_len); - netsnmp_mib_handler * - netsnmp_cache_handler_get(netsnmp_cache* cache); - - netsnmp_cache * netsnmp_cache_find_by_oid(oid * rootoid, - int rootoid_len); - - unsigned int netsnmp_cache_timer_start(netsnmp_cache *cache); - void netsnmp_cache_timer_stop(netsnmp_cache *cache); - -/* - * Flags affecting cache handler operation - */ -#define NETSNMP_CACHE_DONT_INVALIDATE_ON_SET 0x0001 -#define NETSNMP_CACHE_DONT_FREE_BEFORE_LOAD 0x0002 -#define NETSNMP_CACHE_DONT_FREE_EXPIRED 0x0004 -#define NETSNMP_CACHE_DONT_AUTO_RELEASE 0x0008 -#define NETSNMP_CACHE_PRELOAD 0x0010 -#define NETSNMP_CACHE_AUTO_RELOAD 0x0020 - -#define NETSNMP_CACHE_HINT_HANDLER_ARGS 0x1000 - - -#ifdef __cplusplus -} -#endif -#endif /* NETSNMP_CACHE_HANDLER_H */ diff --git a/utils/net-snmp/agent/debug_handler.h b/utils/net-snmp/agent/debug_handler.h deleted file mode 100644 index 0d612db96..000000000 --- a/utils/net-snmp/agent/debug_handler.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef DEBUG_HANDLER_H -#define DEBUG_HANDLER_H - -#ifdef __cplusplus -extern "C" { -#endif - -netsnmp_mib_handler *netsnmp_get_debug_handler(void); -void netsnmp_init_debug_helper(void); - -Netsnmp_Node_Handler netsnmp_debug_helper; - -#ifdef __cplusplus -} -#endif -#endif /* DEBUG_HANDLER_H */ diff --git a/utils/net-snmp/agent/ds_agent.h b/utils/net-snmp/agent/ds_agent.h deleted file mode 100644 index 484fbda85..000000000 --- a/utils/net-snmp/agent/ds_agent.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef NETSNMP_DS_AGENT_H -#define NETSNMP_DS_AGENT_H -/* - * defines agent's default store registrations - */ - -/* - * booleans - */ -#define NETSNMP_DS_AGENT_VERBOSE 0 /* 1 if verbose output desired */ -#define NETSNMP_DS_AGENT_ROLE 1 /* 0 if master, 1 if client */ -#define NETSNMP_DS_AGENT_NO_ROOT_ACCESS 2 /* 1 if we can't get root access */ -#define NETSNMP_DS_AGENT_AGENTX_MASTER 3 /* 1 if AgentX desired */ -#define NETSNMP_DS_AGENT_QUIT_IMMEDIATELY 4 /* 1 to never start the agent */ -#define NETSNMP_DS_AGENT_DISABLE_PERL 5 /* 1 to never enable perl */ -#define NETSNMP_DS_AGENT_NO_CONNECTION_WARNINGS 6 /* 1 = !see !connect msgs */ -#define NETSNMP_DS_AGENT_LEAVE_PIDFILE 7 /* 1 = leave PID file on exit */ -#define NETSNMP_DS_AGENT_NO_CACHING 8 /* 1 = disable netsnmp_cache */ - -/* - * strings - */ -#define NETSNMP_DS_AGENT_PROGNAME 0 /* argv[0] */ -#define NETSNMP_DS_AGENT_X_SOCKET 1 /* AF_UNIX or ip:port socket addr */ -#define NETSNMP_DS_AGENT_PORTS 2 /* localhost:9161,tcp:localhost:9161... */ -#define NETSNMP_DS_AGENT_INTERNAL_SECNAME 3 /* used by disman/mteTriggerTable. */ -#define NETSNMP_DS_AGENT_PERL_INIT_FILE 4 /* used by embedded perl */ -#define NETSNMP_DS_SMUX_SOCKET 5 /* ip:port socket addr */ - -/* - * integers - */ -#define NETSNMP_DS_AGENT_FLAGS 0 /* session.flags */ -#define NETSNMP_DS_AGENT_USERID 1 -#define NETSNMP_DS_AGENT_GROUPID 2 -#define NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL 3 /* ping master every SECONDS */ -#define NETSNMP_DS_AGENT_AGENTX_TIMEOUT 4 -#define NETSNMP_DS_AGENT_AGENTX_RETRIES 5 -#define NETSNMP_DS_AGENT_X_SOCK_PERM 6 /* permissions for the */ -#define NETSNMP_DS_AGENT_X_DIR_PERM 7 /* AgentX socket */ -#define NETSNMP_DS_AGENT_X_SOCK_USER 8 /* ownership for the */ -#define NETSNMP_DS_AGENT_X_SOCK_GROUP 9 /* AgentX socket */ -#define NETSNMP_DS_AGENT_CACHE_TIMEOUT 10 /* default cache timeout */ - -#endif diff --git a/utils/net-snmp/agent/instance.h b/utils/net-snmp/agent/instance.h deleted file mode 100644 index 7b60d4b3f..000000000 --- a/utils/net-snmp/agent/instance.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * testhandler.h - */ -#ifndef NETSNMP_INSTANCE_H -#define NETSNMP_INSTANCE_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The instance helper is designed to simplify the task of adding simple - * * instances to the mib tree. - */ - -/* - * GETNEXTs are auto-converted to a GET. - * * non-valid GETs are dropped. - * * The client can assume that if you're called for a GET, it shouldn't - * * have to check the oid at all. Just answer. - */ - -int netsnmp_register_instance(netsnmp_handler_registration - *reginfo); -int -netsnmp_register_read_only_instance(netsnmp_handler_registration *reginfo); - -#define INSTANCE_HANDLER_NAME "instance" - -netsnmp_mib_handler *netsnmp_get_instance_handler(void); - -int netsnmp_register_read_only_ulong_instance(const char *name, - oid * reg_oid, - size_t - reg_oid_len, - u_long * it, - Netsnmp_Node_Handler - * subhandler); -int netsnmp_register_ulong_instance(const char *name, - oid * reg_oid, - size_t reg_oid_len, - u_long * it, - Netsnmp_Node_Handler * - subhandler); -int netsnmp_register_read_only_counter32_instance(const char - *name, - oid * - reg_oid, - size_t - reg_oid_len, - u_long * it, - Netsnmp_Node_Handler - * - subhandler); -int netsnmp_register_read_only_long_instance(const char *name, - oid * reg_oid, - size_t - reg_oid_len, - long *it, - Netsnmp_Node_Handler - * subhandler); -int netsnmp_register_long_instance(const char *name, - oid * reg_oid, - size_t reg_oid_len, - long *it, - Netsnmp_Node_Handler * - subhandler); - -int netsnmp_register_read_only_int_instance(const char *name, - oid * reg_oid, - size_t reg_oid_len, int *it, - Netsnmp_Node_Handler * - subhandler); - -int netsnmp_register_int_instance(const char *name, - oid * reg_oid, - size_t reg_oid_len, int *it, - Netsnmp_Node_Handler * - subhandler); - -/* identical functions that register a in a particular context */ -int netsnmp_register_read_only_ulong_instance_context(const char *name, - oid * reg_oid, - size_t - reg_oid_len, - u_long * it, - Netsnmp_Node_Handler - * subhandler, - const char *contextName); -int netsnmp_register_ulong_instance_context(const char *name, - oid * reg_oid, - size_t reg_oid_len, - u_long * it, - Netsnmp_Node_Handler * - subhandler, - const char *contextName); -int netsnmp_register_read_only_counter32_instance_context(const char - *name, - oid * - reg_oid, - size_t - reg_oid_len, - u_long * it, - Netsnmp_Node_Handler - * - subhandler, - const char *contextName); -int netsnmp_register_read_only_long_instance_context(const char *name, - oid * reg_oid, - size_t - reg_oid_len, - long *it, - Netsnmp_Node_Handler - * subhandler, - const char *contextName); -int netsnmp_register_long_instance_context(const char *name, - oid * reg_oid, - size_t reg_oid_len, - long *it, - Netsnmp_Node_Handler * - subhandler, - const char *contextName); - -int netsnmp_register_read_only_int_instance_context(const char *name, - oid * reg_oid, - size_t reg_oid_len, int *it, - Netsnmp_Node_Handler * - subhandler, - const char *contextName); - -int netsnmp_register_int_instance_context(const char *name, - oid * reg_oid, - size_t reg_oid_len, int *it, - Netsnmp_Node_Handler * - subhandler, - const char *contextName); - -Netsnmp_Node_Handler netsnmp_instance_helper_handler; -Netsnmp_Node_Handler netsnmp_instance_ulong_handler; -Netsnmp_Node_Handler netsnmp_instance_long_handler; -Netsnmp_Node_Handler netsnmp_instance_int_handler; -Netsnmp_Node_Handler netsnmp_instance_counter32_handler; - -#ifdef __cplusplus -} -#endif - -#endif /** NETSNMP_INSTANCE_H */ diff --git a/utils/net-snmp/agent/mfd.h b/utils/net-snmp/agent/mfd.h deleted file mode 100644 index 123d3571e..000000000 --- a/utils/net-snmp/agent/mfd.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * MIBs For Dummies header - * - * $Id: mfd.h,v 1.3.2.1 2004/12/10 14:50:38 rstory Exp $ - */ -#ifndef NETSNMP_MFD_H -#define NETSNMP_MFD_H - -/*********************************************************************** - * - * return codes - * - **********************************************************************/ - -/*---------------------------------------------------------------------- - * general success/failure - */ -#define MFD_SUCCESS SNMP_ERR_NOERROR -#define MFD_ERROR SNMP_ERR_GENERR - -/* - * object not currently available - */ -#define MFD_SKIP SNMP_NOSUCHINSTANCE - -/* - * no more data in table (get-next) - */ -#define MFD_END_OF_DATA SNMP_ENDOFMIBVIEW - -/*---------------------------------------------------------------------- - * set processing errors - */ -/* - * row creation errors - */ -#define MFD_CANNOT_CREATE_NOW SNMP_ERR_INCONSISTENTNAME -#define MFD_CANNOT_CREATE_EVER SNMP_ERR_NOCREATION - -/* - * not writable or resource unavailable - */ -#define MFD_NOT_WRITABLE SNMP_ERR_NOTWRITABLE -#define MFD_RESOURCE_UNAVAILABLE SNMP_ERR_RESOURCEUNAVAILABLE - -/* - * new value errors - */ -#define MFD_NOT_VALID_NOW SNMP_ERR_INCONSISTENTVALUE -#define MFD_NOT_VALID_EVER SNMP_ERR_WRONGVALUE - - -/*********************************************************************** - * - * rowreq flags - * - **********************************************************************/ - -/*---------------------------------------------------------------------- - * 8 flags resevered for the user - */ -#define MFD_ROW_FLAG_USER_1 0x00000001 /* user flag 1 */ -#define MFD_ROW_FLAG_USER_2 0x00000002 /* user flag 1 */ -#define MFD_ROW_FLAG_USER_3 0x00000004 /* user flag 1 */ -#define MFD_ROW_FLAG_USER_4 0x00000008 /* user flag 1 */ -#define MFD_ROW_FLAG_USER_5 0x00000010 /* user flag 1 */ -#define MFD_ROW_FLAG_USER_6 0x00000020 /* user flag 1 */ -#define MFD_ROW_FLAG_USER_7 0x00000040 /* user flag 1 */ -#define MFD_ROW_FLAG_USER_8 0x00000080 /* user flag 1 */ - -/*---------------------------------------------------------------------- - * MFD flags - * - * grow left to right, in case we want to add more user flags later - */ -#define MFD_ROW_CREATED 0x80000000 /* newly created row */ -#define MFD_ROW_DATA_FROM_USER 0x40000000 /* we didn't allocate data */ -#define MFD_ROW_DELETED 0x20000000 /* deleted row */ - - -#endif /* NETSNMP_MFD_H */ diff --git a/utils/net-snmp/agent/mib_module_config.h b/utils/net-snmp/agent/mib_module_config.h deleted file mode 100644 index 8e5e83810..000000000 --- a/utils/net-snmp/agent/mib_module_config.h +++ /dev/null @@ -1,220 +0,0 @@ -/* This file is automatically generated by configure. Do not modify by hand. */ -/* Define if compiling with the mibII module files. */ -#define USING_MIBII_MODULE 1 - -/* Define if compiling with the ucd_snmp module files. */ -#define USING_UCD_SNMP_MODULE 1 - -/* Define if compiling with the snmpv3mibs module files. */ -#define USING_SNMPV3MIBS_MODULE 1 - -/* Define if compiling with the notification module files. */ -#define USING_NOTIFICATION_MODULE 1 - -/* Define if compiling with the target module files. */ -#define USING_TARGET_MODULE 1 - -/* Define if compiling with the agent_mibs module files. */ -#define USING_AGENT_MIBS_MODULE 1 - -/* Define if compiling with the agentx module files. */ -#define USING_AGENTX_MODULE 1 - -/* Define if compiling with the utilities module files. */ -#define USING_UTILITIES_MODULE 1 - -/* Define if compiling with the disman/event-mib module files. */ -#define USING_DISMAN_EVENT_MIB_MODULE 1 - -/* Define if compiling with the mibII/system_mib module files. */ -#define USING_MIBII_SYSTEM_MIB_MODULE 1 - -/* Define if compiling with the mibII/sysORTable module files. */ -#define USING_MIBII_SYSORTABLE_MODULE 1 - -/* Define if compiling with the mibII/at module files. */ -#define USING_MIBII_AT_MODULE 1 - -/* Define if compiling with the mibII/interfaces module files. */ -#define USING_MIBII_INTERFACES_MODULE 1 - -/* Define if compiling with the mibII/ip module files. */ -#define USING_MIBII_IP_MODULE 1 - -/* Define if compiling with the mibII/snmp_mib module files. */ -#define USING_MIBII_SNMP_MIB_MODULE 1 - -/* Define if compiling with the mibII/tcp module files. */ -#define USING_MIBII_TCP_MODULE 1 - -/* Define if compiling with the mibII/icmp module files. */ -#define USING_MIBII_ICMP_MODULE 1 - -/* Define if compiling with the mibII/udp module files. */ -#define USING_MIBII_UDP_MODULE 1 - -/* Define if compiling with the mibII/vacm_vars module files. */ -#define USING_MIBII_VACM_VARS_MODULE 1 - -/* Define if compiling with the mibII/setSerialNo module files. */ -#define USING_MIBII_SETSERIALNO_MODULE 1 - -/* Define if compiling with the ucd-snmp/memory module files. */ -#define USING_UCD_SNMP_MEMORY_MODULE 1 - -/* Define if compiling with the ucd-snmp/vmstat module files. */ -#define USING_UCD_SNMP_VMSTAT_MODULE 1 - -/* Define if compiling with the ucd-snmp/proc module files. */ -#define USING_UCD_SNMP_PROC_MODULE 1 - -/* Define if compiling with the ucd-snmp/versioninfo module files. */ -#define USING_UCD_SNMP_VERSIONINFO_MODULE 1 - -/* Define if compiling with the ucd-snmp/pass module files. */ -#define USING_UCD_SNMP_PASS_MODULE 1 - -/* Define if compiling with the ucd-snmp/pass_persist module files. */ -#define USING_UCD_SNMP_PASS_PERSIST_MODULE 1 - -/* Define if compiling with the ucd-snmp/disk module files. */ -#define USING_UCD_SNMP_DISK_MODULE 1 - -/* Define if compiling with the ucd-snmp/loadave module files. */ -#define USING_UCD_SNMP_LOADAVE_MODULE 1 - -/* Define if compiling with the ucd-snmp/extensible module files. */ -#define USING_UCD_SNMP_EXTENSIBLE_MODULE 1 - -/* Define if compiling with the agent/extend module files. */ -#define USING_AGENT_EXTEND_MODULE 1 - -/* Define if compiling with the ucd-snmp/errormib module files. */ -#define USING_UCD_SNMP_ERRORMIB_MODULE 1 - -/* Define if compiling with the ucd-snmp/file module files. */ -#define USING_UCD_SNMP_FILE_MODULE 1 - -/* Define if compiling with the ucd-snmp/dlmod module files. */ -#define USING_UCD_SNMP_DLMOD_MODULE 1 - -/* Define if compiling with the ucd-snmp/proxy module files. */ -#define USING_UCD_SNMP_PROXY_MODULE 1 - -/* Define if compiling with the ucd-snmp/logmatch module files. */ -#define USING_UCD_SNMP_LOGMATCH_MODULE 1 - -/* Define if compiling with the snmpv3/snmpEngine module files. */ -#define USING_SNMPV3_SNMPENGINE_MODULE 1 - -/* Define if compiling with the snmpv3/snmpMPDStats module files. */ -#define USING_SNMPV3_SNMPMPDSTATS_MODULE 1 - -/* Define if compiling with the snmpv3/usmStats module files. */ -#define USING_SNMPV3_USMSTATS_MODULE 1 - -/* Define if compiling with the snmpv3/usmUser module files. */ -#define USING_SNMPV3_USMUSER_MODULE 1 - -/* Define if compiling with the notification/snmpNotifyTable module files. */ -#define USING_NOTIFICATION_SNMPNOTIFYTABLE_MODULE 1 - -/* Define if compiling with the notification/snmpNotifyFilterTable module files. */ -#define USING_NOTIFICATION_SNMPNOTIFYFILTERTABLE_MODULE 1 - -/* Define if compiling with the notification/snmpNotifyFilterProfileTable module files. */ -#define USING_NOTIFICATION_SNMPNOTIFYFILTERPROFILETABLE_MODULE 1 - -/* Define if compiling with the target/snmpTargetAddrEntry module files. */ -#define USING_TARGET_SNMPTARGETADDRENTRY_MODULE 1 - -/* Define if compiling with the target/snmpTargetParamsEntry module files. */ -#define USING_TARGET_SNMPTARGETPARAMSENTRY_MODULE 1 - -/* Define if compiling with the target/target module files. */ -#define USING_TARGET_TARGET_MODULE 1 - -/* Define if compiling with the target/target_counters module files. */ -#define USING_TARGET_TARGET_COUNTERS_MODULE 1 - -/* Define if compiling with the agent/nsTransactionTable module files. */ -#define USING_AGENT_NSTRANSACTIONTABLE_MODULE 1 - -/* Define if compiling with the agent/nsModuleTable module files. */ -#define USING_AGENT_NSMODULETABLE_MODULE 1 - -/* Define if compiling with the agent/nsDebug module files. */ -#define USING_AGENT_NSDEBUG_MODULE 1 - -/* Define if compiling with the agent/nsCache module files. */ -#define USING_AGENT_NSCACHE_MODULE 1 - -/* Define if compiling with the agent/nsLogging module files. */ -#define USING_AGENT_NSLOGGING_MODULE 1 - -/* Define if compiling with the utilities/override module files. */ -#define USING_UTILITIES_OVERRIDE_MODULE 1 - -/* Define if compiling with the disman/mteTriggerTable module files. */ -#define USING_DISMAN_MTETRIGGERTABLE_MODULE 1 - -/* Define if compiling with the disman/mteTriggerDeltaTable module files. */ -#define USING_DISMAN_MTETRIGGERDELTATABLE_MODULE 1 - -/* Define if compiling with the disman/mteTriggerExistenceTable module files. */ -#define USING_DISMAN_MTETRIGGEREXISTENCETABLE_MODULE 1 - -/* Define if compiling with the disman/mteTriggerBooleanTable module files. */ -#define USING_DISMAN_MTETRIGGERBOOLEANTABLE_MODULE 1 - -/* Define if compiling with the disman/mteTriggerThresholdTable module files. */ -#define USING_DISMAN_MTETRIGGERTHRESHOLDTABLE_MODULE 1 - -/* Define if compiling with the disman/mteObjectsTable module files. */ -#define USING_DISMAN_MTEOBJECTSTABLE_MODULE 1 - -/* Define if compiling with the disman/mteEventTable module files. */ -#define USING_DISMAN_MTEEVENTTABLE_MODULE 1 - -/* Define if compiling with the disman/mteEventNotificationTable module files. */ -#define USING_DISMAN_MTEEVENTNOTIFICATIONTABLE_MODULE 1 - -/* Define if compiling with the util_funcs module files. */ -#define USING_UTIL_FUNCS_MODULE 1 - -/* Define if compiling with the if-mib/data_access/interface module files. */ -#define USING_IF_MIB_DATA_ACCESS_INTERFACE_MODULE 1 - -/* Define if compiling with the mibII/var_route module files. */ -#define USING_MIBII_VAR_ROUTE_MODULE 1 - -/* Define if compiling with the mibII/kernel_linux module files. */ -#define USING_MIBII_KERNEL_LINUX_MODULE 1 - -/* Define if compiling with the mibII/ipAddr module files. */ -#define USING_MIBII_IPADDR_MODULE 1 - -/* Define if compiling with the mibII/route_write module files. */ -#define USING_MIBII_ROUTE_WRITE_MODULE 1 - -/* Define if compiling with the mibII/tcpTable module files. */ -#define USING_MIBII_TCPTABLE_MODULE 1 - -/* Define if compiling with the mibII/udpTable module files. */ -#define USING_MIBII_UDPTABLE_MODULE 1 - -/* Define if compiling with the mibII/vacm_context module files. */ -#define USING_MIBII_VACM_CONTEXT_MODULE 1 - -/* Define if compiling with the header_complex module files. */ -#define USING_HEADER_COMPLEX_MODULE 1 - -/* Define if compiling with the if-mib/data_access/interface_common module files. */ -#define USING_IF_MIB_DATA_ACCESS_INTERFACE_COMMON_MODULE 1 - -/* Define if compiling with the if-mib/data_access/interface_linux module files. */ -#define USING_IF_MIB_DATA_ACCESS_INTERFACE_LINUX_MODULE 1 - -/* Define if compiling with the if-mib/data_access/interface_ioctl module files. */ -#define USING_IF_MIB_DATA_ACCESS_INTERFACE_IOCTL_MODULE 1 - diff --git a/utils/net-snmp/agent/mib_module_includes.h b/utils/net-snmp/agent/mib_module_includes.h deleted file mode 100644 index a186515a4..000000000 --- a/utils/net-snmp/agent/mib_module_includes.h +++ /dev/null @@ -1,72 +0,0 @@ -/* This file is automatically generated by configure. Do not modify by hand. */ -#include "mibgroup/mibII.h" -#include "mibgroup/ucd_snmp.h" -#include "mibgroup/snmpv3mibs.h" -#include "mibgroup/notification.h" -#include "mibgroup/target.h" -#include "mibgroup/agent_mibs.h" -#include "mibgroup/agentx.h" -#include "mibgroup/utilities.h" -#include "mibgroup/disman/event-mib.h" -#include "mibgroup/mibII/system_mib.h" -#include "mibgroup/mibII/sysORTable.h" -#include "mibgroup/mibII/at.h" -#include "mibgroup/mibII/interfaces.h" -#include "mibgroup/mibII/ip.h" -#include "mibgroup/mibII/snmp_mib.h" -#include "mibgroup/mibII/tcp.h" -#include "mibgroup/mibII/icmp.h" -#include "mibgroup/mibII/udp.h" -#include "mibgroup/mibII/vacm_vars.h" -#include "mibgroup/mibII/setSerialNo.h" -#include "mibgroup/ucd-snmp/memory.h" -#include "mibgroup/ucd-snmp/vmstat.h" -#include "mibgroup/ucd-snmp/proc.h" -#include "mibgroup/ucd-snmp/versioninfo.h" -#include "mibgroup/ucd-snmp/pass.h" -#include "mibgroup/ucd-snmp/pass_persist.h" -#include "mibgroup/ucd-snmp/disk.h" -#include "mibgroup/ucd-snmp/loadave.h" -#include "mibgroup/ucd-snmp/extensible.h" -#include "mibgroup/agent/extend.h" -#include "mibgroup/ucd-snmp/errormib.h" -#include "mibgroup/ucd-snmp/file.h" -#include "mibgroup/ucd-snmp/dlmod.h" -#include "mibgroup/ucd-snmp/proxy.h" -#include "mibgroup/ucd-snmp/logmatch.h" -#include "mibgroup/snmpv3/snmpEngine.h" -#include "mibgroup/snmpv3/snmpMPDStats.h" -#include "mibgroup/snmpv3/usmStats.h" -#include "mibgroup/snmpv3/usmUser.h" -#include "mibgroup/notification/snmpNotifyTable.h" -#include "mibgroup/notification/snmpNotifyFilterTable.h" -#include "mibgroup/notification/snmpNotifyFilterProfileTable.h" -#include "mibgroup/target/snmpTargetAddrEntry.h" -#include "mibgroup/target/snmpTargetParamsEntry.h" -#include "mibgroup/target/target.h" -#include "mibgroup/target/target_counters.h" -#include "mibgroup/agent/nsTransactionTable.h" -#include "mibgroup/agent/nsModuleTable.h" -#include "mibgroup/agent/nsDebug.h" -#include "mibgroup/agent/nsCache.h" -#include "mibgroup/agent/nsLogging.h" -#include "mibgroup/utilities/override.h" -#include "mibgroup/disman/mteTriggerTable.h" -#include "mibgroup/disman/mteTriggerDeltaTable.h" -#include "mibgroup/disman/mteTriggerExistenceTable.h" -#include "mibgroup/disman/mteTriggerBooleanTable.h" -#include "mibgroup/disman/mteTriggerThresholdTable.h" -#include "mibgroup/disman/mteObjectsTable.h" -#include "mibgroup/disman/mteEventTable.h" -#include "mibgroup/disman/mteEventNotificationTable.h" -#include "mibgroup/util_funcs.h" -#include "mibgroup/if-mib/data_access/interface.h" -#include "mibgroup/mibII/var_route.h" -#include "mibgroup/mibII/kernel_linux.h" -#include "mibgroup/mibII/ipAddr.h" -#include "mibgroup/mibII/route_write.h" -#include "mibgroup/mibII/tcpTable.h" -#include "mibgroup/mibII/udpTable.h" -#include "mibgroup/mibII/vacm_context.h" -#include "mibgroup/header_complex.h" -#include "mibgroup/if-mib/data_access/interface_ioctl.h" diff --git a/utils/net-snmp/agent/mib_modules.h b/utils/net-snmp/agent/mib_modules.h deleted file mode 100644 index 7003a1106..000000000 --- a/utils/net-snmp/agent/mib_modules.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef MIB_MODULES_H -#define MIB_MODULES_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define DO_INITIALIZE 1 -#define DONT_INITIALIZE 0 - -struct module_init_list { - char *module_name; - struct module_init_list *next; -}; - -void add_to_init_list(char *module_list); -int should_init(const char *module_name); -void init_mib_modules(void); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/agent/mode_end_call.h b/utils/net-snmp/agent/mode_end_call.h deleted file mode 100644 index eb56d0a2c..000000000 --- a/utils/net-snmp/agent/mode_end_call.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * mode_end_call.h - */ -#ifndef MODE_END_CALL_H -#define MODE_END_CALL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define NETSNMP_MODE_END_ALL_MODES -999 - -typedef struct netsnmp_mode_handler_list_s { - struct netsnmp_mode_handler_list_s *next; - int mode; - netsnmp_mib_handler *callback_handler; -} netsnmp_mode_handler_list; - -/* - * The helper calls another handler after each mode has been - * processed. - */ - -/* public functions */ -netsnmp_mib_handler * -netsnmp_get_mode_end_call_handler(netsnmp_mode_handler_list *endlist); - -netsnmp_mode_handler_list * -netsnmp_mode_end_call_add_mode_callback(netsnmp_mode_handler_list *endlist, - int mode, - netsnmp_mib_handler *callbackh); - -/* internal */ -Netsnmp_Node_Handler netsnmp_mode_end_call_helper; - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/agent/multiplexer.h b/utils/net-snmp/agent/multiplexer.h deleted file mode 100644 index 2bbb7b1aa..000000000 --- a/utils/net-snmp/agent/multiplexer.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef NETSNMP_MULTIPLEXER_H -#define NETSNMP_MULTIPLEXER_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The multiplexer helper - */ - -/** @name multiplexer - * @{ */ - -/** @struct netsnmp_mib_handler_methods - * Defines the subhandlers to be called by the multiplexer helper - */ -typedef struct netsnmp_mib_handler_methods_s { - /** called when a GET request is received */ - netsnmp_mib_handler *get_handler; - /** called when a GETNEXT request is received */ - netsnmp_mib_handler *getnext_handler; - /** called when a GETBULK request is received */ - netsnmp_mib_handler *getbulk_handler; - /** called when a SET request is received */ - netsnmp_mib_handler *set_handler; -} netsnmp_mib_handler_methods; - -/** @} */ - -netsnmp_mib_handler - *netsnmp_get_multiplexer_handler(netsnmp_mib_handler_methods *); - -Netsnmp_Node_Handler netsnmp_multiplexer_helper_handler; - -#ifdef __cplusplus -} -#endif -#endif /* NETSNMP_MULTIPLEXER_H */ diff --git a/utils/net-snmp/agent/net-snmp-agent-includes.h b/utils/net-snmp/agent/net-snmp-agent-includes.h deleted file mode 100644 index a5db21d94..000000000 --- a/utils/net-snmp/agent/net-snmp-agent-includes.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * A simple helpful wrapper to include lots of agent specific include - * * files for people wanting to embed and snmp agent into an external - * * application - */ -#ifndef NET_SNMP_AGENT_INCLUDES_H -#define NET_SNMP_AGENT_INCLUDES_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#endif /* NET_SNMP_AGENT_INCLUDES_H */ diff --git a/utils/net-snmp/agent/null.h b/utils/net-snmp/agent/null.h deleted file mode 100644 index f24a0b467..000000000 --- a/utils/net-snmp/agent/null.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef AGENT_NULL_H -#define AGENT_NULL_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * null.h - */ - -/* - * literally does nothing and is used as a final handler for - * "do-nothing" nodes that must exist solely for mib tree storage - * usage.. - */ - -int netsnmp_register_null(oid *, size_t); -int netsnmp_register_null_context(oid *, size_t, const char *contextName); - -Netsnmp_Node_Handler netsnmp_null_handler; - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/agent/old_api.h b/utils/net-snmp/agent/old_api.h deleted file mode 100644 index 06ec44986..000000000 --- a/utils/net-snmp/agent/old_api.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef OLD_API_H -#define OLD_API_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define OLD_API_NAME "old_api" - -typedef struct netsnmp_old_api_info_s { - struct variable *var; - size_t varsize; - size_t numvars; - - /* - * old stuff - */ - netsnmp_session *ss; - int flags; -} netsnmp_old_api_info; - -typedef struct old_opi_cache_s { - u_char *data; - WriteMethod *write_method; -} netsnmp_old_api_cache; - -int netsnmp_register_old_api(const char *moduleName, - struct variable *var, - size_t varsize, - size_t numvars, - oid * mibloc, - size_t mibloclen, - int priority, - int range_subid, - oid range_ubound, - netsnmp_session * ss, - const char *context, - int timeout, int flags); -Netsnmp_Node_Handler netsnmp_old_api_helper; - -/* - * really shouldn't be used - */ -netsnmp_agent_session *netsnmp_get_current_agent_session(void); - -#ifdef __cplusplus -} -#endif -#endif /* OLD_API_H */ diff --git a/utils/net-snmp/agent/read_only.h b/utils/net-snmp/agent/read_only.h deleted file mode 100644 index 41635b0e2..000000000 --- a/utils/net-snmp/agent/read_only.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef READ_ONLY_H -#define READ_ONLY_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * read_only.h - */ - -/* - * The helper merely intercepts SET requests and handles them early on - * making everything read-only (no SETs are actually permitted). - * Useful as a helper to handlers that are implementing MIBs with no - * SET support. - */ - - -netsnmp_mib_handler *netsnmp_get_read_only_handler(void); -void netsnmp_init_read_only_helper(void); - -Netsnmp_Node_Handler netsnmp_read_only_helper; - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/agent/row_merge.h b/utils/net-snmp/agent/row_merge.h deleted file mode 100644 index a7c35db5e..000000000 --- a/utils/net-snmp/agent/row_merge.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef ROW_MERGE_H -#define ROW_MERGE_H - -/* - * This row_merge helper splits a whole bunch of requests into chunks - * based on the row index that they refer to, and passes all requests - * for a given row to the lower handlers. - */ - -#ifdef __cplusplus -extern "C" { -#endif - - netsnmp_mib_handler *netsnmp_get_row_merge_handler(int); - int netsnmp_register_row_merge(netsnmp_handler_registration *reginfo); - void netsnmp_init_row_merge(void); - - Netsnmp_Node_Handler netsnmp_row_merge_helper_handler; - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/agent/scalar.h b/utils/net-snmp/agent/scalar.h deleted file mode 100644 index 9af92cb10..000000000 --- a/utils/net-snmp/agent/scalar.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * scalar.h - */ -#ifndef NETSNMP_SCALAR_H -#define NETSNMP_SCALAR_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The scalar helper is designed to simplify the task of adding simple - * scalar objects to the mib tree. - */ - -/* - * GETNEXTs are auto-converted to a GET. - * * non-valid GETs are dropped. - * * The client can assume that if you're called for a GET, it shouldn't - * * have to check the oid at all. Just answer. - */ - -int netsnmp_register_scalar(netsnmp_handler_registration *reginfo); -int netsnmp_register_read_only_scalar(netsnmp_handler_registration *reginfo); - -#define SCALAR_HANDLER_NAME "scalar" - -netsnmp_mib_handler *netsnmp_get_scalar_handler(void); - -Netsnmp_Node_Handler netsnmp_scalar_helper_handler; - -#ifdef __cplusplus -} -#endif - -#endif /** NETSNMP_SCALAR_H */ diff --git a/utils/net-snmp/agent/scalar_group.h b/utils/net-snmp/agent/scalar_group.h deleted file mode 100644 index f4213371f..000000000 --- a/utils/net-snmp/agent/scalar_group.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * scalar.h - */ -#ifndef NETSNMP_SCALAR_GROUP_H -#define NETSNMP_SCALAR_GROUP_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The scalar group helper is designed to implement a group of - * scalar objects all in one go, making use of the scalar and - * instance helpers. - * - * GETNEXTs are auto-converted to a GET. Non-valid GETs are dropped. - * The client-provided handler just needs to check the OID name to - * see which object is being requested, but can otherwise assume that - * things are fine. - */ - -typedef struct netsnmp_scalar_group_s { - oid lbound; /* XXX - or do we need a more flexible arrangement? */ - oid ubound; -} netsnmp_scalar_group; - -int netsnmp_register_scalar_group(netsnmp_handler_registration *reginfo, - oid first, oid last); -netsnmp_mib_handler *netsnmp_get_scalar_group_handler(oid first, oid last); -Netsnmp_Node_Handler netsnmp_scalar_group_helper_handler; - -#ifdef __cplusplus -} -#endif - -#endif /** NETSNMP_SCALAR_GROUP_H */ diff --git a/utils/net-snmp/agent/serialize.h b/utils/net-snmp/agent/serialize.h deleted file mode 100644 index 08b38c13d..000000000 --- a/utils/net-snmp/agent/serialize.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SERIALIZE_H -#define SERIALIZE_H - -/* - * The serialized helper merely calls its clients multiple times for a - * * given request set, so they don't have to loop through the requests - * * themselves. - */ - -#ifdef __cplusplus -extern "C" { -#endif - - netsnmp_mib_handler *netsnmp_get_serialize_handler(void); - int netsnmp_register_serialize(netsnmp_handler_registration - *reginfo); - void netsnmp_init_serialize(void); - - Netsnmp_Node_Handler netsnmp_serialize_helper_handler; - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/agent/set_helper.h b/utils/net-snmp/agent/set_helper.h deleted file mode 100644 index 81d887ca8..000000000 --- a/utils/net-snmp/agent/set_helper.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef SET_HELPER_H -#define SET_HELPER_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct netsnmp_set_info_s { - int action; - void *stateRef; - - /* - * don't use yet: - */ - void **oldData; - int setCleanupFlags; /* XXX: client sets this to: */ -#define AUTO_FREE_STATEREF 0x01 /* calls free(stateRef) */ -#define AUTO_FREE_OLDDATA 0x02 /* calls free(*oldData) */ -#define AUTO_UNDO 0x04 /* ... */ -} netsnmp_set_info; - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/agent/snmp_agent.h b/utils/net-snmp/agent/snmp_agent.h deleted file mode 100644 index bbf2945db..000000000 --- a/utils/net-snmp/agent/snmp_agent.h +++ /dev/null @@ -1,305 +0,0 @@ -/* Portions of this file are subject to the following copyright(s). See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/* - * Portions of this file are copyrighted by: - * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ -/* - * @file snmp_agent.h - * - * @addtogroup agent - * @addtogroup table - * External definitions for functions and variables in snmp_agent.c. - * - * @{ - */ - -#ifndef SNMP_AGENT_H -#define SNMP_AGENT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#define SNMP_MAX_PDU_SIZE 64000 /* local constraint on PDU size sent by agent - * (see also SNMP_MAX_MSG_SIZE in snmp_api.h) */ - - /* - * If non-zero, causes the addresses of peers to be logged when receptions - * occur. - */ - - extern int log_addresses; - - /* - * How many ticks since we last aged the address cache entries. - */ - - extern int lastAddrAge; - - /** @typedef struct netsnmp_request_info_s netsnmp_request_info - * Typedefs the netsnmp_request_info_s struct into - * netsnmp_request_info*/ - /** @struct netsnmp_request_info_s - * The netsnmp request info structure. - */ - typedef struct netsnmp_request_info_s { - /** - * variable bindings - */ - netsnmp_variable_list *requestvb; - - /** - * can be used to pass information on a per-request basis from a - * helper to the later handlers - */ - netsnmp_data_list *parent_data; - - /* - * pointer to the agent_request_info for this request - */ - struct netsnmp_agent_request_info_s *agent_req_info; - - /** don't free, reference to (struct tree)->end */ - oid *range_end; - size_t range_end_len; - - /* - * flags - */ - int delegated; - int processed; - int inclusive; - - int status; - /** index in original pdu */ - int index; - - /** get-bulk */ - int repeat; - int orig_repeat; - netsnmp_variable_list *requestvb_start; - - /* internal use */ - struct netsnmp_request_info_s *next; - struct netsnmp_request_info_s *prev; - struct netsnmp_subtree_s *subtree; - } netsnmp_request_info; - - typedef struct netsnmp_set_info_s { - int action; - void *stateRef; - - /* - * don't use yet: - */ - void **oldData; - int setCleanupFlags; -#define AUTO_FREE_STATEREF 0x01 /* calls free(stateRef) */ -#define AUTO_FREE_OLDDATA 0x02 /* calls free(*oldData) */ -#define AUTO_UNDO 0x03 /* ... */ - } netsnmp_set_info; - - typedef struct netsnmp_tree_cache_s { - struct netsnmp_subtree_s *subtree; - netsnmp_request_info *requests_begin; - netsnmp_request_info *requests_end; - } netsnmp_tree_cache; - -#define MODE_GET SNMP_MSG_GET -#define MODE_GETNEXT SNMP_MSG_GETNEXT -#define MODE_GETBULK SNMP_MSG_GETBULK -#define MODE_GET_STASH SNMP_MSG_INTERNAL_GET_STASH -#define MODE_IS_GET(x) ((x >= 128) && (x != -1) && (x != SNMP_MSG_SET)) - /* #define MODE_IS_GET(x) ((x == SNMP_MSG_GET) || (x == SNMP_MSG_GETNEXT) || (x == SNMP_MSG_GETBULK) || (x == SNMP_MSG_INTERNAL_GET_STASH)) */ - -#define MODE_SET_BEGIN SNMP_MSG_INTERNAL_SET_BEGIN -#define MODE_SET_RESERVE1 SNMP_MSG_INTERNAL_SET_RESERVE1 -#define MODE_SET_RESERVE2 SNMP_MSG_INTERNAL_SET_RESERVE2 -#define MODE_SET_ACTION SNMP_MSG_INTERNAL_SET_ACTION -#define MODE_SET_COMMIT SNMP_MSG_INTERNAL_SET_COMMIT -#define MODE_SET_FREE SNMP_MSG_INTERNAL_SET_FREE -#define MODE_SET_UNDO SNMP_MSG_INTERNAL_SET_UNDO -#define MODE_IS_SET(x) ((x < 128) || (x == -1) || (x == SNMP_MSG_SET)) - /* #define MODE_IS_SET(x) (!MODE_IS_GET(x)) */ - -#define MODE_BSTEP_PRE_REQUEST SNMP_MSG_INTERNAL_PRE_REQUEST -#define MODE_BSTEP_POST_REQUEST SNMP_MSG_INTERNAL_POST_REQUEST - -#define MODE_BSTEP_OBJECT_LOOKUP SNMP_MSG_INTERNAL_OBJECT_LOOKUP -#define MODE_BSTEP_CHECK_VALUE SNMP_MSG_INTERNAL_CHECK_VALUE -#define MODE_BSTEP_ROW_CREATE SNMP_MSG_INTERNAL_ROW_CREATE -#define MODE_BSTEP_UNDO_SETUP SNMP_MSG_INTERNAL_UNDO_SETUP -#define MODE_BSTEP_SET_VALUE SNMP_MSG_INTERNAL_SET_VALUE -#define MODE_BSTEP_CHECK_CONSISTENCY SNMP_MSG_INTERNAL_CHECK_CONSISTENCY -#define MODE_BSTEP_UNDO_SET SNMP_MSG_INTERNAL_UNDO_SET -#define MODE_BSTEP_COMMIT SNMP_MSG_INTERNAL_COMMIT -#define MODE_BSTEP_UNDO_COMMIT SNMP_MSG_INTERNAL_UNDO_COMMIT -#define MODE_BSTEP_IRREVERSIBLE_COMMIT SNMP_MSG_INTERNAL_IRREVERSIBLE_COMMIT -#define MODE_BSTEP_UNDO_CLEANUP SNMP_MSG_INTERNAL_UNDO_CLEANUP - - -/** @typedef struct netsnmp_agent_request_info_s netsnmp_agent_request_info - * Typedefs the netsnmp_agent_request_info_s struct into - * netsnmp_agent_request_info - */ - -/** @struct netsnmp_agent_request_info_s - * The agent transaction request structure - */ - typedef struct netsnmp_agent_request_info_s { - int mode; - /** pdu contains authinfo, eg */ -/* netsnmp_pdu *pdu; */ - struct netsnmp_agent_session_s *asp; /* may not be needed */ - /* - * can be used to pass information on a per-pdu basis from a - * helper to the later handlers - */ - netsnmp_data_list *agent_data; - } netsnmp_agent_request_info; - - typedef struct netsnmp_cachemap_s { - int globalid; - int cacheid; - struct netsnmp_cachemap_s *next; - } netsnmp_cachemap; - - typedef struct netsnmp_agent_session_s { - int mode; - netsnmp_session *session; - netsnmp_pdu *pdu; - netsnmp_pdu *orig_pdu; - int rw; - int exact; - int status; - int index; - int oldmode; - - struct netsnmp_agent_session_s *next; - - /* - * new API pointers - */ - netsnmp_agent_request_info *reqinfo; - netsnmp_request_info *requests; - netsnmp_tree_cache *treecache; - netsnmp_variable_list **bulkcache; - int treecache_len; /* length of cache array */ - int treecache_num; /* number of current cache entries */ - netsnmp_cachemap *cache_store; - int vbcount; - } netsnmp_agent_session; - - /* - * Address cache handling functions. - */ - - void netsnmp_addrcache_initialise(void); - void netsnmp_addrcache_age(void); - - - /* - * config file parsing routines - */ - int handle_snmp_packet(int, netsnmp_session *, int, - netsnmp_pdu *, void *); - void snmp_agent_parse_config(char *, char *); - netsnmp_agent_session *init_agent_snmp_session(netsnmp_session *, - netsnmp_pdu *); - void free_agent_snmp_session(netsnmp_agent_session *); - void - netsnmp_remove_and_free_agent_snmp_session(netsnmp_agent_session - *asp); -#ifdef SNMP_NEED_REQUEST_LIST - void - netsnmp_free_agent_snmp_session_by_session(netsnmp_session * sess, - void (*free_request) - (netsnmp_request_list - *)); -#endif - int getNextSessID(void); - void dump_sess_list(void); - int init_master_agent(void); - void shutdown_master_agent(void); - int agent_check_and_process(int block); - void netsnmp_check_outstanding_agent_requests(void); - - int netsnmp_request_set_error(netsnmp_request_info *request, - int error_value); - int netsnmp_check_requests_error(netsnmp_request_info *reqs); - int - netsnmp_set_all_requests_error(netsnmp_agent_request_info *reqinfo, - netsnmp_request_info *requests, - int error_value); - int - netsnmp_request_set_error_all(netsnmp_request_info *requests, - int error_value); - - /** deprecated, use netsnmp_request_set_error instead */ - int netsnmp_set_request_error(netsnmp_agent_request_info - *reqinfo, - netsnmp_request_info - *request, int error_value); - /** deprecated, use netsnmp_request_set_error instead */ - int netsnmp_set_mode_request_error(int mode, - netsnmp_request_info - *request, - int error_value); - - u_long netsnmp_marker_uptime(marker_t pm); - u_long netsnmp_timeval_uptime(struct timeval *tv); - u_long netsnmp_get_agent_uptime(void); - int netsnmp_check_transaction_id(int transaction_id); - int netsnmp_agent_check_packet(netsnmp_session *, - struct netsnmp_transport_s - *, void *, int); - int netsnmp_agent_check_parse(netsnmp_session *, - netsnmp_pdu *, int); - int netsnmp_allocate_globalcacheid(void); - - int netsnmp_remove_delegated_requests_for_session(netsnmp_session *sess); - - /* - * Register and de-register agent NSAPs. - */ - - struct netsnmp_transport_s; - - int netsnmp_register_agent_nsap(struct netsnmp_transport_s - *t); - void netsnmp_deregister_agent_nsap(int handle); - - NETSNMP_INLINE void - netsnmp_agent_add_list_data(netsnmp_agent_request_info *agent, - netsnmp_data_list *node); - - NETSNMP_INLINE int - netsnmp_agent_remove_list_data(netsnmp_agent_request_info *ari, - const char * name); - - NETSNMP_INLINE void * - netsnmp_agent_get_list_data(netsnmp_agent_request_info - *agent, const char *name); - - NETSNMP_INLINE void - netsnmp_free_agent_data_set(netsnmp_agent_request_info *agent); - - NETSNMP_INLINE void - netsnmp_free_agent_data_sets(netsnmp_agent_request_info *agent); - NETSNMP_INLINE void - netsnmp_free_agent_request_info(netsnmp_agent_request_info *ari); - -#ifdef __cplusplus -} -#endif -#endif -/** @} */ diff --git a/utils/net-snmp/agent/snmp_vars.h b/utils/net-snmp/agent/snmp_vars.h deleted file mode 100644 index c4e8815ba..000000000 --- a/utils/net-snmp/agent/snmp_vars.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Definitions for SNMP (RFC 1067) agent variable finder. - * - */ - -#ifndef _SNMP_VARS_H_ -#define _SNMP_VARS_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Portions of this file are subject to the following copyright(s). See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/*********************************************************** - Copyright 1988, 1989 by Carnegie Mellon University - Copyright 1989 TGV, Incorporated - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of CMU and TGV not be used -in advertising or publicity pertaining to distribution of the software -without specific, written prior permission. - -CMU AND TGV DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL CMU OR TGV BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF -USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -******************************************************************/ -/* - * Portions of this file are copyrighted by: - * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ - - struct variable; - - /* - * Function pointer called by the master agent for writes. - */ - typedef int (WriteMethod) (int action, - u_char * var_val, - u_char var_val_type, - size_t var_val_len, - u_char * statP, - oid * name, size_t length); - - /* - * Function pointer called by the master agent for mib information retrieval - */ - typedef u_char *(FindVarMethod) (struct variable * vp, - oid * name, - size_t * length, - int exact, - size_t * var_len, - WriteMethod ** write_method); - - /* - * Function pointer called by the master agent for setting up subagent requests - */ - typedef int (AddVarMethod) (netsnmp_agent_session *asp, - netsnmp_variable_list * vbp); - - struct nlist; - - extern long long_return; - extern u_char return_buf[]; - - extern oid nullOid[]; - extern int nullOidLen; - -#define INST 0xFFFFFFFF /* used to fill out the instance field of the variables table */ - - struct variable { - u_char magic; /* passed to function as a hint */ - char type; /* type of variable */ - /* - * See important comment in snmp_vars.c relating to acl - */ - u_short acl; /* access control list for variable */ - FindVarMethod *findVar; /* function that finds variable */ - u_char namelen; /* length of above */ - oid name[MAX_OID_LEN]; /* object identifier of variable */ - }; - - int init_agent(const char *); - void shutdown_agent(void); - -#ifdef USING_AGENTX_SUBAGENT_MODULE - void netsnmp_enable_subagent(void); -#endif - -#ifndef _AGENT_REGISTRY_H -#include -#include -#include -#endif - - /* - * fail overloads non-negative integer value. it must be -1 ! - */ -#define MATCH_FAILED (-1) -#define MATCH_SUCCEEDED 0 - -#ifdef __cplusplus -} -#endif -#endif /* _SNMP_VARS_H_ */ diff --git a/utils/net-snmp/agent/table.h b/utils/net-snmp/agent/table.h deleted file mode 100644 index 3b8bbc206..000000000 --- a/utils/net-snmp/agent/table.h +++ /dev/null @@ -1,195 +0,0 @@ -/* Portions of this file are subject to the following copyright(s). See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/* - * Portions of this file are copyrighted by: - * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ -/* - * @file table.h - * - * @addtogroup table - * - * @{ - */ -#ifndef _TABLE_HANDLER_H_ -#define _TABLE_HANDLER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * The table helper is designed to simplify the task of writing a - * table handler for the net-snmp agent. You should create a normal - * handler and register it using the netsnmp_register_table() function - * instead of the netsnmp_register_handler() function. - */ - -/** - * Notes: - * - * 1) illegal indexes automatically get handled for get/set cases. - * Simply check to make sure the value is type ASN_NULL before - * you answer a request. - */ - -/** - * used as an index to parent_data lookups - */ -#define TABLE_HANDLER_NAME "table" - -/** @typedef struct netsnmp_column_info_t netsnmp_column_info - * Typedefs the netsnmp_column_info_t struct into netsnmp_column_info */ - -/** - * @struct netsnmp_column_info_t - * column info struct. OVERLAPPING RANGES ARE NOT SUPPORTED. - */ - typedef struct netsnmp_column_info_t { - char isRange; - /** only useful if isRange == 0 */ - char list_count; - - union { - unsigned int range[2]; - unsigned int *list; - } details; - - struct netsnmp_column_info_t *next; - - } netsnmp_column_info; - -/** @typedef struct netsnmp_table_registration_info_s netsnmp_table_registration_info - * Typedefs the netsnmp_table_registration_info_s struct into - * netsnmp_table_registration_info */ - -/** - * @struct netsnmp_table_registration_info_s - * Table registration structure. - */ - typedef struct netsnmp_table_registration_info_s { - /** list of varbinds with only 'type' set */ - netsnmp_variable_list *indexes; - /** calculated automatically */ - unsigned int number_indexes; - - /** - * the minimum columns number. If there are columns - * in-between which are not valid, use valid_columns to get - * automatic column range checking. - */ - unsigned int min_column; - /** the maximum columns number */ - unsigned int max_column; - - /** more details on columns */ - netsnmp_column_info *valid_columns; - - } netsnmp_table_registration_info; - -/** @typedef struct netsnmp_table_request_info_s netsnmp_table_request_info - * Typedefs the netsnmp_table_request_info_s struct into - * netsnmp_table_request_info */ - -/** - * @struct netsnmp_table_request_info_s - * The table request info structure. - */ - typedef struct netsnmp_table_request_info_s { - /** 0 if OID not long enough */ - unsigned int colnum; - /** 0 if failure to parse any */ - unsigned int number_indexes; - /** contents freed by helper upon exit */ - netsnmp_variable_list *indexes; - - oid index_oid[MAX_OID_LEN]; - size_t index_oid_len; - netsnmp_table_registration_info *reg_info; - } netsnmp_table_request_info; - - netsnmp_mib_handler - *netsnmp_get_table_handler(netsnmp_table_registration_info - *tabreq); - int netsnmp_register_table(netsnmp_handler_registration - *reginfo, - netsnmp_table_registration_info - *tabreq); - int netsnmp_table_build_oid(netsnmp_handler_registration - *reginfo, - netsnmp_request_info *reqinfo, - netsnmp_table_request_info - *table_info); - int - netsnmp_table_build_oid_from_index(netsnmp_handler_registration - *reginfo, - netsnmp_request_info *reqinfo, - netsnmp_table_request_info - *table_info); - int netsnmp_table_build_result(netsnmp_handler_registration - *reginfo, - netsnmp_request_info - *reqinfo, - netsnmp_table_request_info - *table_info, u_char type, - u_char * result, - size_t result_len); - int - netsnmp_update_variable_list_from_index(netsnmp_table_request_info - *); - int - netsnmp_update_indexes_from_variable_list - (netsnmp_table_request_info *tri); - netsnmp_table_registration_info - *netsnmp_find_table_registration_info(netsnmp_handler_registration - *reginfo); - netsnmp_index * netsnmp_table_index_find_next_row(netsnmp_container *c, - netsnmp_table_request_info *tblreq); - - unsigned int netsnmp_closest_column(unsigned int current, - netsnmp_column_info - *valid_columns); - - Netsnmp_Node_Handler table_helper_handler; - -#define netsnmp_table_helper_add_index(tinfo, type) snmp_varlist_add_variable(&tinfo->indexes, NULL, 0, (u_char)type, NULL, 0); - -#if HAVE_STDARG_H - void - netsnmp_table_helper_add_indexes(netsnmp_table_registration_info - *tinfo, ...); -#else - void netsnmp_table_helper_add_indexes(va_alist); -#endif - - int netsnmp_check_getnext_reply(netsnmp_request_info *request, - oid * prefix, size_t prefix_len, - netsnmp_variable_list * newvar, - netsnmp_variable_list ** outvar); - - netsnmp_table_request_info - *netsnmp_extract_table_info(netsnmp_request_info *); - netsnmp_oid_stash_node - **netsnmp_table_get_or_create_row_stash(netsnmp_agent_request_info - *reqinfo, - const u_char * - storage_name); - unsigned int - netsnmp_table_next_column(netsnmp_table_request_info *table_info); - - - int netsnmp_sparse_table_register(netsnmp_handler_registration *reginfo, - netsnmp_table_registration_info *tabreq); - - netsnmp_mib_handler *netsnmp_sparse_table_handler_get(void); - -#ifdef __cplusplus -} -#endif - -#endif /* _TABLE_HANDLER_H_ */ -/** @} */ diff --git a/utils/net-snmp/agent/table_array.h b/utils/net-snmp/agent/table_array.h deleted file mode 100644 index bb7ed6d4c..000000000 --- a/utils/net-snmp/agent/table_array.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * table_array.h - * $Id: table_array.h,v 5.11 2004/09/14 02:29:15 rstory Exp $ - */ -#ifndef _TABLE_ARRAY_HANDLER_H_ -#define _TABLE_ARRAY_HANDLER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - - /* - * The table array helper is designed to simplify the task of - * writing a table handler for the net-snmp agent when the data being - * accessed is in an oid sorted form and must be accessed externally. - * - * Functionally, it is a specialized version of the more - * generic table helper but easies the burden of GETNEXT processing by - * retrieving the appropriate row for ead index through - * function calls which should be supplied by the module that wishes - * help. The module the table_array helps should, afterwards, - * never be called for the case of "MODE_GETNEXT" and only for the GET - * and SET related modes instead. - */ - -#include -#include - -#define TABLE_ARRAY_NAME "table_array" - - /* - * group_item is to allow us to keep a list of requests without - * disrupting the actual netsnmp_request_info list. - */ - typedef struct netsnmp_request_group_item_s { - netsnmp_request_info *ri; - netsnmp_table_request_info *tri; - struct netsnmp_request_group_item_s *next; - } netsnmp_request_group_item; - - /* - * structure to keep a list of requests for each unique index - */ - typedef struct netsnmp_request_group_s { - /* - * index for this row. points to someone else's memory, so - * don't free it! - */ - netsnmp_index index; - - /* - * container in which rows belong - */ - netsnmp_container *table; - - /* - * actual old and new rows - */ - netsnmp_index *existing_row; - netsnmp_index *undo_info; - - /* - * flags - */ - char row_created; - char row_deleted; - char fill1; - char fill2; - - /* - * requests for this row - */ - netsnmp_request_group_item *list; - - int status; - - void *rg_void; - - } netsnmp_request_group; - - typedef int (Netsnmp_User_Row_Operation_c) (const void *lhs, - const void *rhs); - typedef int (Netsnmp_User_Row_Operation) (void *lhs, void *rhs); - typedef int (Netsnmp_User_Get_Processor) (netsnmp_request_info *, - netsnmp_index - *, - netsnmp_table_request_info - *); - typedef netsnmp_index - *(UserRowMethod) (netsnmp_index *); - typedef int (Netsnmp_User_Row_Action) (netsnmp_index *, - netsnmp_index *, - netsnmp_request_group *); - typedef void (Netsnmp_User_Group_Method) (netsnmp_request_group *); - - /* - * structure for array callbacks - */ - typedef struct netsnmp_table_array_callbacks_s { - - Netsnmp_User_Row_Operation *row_copy; - Netsnmp_User_Row_Operation_c *row_compare; - - Netsnmp_User_Get_Processor *get_value; - - - Netsnmp_User_Row_Action *can_activate; - Netsnmp_User_Row_Action *activated; - Netsnmp_User_Row_Action *can_deactivate; - Netsnmp_User_Row_Action *deactivated; - Netsnmp_User_Row_Action *can_delete; - - UserRowMethod *create_row; - UserRowMethod *duplicate_row; - UserRowMethod *delete_row; - - Netsnmp_User_Group_Method *set_reserve1; - Netsnmp_User_Group_Method *set_reserve2; - Netsnmp_User_Group_Method *set_action; - Netsnmp_User_Group_Method *set_commit; - Netsnmp_User_Group_Method *set_free; - Netsnmp_User_Group_Method *set_undo; - - /** not callbacks, but this is a useful place for them... */ - netsnmp_container* container; - char can_set; - - } netsnmp_table_array_callbacks; - - - int - netsnmp_table_container_register(netsnmp_handler_registration *reginfo, - netsnmp_table_registration_info - *tabreq, - netsnmp_table_array_callbacks *cb, - netsnmp_container *container, - int group_rows); - - netsnmp_container * netsnmp_extract_array_context(netsnmp_request_info *); - - Netsnmp_Node_Handler netsnmp_table_array_helper_handler; - - int - netsnmp_table_array_check_row_status(netsnmp_table_array_callbacks *cb, - netsnmp_request_group *ag, - long *rs_new, long *rs_old); - -#ifdef __cplusplus -} -#endif - -#endif /* _TABLE_ARRAY_HANDLER_H_ */ diff --git a/utils/net-snmp/agent/table_container.h b/utils/net-snmp/agent/table_container.h deleted file mode 100644 index 955f3b4c0..000000000 --- a/utils/net-snmp/agent/table_container.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * table_container.h - * $Id: table_container.h,v 1.7 2004/10/09 02:12:55 rstory Exp $ - */ -#ifndef _TABLE_CONTAINER_HANDLER_H_ -#define _TABLE_CONTAINER_HANDLER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - - /* - * The table container helper is designed to simplify the task of - * writing a table handler for the net-snmp agent when the data being - * accessed is accessible via a netsnmp_container. - * - * Functionally, it is a specialized version of the more - * generic table helper but easies the burden of GETNEXT processing by - * retrieving the appropriate row for each index through - * function calls which should be supplied by the module that wishes - * help. The module the table_container helps should, afterwards, - * never be called for the case of "MODE_GETNEXT" and only for the GET - * and SET related modes instead. - */ - -#include -#include - -#define TABLE_CONTAINER_ROW "table_container:row" -#define TABLE_CONTAINER_CONTAINER "table_container:container" - -#define TABLE_CONTAINER_KEY_NETSNMP_INDEX 1 /* default */ -#define TABLE_CONTAINER_KEY_VARBIND_INDEX 2 -#define TABLE_CONTAINER_KEY_VARBIND_RAW 3 - - /* - * register a container table - */ - int - netsnmp_container_table_register(netsnmp_handler_registration *reginfo, - netsnmp_table_registration_info - *tabreq, - netsnmp_container *container, - char key_type); - /* - * get an injectable containe table handler - */ - netsnmp_mib_handler * - netsnmp_container_table_handler_get(netsnmp_table_registration_info *tabreq, - netsnmp_container *container, - char key_type); - - /** find the context data used by the table_container helper */ -#ifdef NETSNMP_USE_INLINE - NETSNMP_STATIC_INLINE void * - netsnmp_container_table_row_extract(netsnmp_request_info *request) - { - /* - * NOTE: this function must match in table_container.c and table_container.h. - * if you change one, change them both! - */ - return netsnmp_request_get_list_data(request, TABLE_CONTAINER_ROW); - } -#else - void * - netsnmp_container_table_extract_context(netsnmp_request_info *request); -#endif /* inline */ - - void netsnmp_container_table_insert_row(netsnmp_request_info *request, - netsnmp_index *row); - - /** retrieve the container used by the table_container helper */ - netsnmp_container* - netsnmp_container_table_container_extract(netsnmp_request_info *request); - - void * - netsnmp_container_table_find_next_row(netsnmp_request_info *request, - netsnmp_table_request_info *tblreq, - netsnmp_container *container, - char key_type ); -#ifdef __cplusplus -} -#endif - -#endif /* _TABLE_CONTAINER_HANDLER_H_ */ diff --git a/utils/net-snmp/agent/table_data.h b/utils/net-snmp/agent/table_data.h deleted file mode 100644 index f0553a42d..000000000 --- a/utils/net-snmp/agent/table_data.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * table_iterator.h - */ -#ifndef _TABLE_DATA_HANDLER_H_ -#define _TABLE_DATA_HANDLER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - - /* - * This helper is designed to completely automate the task of storing - * tables of data within the agent that are not tied to external data - * sources (like the kernel, hardware, or other processes, etc). IE, - * all rows within a table are expected to be added manually using - * functions found below. - */ - -#define TABLE_DATA_NAME "table_data" -#define TABLE_DATA_ROW "table_data" -#define TABLE_DATA_TABLE "table_data_table" - - typedef struct netsnmp_table_row_s { - netsnmp_variable_list *indexes; /* stored permanently if store_indexes = 1 */ - oid *index_oid; - size_t index_oid_len; - void *data; /* the data to store */ - - struct netsnmp_table_row_s *next, *prev; /* if used in a list */ - } netsnmp_table_row; - - typedef struct netsnmp_table_data_s { - netsnmp_variable_list *indexes_template; /* containing only types */ - char *name; /* if !NULL, it's registered globally */ - int flags; /* not currently used */ - int store_indexes; - netsnmp_table_row *first_row; - netsnmp_table_row *last_row; - } netsnmp_table_data; - - netsnmp_mib_handler *netsnmp_get_table_data_handler(netsnmp_table_data - *table); - void netsnmp_table_data_generate_index_oid(netsnmp_table_row - *row); - int netsnmp_table_data_add_row(netsnmp_table_data *table, - netsnmp_table_row *row); - netsnmp_table_row *netsnmp_table_data_remove_row(netsnmp_table_data - *table, - netsnmp_table_row - *row); - void *netsnmp_table_data_delete_row(netsnmp_table_row *row); - void - *netsnmp_table_data_remove_and_delete_row(netsnmp_table_data - *table, - netsnmp_table_row *row); - - netsnmp_table_row *netsnmp_table_data_get(netsnmp_table_data *table, - netsnmp_variable_list * - indexes); - - netsnmp_table_row *netsnmp_table_data_get_from_oid(netsnmp_table_data - *table, - oid * searchfor, - size_t - searchfor_len); - - int - netsnmp_register_table_data(netsnmp_handler_registration *reginfo, - netsnmp_table_data *table, - netsnmp_table_registration_info - *table_info); - int - netsnmp_register_read_only_table_data(netsnmp_handler_registration - *reginfo, - netsnmp_table_data *table, - netsnmp_table_registration_info - *table_info); - - netsnmp_table_row *netsnmp_extract_table_row(netsnmp_request_info *); - netsnmp_table_data *netsnmp_extract_table( netsnmp_request_info *); - void *netsnmp_extract_table_row_data(netsnmp_request_info *); - void netsnmp_insert_table_row(netsnmp_request_info *, netsnmp_table_row *); - netsnmp_table_data *netsnmp_create_table_data(const char *name); - netsnmp_table_row *netsnmp_create_table_data_row(void); - netsnmp_table_row *netsnmp_table_data_clone_row(netsnmp_table_row - *row); - NETSNMP_INLINE void - netsnmp_table_data_replace_row(netsnmp_table_data *table, - netsnmp_table_row *origrow, - netsnmp_table_row *newrow); - - int - netsnmp_table_data_build_result(netsnmp_handler_registration - *reginfo, - netsnmp_agent_request_info - *reqinfo, - netsnmp_request_info *request, - netsnmp_table_row *row, int column, - u_char type, u_char * result_data, - size_t result_data_len); - int netsnmp_table_data_num_rows(netsnmp_table_data *table); - - -#define netsnmp_table_data_add_index(thetable, type) snmp_varlist_add_variable(&thetable->indexes_template, NULL, 0, type, NULL, 0) -#define netsnmp_table_row_add_index(row, type, value, value_len) snmp_varlist_add_variable(&row->indexes, NULL, 0, type, (const u_char *) value, value_len) - - - Netsnmp_Node_Handler netsnmp_table_data_helper_handler; - -#ifdef __cplusplus -} -#endif - -#endif /* _TABLE_DATA_HANDLER_H_ */ diff --git a/utils/net-snmp/agent/table_dataset.h b/utils/net-snmp/agent/table_dataset.h deleted file mode 100644 index 48c80e1a5..000000000 --- a/utils/net-snmp/agent/table_dataset.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * table_iterator.h - */ -#ifndef _TABLE_DATA_SET_HANDLER_H_ -#define _TABLE_DATA_SET_HANDLER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - - /* - * This helper is designed to completely automate the task of storing - * tables of data within the agent that are not tied to external data - * sources (like the kernel, hardware, or other processes, etc). IE, - * all rows within a table are expected to be added manually using - * functions found below. - */ - - void netsnmp_init_table_dataset(void); - -#define TABLE_DATA_SET_NAME "netsnmp_table_data_set" - - /* - * return SNMP_ERR_NOERROR or some SNMP specific protocol error id - */ - typedef int (Netsnmp_Value_Change_Ok) (char *old_value, - size_t old_value_len, - char *new_value, - size_t new_value_len, - void *mydata); - - /* - * stored within a given row - */ - typedef struct netsnmp_table_data_set_storage_s { - unsigned int column; - - /* - * info about it? - */ - char writable; - Netsnmp_Value_Change_Ok *change_ok_fn; - void *my_change_data; - - /* - * data actually stored - */ - u_char type; - union { /* value of variable */ - void *voidp; - long *integer; - u_char *string; - oid *objid; - u_char *bitstring; - struct counter64 *counter64; -#ifdef OPAQUE_SPECIAL_TYPES - float *floatVal; - double *doubleVal; -#endif /* OPAQUE_SPECIAL_TYPES */ - } data; - u_long data_len; - - struct netsnmp_table_data_set_storage_s *next; - } netsnmp_table_data_set_storage; - - typedef struct netsnmp_table_data_set_s { - netsnmp_table_data *table; - netsnmp_table_data_set_storage *default_row; - int allow_creation; /* set to 1 to allow creation of new rows */ - unsigned int rowstatus_column; - } netsnmp_table_data_set; - - Netsnmp_Node_Handler netsnmp_table_data_set_helper_handler; - - /* - * to set, add column, type, (writable) ? 1 : 0 - */ - /* - * default value, if not NULL, is the default value used in row - * creation. It is copied into the storage template (free your - * calling argument). - */ - int - netsnmp_table_set_add_default_row(netsnmp_table_data_set *, - unsigned int, int, int, - void *default_value, - size_t default_value_len); - - /* - * to set, add column, type, (writable) ? 1 : 0, ... - */ -#if HAVE_STDARG_H - void - netsnmp_table_set_multi_add_default_row(netsnmp_table_data_set *, - ...); -#else - void netsnmp_table_set_multi_add_default_row(va_alist); -#endif - int netsnmp_set_row_column(netsnmp_table_row *, - unsigned int, int, const char *, - size_t); - netsnmp_table_data_set_storage - *netsnmp_table_data_set_find_column(netsnmp_table_data_set_storage - *, unsigned int); - netsnmp_table_data_set_storage - *netsnmp_extract_table_data_set_column(netsnmp_request_info *, - unsigned int); - int - netsnmp_register_table_data_set(netsnmp_handler_registration *, - netsnmp_table_data_set *, - netsnmp_table_registration_info *); - netsnmp_mib_handler - *netsnmp_get_table_data_set_handler(netsnmp_table_data_set *); - netsnmp_table_data_set *netsnmp_create_table_data_set(const char *); - int netsnmp_mark_row_column_writable(netsnmp_table_row - *row, int column, - int writable); - NETSNMP_INLINE netsnmp_table_data_set - *netsnmp_extract_table_data_set(netsnmp_request_info *request); - void netsnmp_config_parse_table_set(const char *token, - char *line); - void netsnmp_config_parse_add_row(const char *token, - char *line); - NETSNMP_INLINE void netsnmp_table_dataset_add_index(netsnmp_table_data_set - *table, u_char type); - NETSNMP_INLINE void netsnmp_table_dataset_add_row(netsnmp_table_data_set - *table, - netsnmp_table_row *row); - NETSNMP_INLINE void netsnmp_table_dataset_remove_row(netsnmp_table_data_set - *table, - netsnmp_table_row - *row); - NETSNMP_INLINE void netsnmp_table_dataset_delete_row(netsnmp_table_row - *row); - NETSNMP_INLINE void - netsnmp_table_dataset_remove_and_delete_row(netsnmp_table_data_set - *table, - netsnmp_table_row - *row); - NETSNMP_INLINE void - netsnmp_table_dataset_delete_all_data - (netsnmp_table_data_set_storage *data); - NETSNMP_INLINE void - netsnmp_table_dataset_replace_row(netsnmp_table_data_set *table, - netsnmp_table_row *origrow, - netsnmp_table_row *newrow); - netsnmp_table_row *netsnmp_table_data_set_clone_row(netsnmp_table_row - *row); - void netsnmp_register_auto_data_table(netsnmp_table_data_set - *table_set, - char - *registration_name); - int netsnmp_table_data_num_rows(netsnmp_table_data *table); - -#if HAVE_STDARG_H - void - netsnmp_table_set_add_indexes(netsnmp_table_data_set *tset, ...); -#else - void netsnmp_table_helper_add_indexes(va_alist); -#endif - -#ifdef __cplusplus -} -#endif - -#define netsnmp_table_row_add_column(row, type, value, value_len) snmp_varlist_add_variable(&row->indexes, NULL, 0, type, (u_char *) value, value_len) - -#endif /* _TABLE_DATA_SET_HANDLER_H_ */ diff --git a/utils/net-snmp/agent/table_iterator.h b/utils/net-snmp/agent/table_iterator.h deleted file mode 100644 index e7d9326b6..000000000 --- a/utils/net-snmp/agent/table_iterator.h +++ /dev/null @@ -1,138 +0,0 @@ -/* Portions of this file are subject to the following copyright(s). See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/* - * Portions of this file are copyrighted by: - * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ -/** - * @file table_iterator.h - * @addtogroup table_iterator - * @{ - */ -#ifndef _TABLE_ITERATOR_HANDLER_H_ -#define _TABLE_ITERATOR_HANDLER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - - struct netsnmp_iterator_info_s; - - typedef netsnmp_variable_list *(Netsnmp_First_Data_Point) (void - **loop_context, - void - **data_context, - netsnmp_variable_list - *, - struct - netsnmp_iterator_info_s - *); - typedef netsnmp_variable_list *(Netsnmp_Next_Data_Point) (void - **loop_context, - void - **data_context, - netsnmp_variable_list - *, - struct - netsnmp_iterator_info_s - *); - typedef void *(Netsnmp_Make_Data_Context) (void *loop_context, - struct - netsnmp_iterator_info_s - *); - typedef void (Netsnmp_Free_Loop_Context) (void *, - struct - netsnmp_iterator_info_s - *); - typedef void (Netsnmp_Free_Data_Context) (void *, - struct - netsnmp_iterator_info_s - *); - - /** @typedef struct netsnmp_iterator_info_s netsnmp_iterator_info - * Typedefs the netsnmp_iterator_info_s struct into netsnmp_iterator_info */ - - /** @struct netsnmp_iterator_info_s - - * Holds iterator information containing functions which should be - called by the iterator_handler to loop over your data set and - sort it in a SNMP specific manner. - - The netsnmp_iterator_info typedef can be used instead of directly calling this struct if you would prefer. - */ - typedef struct netsnmp_iterator_info_s { - /** Responsible for: returning the first set of "index" data, a - loop-context pointer, and optionally a data context - pointer */ - Netsnmp_First_Data_Point *get_first_data_point; - - /** Given the previous loop context, this should return the - next loop context, assiocated index set and optionally a - data context */ - Netsnmp_Next_Data_Point *get_next_data_point; - - /** If a data context wasn't supplied by the - get_first_data_point or get_next_data_point functions and - the make_data_context pointer is defined, it will be called - to convert a loop context into a data context. */ - Netsnmp_Make_Data_Context *make_data_context; - - /** A function which should free the loop context. This - function is called at *each* iteration step, which is - not-optimal for speed purposes. The use of - free_loop_context_at_end instead is strongly - encouraged. This can be set to NULL to avoid its usage. */ - Netsnmp_Free_Loop_Context *free_loop_context; - - /** Frees a data context. This will be called at any time a - data context needs to be freed. This may be at the same - time as a correspondng loop context is freed, or much much - later. Multiple data contexts may be kept in existence at - any time. */ - Netsnmp_Free_Data_Context *free_data_context; - - /** Frees a loop context at the end of the entire iteration - sequence. Generally, this would free the loop context - allocated by the get_first_data_point function (which would - then be updated by each call to the get_next_data_point - function). It is not called until the get_next_data_point - function returns a NULL */ - Netsnmp_Free_Loop_Context *free_loop_context_at_end; - - /** This can be used by client handlers to store any - information they need */ - void *myvoid; - int flags; -#define NETSNMP_ITERATOR_FLAG_SORTED 0x01 - - /** A pointer to the netsnmp_table_registration_info object - this iterator is registered along with. */ - netsnmp_table_registration_info *table_reginfo; - } netsnmp_iterator_info; - -#define TABLE_ITERATOR_NAME "table_iterator" - - netsnmp_mib_handler - *netsnmp_get_table_iterator_handler(netsnmp_iterator_info *iinfo); - int - netsnmp_register_table_iterator(netsnmp_handler_registration - *reginfo, - netsnmp_iterator_info *iinfo); - - void *netsnmp_extract_iterator_context(netsnmp_request_info - *); - void netsnmp_insert_iterator_context(netsnmp_request_info - *, void *); - - Netsnmp_Node_Handler netsnmp_table_iterator_helper_handler; - -#ifdef __cplusplus -} -#endif - -#endif /* _TABLE_ITERATOR_HANDLER_H_ */ -/** @} */ diff --git a/utils/net-snmp/agent/var_struct.h b/utils/net-snmp/agent/var_struct.h deleted file mode 100644 index b9d1660eb..000000000 --- a/utils/net-snmp/agent/var_struct.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef VAR_STRUCT_H -#define VAR_STRUCT_H -/* - * The subtree structure contains a subtree prefix which applies to - * all variables in the associated variable list. - * - * By converting to a tree of subtree structures, entries can - * now be subtrees of another subtree in the structure. i.e: - * 1.2 - * 1.2.0 - */ - -#define UCD_REGISTRY_OID_MAX_LEN 128 - -/* - * subtree flags - */ -#define FULLY_QUALIFIED_INSTANCE 0x01 -#define SUBTREE_ATTACHED 0x02 - -typedef struct netsnmp_subtree_s { - oid *name_a; /* objid prefix of registered subtree */ - u_char namelen; /* number of subid's in name above */ - oid *start_a; /* objid of start of covered range */ - u_char start_len; /* number of subid's in start name */ - oid *end_a; /* objid of end of covered range */ - u_char end_len; /* number of subid's in end name */ - struct variable *variables; /* pointer to variables array */ - int variables_len; /* number of entries in above array */ - int variables_width; /* sizeof each variable entry */ - char *label_a; /* calling module's label */ - netsnmp_session *session; - u_char flags; - u_char priority; - int timeout; - struct netsnmp_subtree_s *next; /* List of 'sibling' subtrees */ - struct netsnmp_subtree_s *prev; /* (doubly-linked list) */ - struct netsnmp_subtree_s *children; /* List of 'child' subtrees */ - int range_subid; - oid range_ubound; - netsnmp_handler_registration *reginfo; /* new API */ - int cacheid; - int global_cacheid; -} netsnmp_subtree; - -/* - * This is a new variable structure that doesn't have as much memory - * tied up in the object identifier. It's elements have also been re-arranged - * so that the name field can be variable length. Any number of these - * structures can be created with lengths tailor made to a particular - * application. The first 5 elements of the structure must remain constant. - */ -struct variable1 { - u_char magic; /* passed to function as a hint */ - u_char type; /* type of variable */ - u_short acl; /* access control list for variable */ - FindVarMethod *findVar; /* function that finds variable */ - u_char namelen; /* length of name below */ - oid name[1]; /* object identifier of variable */ -}; - -struct variable2 { - u_char magic; /* passed to function as a hint */ - u_char type; /* type of variable */ - u_short acl; /* access control list for variable */ - FindVarMethod *findVar; /* function that finds variable */ - u_char namelen; /* length of name below */ - oid name[2]; /* object identifier of variable */ -}; - -struct variable3 { - u_char magic; /* passed to function as a hint */ - u_char type; /* type of variable */ - u_short acl; /* access control list for variable */ - FindVarMethod *findVar; /* function that finds variable */ - u_char namelen; /* length of name below */ - oid name[3]; /* object identifier of variable */ -}; - -struct variable4 { - u_char magic; /* passed to function as a hint */ - u_char type; /* type of variable */ - u_short acl; /* access control list for variable */ - FindVarMethod *findVar; /* function that finds variable */ - u_char namelen; /* length of name below */ - oid name[4]; /* object identifier of variable */ -}; - -struct variable7 { - u_char magic; /* passed to function as a hint */ - u_char type; /* type of variable */ - u_short acl; /* access control list for variable */ - FindVarMethod *findVar; /* function that finds variable */ - u_char namelen; /* length of name below */ - oid name[7]; /* object identifier of variable */ -}; - -struct variable8 { - u_char magic; /* passed to function as a hint */ - u_char type; /* type of variable */ - u_short acl; /* access control list for variable */ - FindVarMethod *findVar; /* function that finds variable */ - u_char namelen; /* length of name below */ - oid name[8]; /* object identifier of variable */ -}; - -struct variable13 { - u_char magic; /* passed to function as a hint */ - u_char type; /* type of variable */ - u_short acl; /* access control list for variable */ - FindVarMethod *findVar; /* function that finds variable */ - u_char namelen; /* length of name below */ - oid name[13]; /* object identifier of variable */ -}; -#endif /* VAR_STRUCT_H */ diff --git a/utils/net-snmp/agent/watcher.h b/utils/net-snmp/agent/watcher.h deleted file mode 100644 index fdd503496..000000000 --- a/utils/net-snmp/agent/watcher.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * watcher.h - */ -#ifndef NETSNMP_WATCHER_H -#define NETSNMP_WATCHER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define WATCHER_FIXED_SIZE 0x01 -#define WATCHER_MAX_SIZE 0x02 - -typedef struct netsnmp_watcher_info_s { - void *data; - size_t data_size; - size_t max_size; - u_char type; - int flags; -} netsnmp_watcher_info; - -int netsnmp_register_watched_instance( netsnmp_handler_registration *reginfo, - netsnmp_watcher_info *winfo); -int netsnmp_register_watched_scalar( netsnmp_handler_registration *reginfo, - netsnmp_watcher_info *winfo); -int netsnmp_register_watched_timestamp(netsnmp_handler_registration *reginfo, - marker_t timestamp); -int netsnmp_register_watched_spinlock(netsnmp_handler_registration *reginfo, - int *spinlock); - -#define WATCHER_HANDLER_NAME "watcher" - -netsnmp_mib_handler *netsnmp_get_watcher_handler(void); -netsnmp_watcher_info *netsnmp_create_watcher_info(void *, size_t, u_char, int); -Netsnmp_Node_Handler netsnmp_watcher_helper_handler; - -netsnmp_mib_handler *netsnmp_get_watched_timestamp_handler(void); -Netsnmp_Node_Handler netsnmp_watched_timestamp_handler; - -netsnmp_mib_handler *netsnmp_get_watched_spinlock_handler(void); -Netsnmp_Node_Handler netsnmp_watched_spinlock_handler; - -#ifdef __cplusplus -} -#endif - -#endif /** NETSNMP_WATCHER_H */ diff --git a/utils/net-snmp/config_api.h b/utils/net-snmp/config_api.h deleted file mode 100644 index 67cd6a49b..000000000 --- a/utils/net-snmp/config_api.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef NET_SNMP_CONFIG_API_H -#define NET_SNMP_CONFIG_API_H - - /** - * Library API routines concerned with configuration and control - * of the behaviour of the library, agent and other applications. - */ - -#include - - /* - * For the initial release, this will just refer to the - * relevant UCD header files. - * In due course, the routines relevant to this area of the - * API will be identified, and listed here directly. - * - * But for the time being, this header file is a placeholder, - * to allow application writers to adopt the new header file names. - */ -#include - -#include -#include - -#include /* for FILE definition */ -#include -#include -#include - -#endif /* NET_SNMP_CONFIG_API_H */ diff --git a/utils/net-snmp/definitions.h b/utils/net-snmp/definitions.h deleted file mode 100644 index 27405c468..000000000 --- a/utils/net-snmp/definitions.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef NET_SNMP_DEFINITIONS_H -#define NET_SNMP_DEFINITIONS_H - - /** - * Defined constants, and other similar enumerations. - */ - -#define MAX_OID_LEN 128 /* max subid's in an oid */ - -#define ONE_SEC 1000000L - - /* - * For the initial release, this will just refer to the - * relevant UCD header files. - * In due course, the relevant definitions will be - * identified, and listed here directly. - * - * But for the time being, this header file is primarily a placeholder, - * to allow application writers to adopt the new header file names. - */ - -#include /* for oid */ -#include -#include -#include -#include -#include -/* - * #include - */ - -#endif /* NET_SNMP_DEFINITIONS_H */ diff --git a/utils/net-snmp/library/README b/utils/net-snmp/library/README deleted file mode 100644 index daac670af..000000000 --- a/utils/net-snmp/library/README +++ /dev/null @@ -1,67 +0,0 @@ -One of the goals of the Net-SNMP v5 development line, is to try and -clarify the distinction between the "public" library API, and routines -that are regarded as being more "internal" to the library. - - This doesn't mean that application writers are discouraged from -making use of such internal routines. There is a strong feeling -within the development team that as much as possible of the library -should be made externally visible, to support writing as wide a -range of applications as possible. To that end, most routines -will be declared within an installed header file, rather than -privately within the library code files themselves. - - The public/internal categorisation is rather concerned with issues -of documentation, stability, and ease of programming. The public -API routines have been selected as those covering the more common -requirements (e.g. creating SNMP requests, sending them to other SNMP -agents, and interpreting the results), together with certain supporting -activities (e.g. run-time configuration). - - The intention is that these routines should be properly documented, -and remain relatively stable. We will attempt to avoid changing the -profile of these interfaces, and would normally provide some mechanism -to retain backward compatability if need be. - - On the other hand, the internal API routines are regarded as just -that - "internal" - so may legitimately be changed without providing -any compatability mechanism. You are perfectly free to make use of -these routines, but be aware that you do so "at your own risk". - -[This statement is in no way intended to challenge or amend the status - of the disclaimers in the top-level 'COPYING' file, which remain - unchanged as the legal basis for using this code] - - - There are (currently) eight main "public API" header files, relating -to various areas of SNMP programming, plus a combined "all-in-one" -header file (net-snmp-includes.h). - Currently these simply include the relevant library header files -following the UCD-SNMP organisation. However, the intention is for -future releases to declare the public API calls directly within these -top-level header files, and use the 'library/*.h' files for the more -internal calls. (i.e. those that are more likely to change over time). - - Until this process can be started, the best approximation to the -"public API" list is probably those routines that are documented -in manual pages. Apologies for any confusion, but hopefully this -process will result in a clearer end result than at present. - -Applications writers are encouraged to start #including the new header -files as soon as possible - either individually, or using the combined -wrapper file. Hopefully, with only a handful of top-level files, it -will be reasonably clear which file(s) might be appropriate for any -particular programming requirement. - - - - One final disclaimer: The above description represents my own -personal aims and understanding of the likely development of the -library API. While I have every confidence in having the support of -the other developers (or being able to persuade them of the benefits -of this approach!), it may turn out that things actually take a different -route. Anyone wishing to influence the organisation of the eventual -library API is encouraged to subscribe to the net-snmp-coders mailing -list, and contribute to the discussions there. - -Dave Shield -February 2002 diff --git a/utils/net-snmp/library/asn1.h b/utils/net-snmp/library/asn1.h deleted file mode 100644 index e4639da49..000000000 --- a/utils/net-snmp/library/asn1.h +++ /dev/null @@ -1,444 +0,0 @@ -#ifndef ASN1_H -#define ASN1_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define PARSE_PACKET 0 -#define DUMP_PACKET 1 - - /* - * Definitions for Abstract Syntax Notation One, ASN.1 - * As defined in ISO/IS 8824 and ISO/IS 8825 - * - * - */ -/*********************************************************** - Copyright 1988, 1989 by Carnegie Mellon University - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of CMU not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -******************************************************************/ - - -#ifndef MAX_SUBID /* temporary - duplicate definition protection */ -#ifndef EIGHTBIT_SUBIDS - typedef u_long oid; -#define MAX_SUBID 0xFFFFFFFF -#else - typedef u_char oid; -#define MAX_SUBID 0xFF -#endif -#endif - -#define MIN_OID_LEN 2 -#define MAX_OID_LEN 128 /* max subid's in an oid */ -#ifndef MAX_NAME_LEN /* conflicts with some libraries */ -#define MAX_NAME_LEN MAX_OID_LEN /* obsolete. use MAX_OID_LEN */ -#endif - -#define OID_LENGTH(x) (sizeof(x)/sizeof(oid)) - - -#define ASN_BOOLEAN ((u_char)0x01) -#define ASN_INTEGER ((u_char)0x02) -#define ASN_BIT_STR ((u_char)0x03) -#define ASN_OCTET_STR ((u_char)0x04) -#define ASN_NULL ((u_char)0x05) -#define ASN_OBJECT_ID ((u_char)0x06) -#define ASN_SEQUENCE ((u_char)0x10) -#define ASN_SET ((u_char)0x11) - -#define ASN_UNIVERSAL ((u_char)0x00) -#define ASN_APPLICATION ((u_char)0x40) -#define ASN_CONTEXT ((u_char)0x80) -#define ASN_PRIVATE ((u_char)0xC0) - -#define ASN_PRIMITIVE ((u_char)0x00) -#define ASN_CONSTRUCTOR ((u_char)0x20) - -#define ASN_LONG_LEN (0x80) -#define ASN_EXTENSION_ID (0x1F) -#define ASN_BIT8 (0x80) - -#define IS_CONSTRUCTOR(byte) ((byte) & ASN_CONSTRUCTOR) -#define IS_EXTENSION_ID(byte) (((byte) & ASN_EXTENSION_ID) == ASN_EXTENSION_ID) - - struct counter64 { - u_long high; - u_long low; - }; - -#ifdef OPAQUE_SPECIAL_TYPES - typedef struct counter64 integer64; - typedef struct counter64 unsigned64; - - /* - * The BER inside an OPAQUE is an context specific with a value of 48 (0x30) - * plus the "normal" tag. For a Counter64, the tag is 0x46 (i.e., an - * applications specific tag with value 6). So the value for a 64 bit - * counter is 0x46 + 0x30, or 0x76 (118 base 10). However, values - * greater than 30 can not be encoded in one octet. So the first octet - * has the class, in this case context specific (ASN_CONTEXT), and - * the special value (i.e., 31) to indicate that the real value follows - * in one or more octets. The high order bit of each following octet - * indicates if the value is encoded in additional octets. A high order - * bit of zero, indicates the last. For this "hack", only one octet - * will be used for the value. - */ - - /* - * first octet of the tag - */ -#define ASN_OPAQUE_TAG1 (ASN_CONTEXT | ASN_EXTENSION_ID) - /* - * base value for the second octet of the tag - the - * second octet was the value for the tag - */ -#define ASN_OPAQUE_TAG2 ((u_char)0x30) - -#define ASN_OPAQUE_TAG2U ((u_char)0x2f) /* second octet of tag for union */ - - /* - * All the ASN.1 types for SNMP "should have been" defined in this file, - * but they were not. (They are defined in snmp_impl.h) Thus, the tag for - * Opaque and Counter64 is defined, again, here with a different names. - */ -#define ASN_APP_OPAQUE (ASN_APPLICATION | 4) -#define ASN_APP_COUNTER64 (ASN_APPLICATION | 6) -#define ASN_APP_FLOAT (ASN_APPLICATION | 8) -#define ASN_APP_DOUBLE (ASN_APPLICATION | 9) -#define ASN_APP_I64 (ASN_APPLICATION | 10) -#define ASN_APP_U64 (ASN_APPLICATION | 11) -#define ASN_APP_UNION (ASN_PRIVATE | 1) /* or ASN_PRIV_UNION ? */ - - /* - * value for Counter64 - */ -#define ASN_OPAQUE_COUNTER64 (ASN_OPAQUE_TAG2 + ASN_APP_COUNTER64) - /* - * max size of BER encoding of Counter64 - */ -#define ASN_OPAQUE_COUNTER64_MX_BER_LEN 12 - - /* - * value for Float - */ -#define ASN_OPAQUE_FLOAT (ASN_OPAQUE_TAG2 + ASN_APP_FLOAT) - /* - * size of BER encoding of Float - */ -#define ASN_OPAQUE_FLOAT_BER_LEN 7 - - /* - * value for Double - */ -#define ASN_OPAQUE_DOUBLE (ASN_OPAQUE_TAG2 + ASN_APP_DOUBLE) - /* - * size of BER encoding of Double - */ -#define ASN_OPAQUE_DOUBLE_BER_LEN 11 - - /* - * value for Integer64 - */ -#define ASN_OPAQUE_I64 (ASN_OPAQUE_TAG2 + ASN_APP_I64) - /* - * max size of BER encoding of Integer64 - */ -#define ASN_OPAQUE_I64_MX_BER_LEN 11 - - /* - * value for Unsigned64 - */ -#define ASN_OPAQUE_U64 (ASN_OPAQUE_TAG2 + ASN_APP_U64) - /* - * max size of BER encoding of Unsigned64 - */ -#define ASN_OPAQUE_U64_MX_BER_LEN 12 - -#endif /* OPAQUE_SPECIAL_TYPES */ - - -#define ASN_PRIV_INCL_RANGE (ASN_PRIVATE | 2) -#define ASN_PRIV_EXCL_RANGE (ASN_PRIVATE | 3) -#define ASN_PRIV_DELEGATED (ASN_PRIVATE | 5) -#define ASN_PRIV_IMPLIED_OCTET_STR (ASN_PRIVATE | ASN_OCTET_STR) /* 4 */ -#define ASN_PRIV_IMPLIED_OBJECT_ID (ASN_PRIVATE | ASN_OBJECT_ID) /* 6 */ -#define ASN_PRIV_RETRY (ASN_PRIVATE | 7) -#define IS_DELEGATED(x) ((x) == ASN_PRIV_DELEGATED) - - - int asn_check_packet(u_char *, size_t); - u_char *asn_parse_int(u_char *, size_t *, u_char *, long *, - size_t); - u_char *asn_build_int(u_char *, size_t *, u_char, const long *, - size_t); - u_char *asn_parse_unsigned_int(u_char *, size_t *, u_char *, - u_long *, size_t); - u_char *asn_build_unsigned_int(u_char *, size_t *, u_char, - const u_long *, size_t); - u_char *asn_parse_string(u_char *, size_t *, u_char *, - u_char *, size_t *); - u_char *asn_build_string(u_char *, size_t *, u_char, - const u_char *, size_t); - u_char *asn_parse_header(u_char *, size_t *, u_char *); - u_char *asn_parse_sequence(u_char *, size_t *, u_char *, u_char expected_type, /* must be this type */ - const char *estr); /* error message prefix */ - u_char *asn_build_header(u_char *, size_t *, u_char, size_t); - u_char *asn_build_sequence(u_char *, size_t *, u_char, size_t); - u_char *asn_parse_length(u_char *, u_long *); - u_char *asn_build_length(u_char *, size_t *, size_t); - u_char *asn_parse_objid(u_char *, size_t *, u_char *, oid *, - size_t *); - u_char *asn_build_objid(u_char *, size_t *, u_char, oid *, - size_t); - u_char *asn_parse_null(u_char *, size_t *, u_char *); - u_char *asn_build_null(u_char *, size_t *, u_char); - u_char *asn_parse_bitstring(u_char *, size_t *, u_char *, - u_char *, size_t *); - u_char *asn_build_bitstring(u_char *, size_t *, u_char, - const u_char *, size_t); - u_char *asn_parse_unsigned_int64(u_char *, size_t *, u_char *, - struct counter64 *, size_t); - u_char *asn_build_unsigned_int64(u_char *, size_t *, u_char, - const struct counter64 *, size_t); - u_char *asn_parse_signed_int64(u_char *, size_t *, u_char *, - struct counter64 *, size_t); - u_char *asn_build_signed_int64(u_char *, size_t *, u_char, - const struct counter64 *, size_t); - u_char *asn_build_float(u_char *, size_t *, u_char, const float *, - size_t); - u_char *asn_parse_float(u_char *, size_t *, u_char *, float *, - size_t); - u_char *asn_build_double(u_char *, size_t *, u_char, const double *, - size_t); - u_char *asn_parse_double(u_char *, size_t *, u_char *, - double *, size_t); - -#ifdef USE_REVERSE_ASNENCODING - - /* - * Re-allocator function for below. - */ - - int asn_realloc(u_char **, size_t *); - - /* - * Re-allocating reverse ASN.1 encoder functions. Synopsis: - * - * u_char *buf = (u_char*)malloc(100); - * u_char type = (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER); - * size_t buf_len = 100, offset = 0; - * long data = 12345; - * int allow_realloc = 1; - * - * if (asn_realloc_rbuild_int(&buf, &buf_len, &offset, allow_realloc, - * type, &data, sizeof(long)) == 0) { - * error; - * } - * - * NOTE WELL: after calling one of these functions with allow_realloc - * non-zero, buf might have moved, buf_len might have grown and - * offset will have increased by the size of the encoded data. - * You should **NEVER** do something like this: - * - * u_char *buf = (u_char *)malloc(100), *ptr; - * u_char type = (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER); - * size_t buf_len = 100, offset = 0; - * long data1 = 1234, data2 = 5678; - * int rc = 0, allow_realloc = 1; - * - * rc = asn_realloc_rbuild_int(&buf, &buf_len, &offset, allow_realloc, - * type, &data1, sizeof(long)); - * ptr = buf[buf_len - offset]; / * points at encoding of data1 * / - * if (rc == 0) { - * error; - * } - * rc = asn_realloc_rbuild_int(&buf, &buf_len, &offset, allow_realloc, - * type, &data2, sizeof(long)); - * make use of ptr here; - * - * - * ptr is **INVALID** at this point. In general, you should store the - * offset value and compute pointers when you need them: - * - * - * - * u_char *buf = (u_char *)malloc(100), *ptr; - * u_char type = (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER); - * size_t buf_len = 100, offset = 0, ptr_offset; - * long data1 = 1234, data2 = 5678; - * int rc = 0, allow_realloc = 1; - * - * rc = asn_realloc_rbuild_int(&buf, &buf_len, &offset, allow_realloc, - * type, &data1, sizeof(long)); - * ptr_offset = offset; - * if (rc == 0) { - * error; - * } - * rc = asn_realloc_rbuild_int(&buf, &buf_len, &offset, allow_realloc, - * type, &data2, sizeof(long)); - * ptr = buf + buf_len - ptr_offset - * make use of ptr here; - * - * - * - * Here, you can see that ptr will be a valid pointer even if the block of - * memory has been moved, as it may well have been. Plenty of examples of - * usage all over asn1.c, snmp_api.c, snmpusm.c. - * - * The other thing you should **NEVER** do is to pass a pointer to a buffer - * on the stack as the first argument when allow_realloc is non-zero, unless - * you really know what you are doing and your machine/compiler allows you to - * free non-heap memory. There are rumours that such things exist, but many - * consider them no more than the wild tales of a fool. - * - * Of course, you can pass allow_realloc as zero, to indicate that you do not - * wish the packet buffer to be reallocated for some reason; perhaps because - * it is on the stack. This may be useful to emulate the functionality of - * the old API: - * - * u_char my_static_buffer[100], *cp = NULL; - * size_t my_static_buffer_len = 100; - * float my_pi = (float)22/(float)7; - * - * cp = asn_rbuild_float(my_static_buffer, &my_static_buffer_len, - * ASN_OPAQUE_FLOAT, &my_pi, sizeof(float)); - * if (cp == NULL) { - * error; - * } - * - * - * IS EQUIVALENT TO: - * - * - * u_char my_static_buffer[100]; - * size_t my_static_buffer_len = 100, my_offset = 0; - * float my_pi = (float)22/(float)7; - * int rc = 0; - * - * rc = asn_realloc_rbuild_float(&my_static_buffer, &my_static_buffer_len, - * &my_offset, 0, - * ASN_OPAQUE_FLOAT, &my_pi, sizeof(float)); - * if (rc == 0) { - * error; - * } - * - * - */ - - - int asn_realloc_rbuild_int(u_char ** pkt, size_t * pkt_len, - size_t * offset, - int allow_realloc, u_char type, - const long *data, size_t data_size); - - int asn_realloc_rbuild_string(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - u_char type, - const u_char * data, - size_t data_size); - - int asn_realloc_rbuild_unsigned_int(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - u_char type, - const u_long * data, - size_t data_size); - - int asn_realloc_rbuild_header(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - u_char type, - size_t data_size); - - int asn_realloc_rbuild_sequence(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - u_char type, - size_t data_size); - - int asn_realloc_rbuild_length(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - size_t data_size); - - int asn_realloc_rbuild_objid(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - u_char type, const oid *, - size_t); - - int asn_realloc_rbuild_null(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - u_char type); - - int asn_realloc_rbuild_bitstring(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - u_char type, - const u_char * data, - size_t data_size); - - int asn_realloc_rbuild_unsigned_int64(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - u_char type, - struct counter64 - const *data, size_t); - - int asn_realloc_rbuild_signed_int64(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - u_char type, - const struct counter64 *data, - size_t); - - int asn_realloc_rbuild_float(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - u_char type, const float *data, - size_t data_size); - - int asn_realloc_rbuild_double(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - u_char type, const double *data, - size_t data_size); -#endif - -#ifdef __cplusplus -} -#endif -#endif /* ASN1_H */ diff --git a/utils/net-snmp/library/callback.h b/utils/net-snmp/library/callback.h deleted file mode 100644 index 697e66e42..000000000 --- a/utils/net-snmp/library/callback.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * callback.c: A generic callback mechanism - */ - -#ifndef CALLBACK_H -#define CALLBACK_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define MAX_CALLBACK_IDS 2 -#define MAX_CALLBACK_SUBIDS 16 - - /* - * Callback Major Types - */ -#define SNMP_CALLBACK_LIBRARY 0 -#define SNMP_CALLBACK_APPLICATION 1 - - /* - * SNMP_CALLBACK_LIBRARY minor types - */ -#define SNMP_CALLBACK_POST_READ_CONFIG 0 -#define SNMP_CALLBACK_STORE_DATA 1 -#define SNMP_CALLBACK_SHUTDOWN 2 -#define SNMP_CALLBACK_POST_PREMIB_READ_CONFIG 3 -#define SNMP_CALLBACK_LOGGING 4 -#define SNMP_CALLBACK_SESSION_INIT 5 - - typedef int (SNMPCallback) (int majorID, int minorID, - void *serverarg, void *clientarg); - - struct snmp_gen_callback { - SNMPCallback *sc_callback; - void *sc_client_arg; - int priority; - struct snmp_gen_callback *next; - }; - - /* - * function prototypes - */ - void init_callbacks(void); - - int netsnmp_register_callback(int major, int minor, - SNMPCallback * new_callback, - void *arg, int priority); - int snmp_register_callback(int major, int minor, - SNMPCallback * new_callback, - void *arg); - int snmp_call_callbacks(int major, int minor, - void *caller_arg); - int snmp_callback_available(int major, int minor); /* is >1 available */ - int snmp_count_callbacks(int major, int minor); /* ret the number registered */ - int snmp_unregister_callback(int major, int minor, - SNMPCallback * new_callback, - void *arg, int matchargs); - void clear_callback (void); - struct snmp_gen_callback *snmp_callback_list(int major, int minor); - -#ifdef __cplusplus -} -#endif -#endif /* CALLBACK_H */ diff --git a/utils/net-snmp/library/check_varbind.h b/utils/net-snmp/library/check_varbind.h deleted file mode 100644 index d463c8093..000000000 --- a/utils/net-snmp/library/check_varbind.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef SNMP_CHECK_VARBIND_H -#define SNMP_CHECK_VARBIND_H - -#ifdef __cplusplus -extern "C" { -#endif - - /* - * Assorted convience routines to check the contents of a - * netsnmp_variable_list instance. - */ - - int netsnmp_check_vb_type(const netsnmp_variable_list *var, int type); - int netsnmp_check_vb_size(const netsnmp_variable_list *var, size_t size ); - int netsnmp_check_vb_size_range(const netsnmp_variable_list *var, - size_t low, size_t high ); - - int netsnmp_check_vb_type_and_size(const netsnmp_variable_list *var, - int type, size_t size); - - int netsnmp_check_vb_int_range(const netsnmp_variable_list *var, int low, - int high); - - int netsnmp_check_vb_truthvalue(const netsnmp_variable_list *var); - - int netsnmp_check_vb_rowstatus_value(const netsnmp_variable_list *var); - int netsnmp_check_vb_rowstatus(const netsnmp_variable_list *var, int old_val); - - int netsnmp_check_vb_storagetype(const netsnmp_variable_list *var, int old_val); - - -#ifdef __cplusplus -} -#endif -#endif /* SNMP_CHECK_VARBIND_H */ diff --git a/utils/net-snmp/library/cmu_compat.h b/utils/net-snmp/library/cmu_compat.h deleted file mode 100644 index 665160256..000000000 --- a/utils/net-snmp/library/cmu_compat.h +++ /dev/null @@ -1,293 +0,0 @@ -/* Portions of this file are subject to the following copyright(s). See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/* - * Portions of this file are copyrighted by: - * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ - -/* - * CMU compatability definitions and structures. - * - * (since the UCD package split from the CMU one - * about 8 years ago, that's probably enough time - * for people to convert any outstanding code!) - */ - -#ifndef NET_SNMP_CMU_COMPAT_H -#define NET_SNMP_CMU_COMPAT_H - -#ifdef __cplusplus -extern "C" { -#endif - - /* - * ============================ - * * - * * Enumerations and definitions - * * - * * ============================ - */ -#include - /* - * From parse.h - */ -#define ACCESS_READONLY MIB_ACCESS_READONLY -#define ACCESS_READWRITE MIB_ACCESS_READWRITE -#define ACCESS_WRITEONLY MIB_ACCESS_WRITEONLY -#define ACCESS_NOACCESS MIB_ACCESS_NOACCESS -#define ACCESS_NOTIFY MIB_ACCESS_NOTIFY -#define ACCESS_CREATE MIB_ACCESS_CREATE -#define STATUS_MANDATORY MIB_STATUS_MANDATORY -#define STATUS_OPTIONAL MIB_STATUS_OPTIONAL -#define STATUS_OBSOLETE MIB_STATUS_OBSOLETE -#define STATUS_DEPRECATED MIB_STATUS_DEPRECATED -#define STATUS_CURRENT MIB_STATUS_CURRENT - /* - * From smnp_impl.h - */ -#define INTEGER ASN_INTEGER -#define STRING ASN_OCTET_STR -#define OBJID ASN_OBJECT_ID -#define NULLOBJ ASN_NULL -#define BITSTRING ASN_BIT_STR /* HISTORIC - don't use */ -#define IPADDRESS ASN_IPADDRESS -#define COUNTER ASN_COUNTER -#define GAUGE ASN_GAUGE -#define UNSIGNED ASN_UNSIGNED -#define TIMETICKS ASN_TIMETICKS -#define ASNT_OPAQUE ASN_OPAQUE -#define NSAP ASN_NSAP -#define COUNTER64 ASN_COUNTER64 -#define UINTEGER ASN_UINTEGER - /* - * From snmp.h - */ -#define GET_REQ_MSG SNMP_MSG_GET -#define GETNEXT_REQ_MSG SNMP_MSG_GETNEXT -#define GET_RSP_MSG SNMP_MSG_RESPONSE -#define SET_REQ_MSG SNMP_MSG_SET -#define TRP_REQ_MSG SNMP_MSG_TRAP -#define BULK_REQ_MSG SNMP_MSG_GETBULK -#define INFORM_REQ_MSG SNMP_MSG_INFORM -#define TRP2_REQ_MSG SNMP_MSG_TRAP2 -#define REPORT_RSP_MSG SNMP_MSG_REPORT - /* - * since CMU V1.5 - */ -#define SNMP_PDU_GET SNMP_MSG_GET -#define SNMP_PDU_GETNEXT SNMP_MSG_GETNEXT -#define SNMP_PDU_RESPONSE SNMP_MSG_RESPONSE -#define SNMP_PDU_SET SNMP_MSG_SET -#define SNMP_PDU_GETBULK SNMP_MSG_GETBULK -#define SNMP_PDU_INFORM SNMP_MSG_INFORM -#define SNMP_PDU_V2TRAP SNMP_MSG_TRAP2 -#define SNMP_PDU_REPORT SNMP_MSG_REPORT -#define SNMP_TRAP_AUTHENTICATIONFAILURE SNMP_TRAP_AUTHFAIL -#define SMI_INTEGER ASN_INTEGER -#define SMI_STRING ASN_OCTET_STR -#define SMI_OBJID ASN_OBJECT_ID -#define SMI_NULLOBJ ASN_NULL -#define SMI_IPADDRESS ASN_IPADDRESS -#define SMI_COUNTER32 ASN_COUNTER -#define SMI_GAUGE32 ASN_GAUGE -#define SMI_UNSIGNED32 SMI_GAUGE32 -#define SMI_TIMETICKS ASN_TIMETICKS -#define SMI_OPAQUE ASN_OPAQUE -#define SMI_COUNTER64 ASN_COUNTER64 - /* - * ============================ - * * - * * Function declarations - * * and global variables - * * - * * ============================ - */ -extern int snmp_dump_packet; /* from snmp_api.h */ -extern int quick_print; /* from snmp_api.h */ - -#include /* for snmp_pdu & snmp_session */ - -int mib_TxtToOid(char *, oid **, size_t *); /* from snmp.h */ -int mib_OidToTxt(oid *, size_t, char *, size_t); /* from snmp.h */ -char *snmp_pdu_type(netsnmp_pdu *); /* from snmp.h */ -u_char *cmu_snmp_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, size_t length); /* from snmp.h */ - - - - - /* - * ============================ - * * - * * MIB-II data structures - * * (from mib.h) - * * - * * ============================ - */ - - -struct mib_system { - char sysDescr[32]; /* textual description */ - u_char sysObjectID[16]; /* OBJECT IDENTIFIER of system */ - u_char ObjIDLen; /* length of sysObjectID */ - u_int sysUpTime; /* Uptime in 100/s of a second */ -}; - -struct mib_interface { - int ifNumber; /* number of interfaces */ -}; - -struct mib_ifEntry { - int ifIndex; /* index of this interface */ - char ifDescr[32]; /* english description of interface */ - int ifType; /* network type of device */ - int ifMtu; /* size of largest packet in bytes */ - u_int ifSpeed; /* bandwidth in bits/sec */ - u_char ifPhysAddress[11]; /* interface's address */ - u_char PhysAddrLen; /* length of physAddr */ - int ifAdminStatus; /* desired state of interface */ - int ifOperStatus; /* current operational status */ - u_int ifLastChange; /* value of sysUpTime when current state entered */ - u_int ifInOctets; /* number of octets received on interface */ - u_int ifInUcastPkts; /* number of unicast packets delivered */ - u_int ifInNUcastPkts; /* number of broadcasts or multicasts */ - u_int ifInDiscards; /* number of packets discarded with no error */ - u_int ifInErrors; /* number of packets containing errors */ - u_int ifInUnknownProtos; /* number of packets with unknown protocol */ - u_int ifOutOctets; /* number of octets transmitted */ - u_int ifOutUcastPkts; /* number of unicast packets sent */ - u_int ifOutNUcastPkts; /* number of broadcast or multicast pkts */ - u_int ifOutDiscards; /* number of packets discarded with no error */ - u_int ifOutErrors; /* number of pkts discarded with an error */ - u_int ifOutQLen; /* number of packets in output queue */ -}; - -struct mib_atEntry { - int atIfIndex; /* interface on which this entry maps */ - u_char atPhysAddress[11]; /* physical address of destination */ - u_char PhysAddressLen; /* length of atPhysAddress */ - u_int atNetAddress; /* IP address of physical address */ -}; - -struct mib_ip { - int ipForwarding; /* 1 if gateway, 2 if host */ - int ipDefaultTTL; /* default TTL for pkts originating here */ - u_int ipInReceives; /* no. of IP packets received from interfaces */ - u_int ipInHdrErrors; /* number of pkts discarded due to header errors */ - u_int ipInAddrErrors; /* no. of pkts discarded due to bad address */ - u_int ipForwDatagrams; /* number pf pkts forwarded through this entity */ - u_int ipInUnknownProtos; /* no. of local-addressed pkts w/unknown proto */ - u_int ipInDiscards; /* number of error-free packets discarded */ - u_int ipInDelivers; /* number of datagrams delivered to upper level */ - u_int ipOutRequests; /* number of IP datagrams originating locally */ - u_int ipOutDiscards; /* number of error-free output IP pkts discarded */ - u_int ipOutNoRoutes; /* number of IP pkts discarded due to no route */ - int ipReasmTimeout; /* seconds fragment is held awaiting reassembly */ - u_int ipReasmReqds; /* no. of fragments needing reassembly (here) */ - u_int ipReasmOKs; /* number of fragments reassembled */ - u_int ipReasmFails; /* number of failures in IP reassembly */ - u_int ipFragOKs; /* number of datagrams fragmented here */ - u_int ipFragFails; /* no. pkts unable to be fragmented here */ - u_int ipFragCreates; /* number of IP fragments created here */ -}; - -struct mib_ipAddrEntry { - u_int ipAdEntAddr; /* IP address of this entry */ - int ipAdEntIfIndex; /* IF for this entry */ - u_int ipAdEntNetMask; /* subnet mask of this entry */ - int ipAdEntBcastAddr; /* read the MIB for this one */ - int ipAdEntReasmMaxSize; - /* max size for dg reassembly {ipAddrEntry 5} */ -}; - -struct mib_ipRouteEntry { - u_int ipRouteDest; /* destination IP addr for this route */ - int ipRouteIfIndex; /* index of local IF for this route */ - int ipRouteMetric1; /* Primary routing metric */ - int ipRouteMetric2; /* Alternate routing metric */ - int ipRouteMetric3; /* Alternate routing metric */ - int ipRouteMetric4; /* Alternate routing metric */ - u_int ipRouteNextHop; /* IP addr of next hop */ - int ipRouteType; /* Type of this route */ - int ipRouteProto; /* How this route was learned */ - int ipRouteAge; /* No. of seconds since updating this route */ -}; - -struct mib_icmp { - u_int icmpInMsgs; /* Total of ICMP msgs received */ - u_int icmpInErrors; /* Total of ICMP msgs received with errors */ - u_int icmpInDestUnreachs; - u_int icmpInTimeExcds; - u_int icmpInParmProbs; - u_int icmpInSrcQuenchs; - u_int icmpInRedirects; - u_int icmpInEchos; - u_int icmpInEchoReps; - u_int icmpInTimestamps; - u_int icmpInTimestampReps; - u_int icmpInAddrMasks; - u_int icmpInAddrMaskReps; - u_int icmpOutMsgs; - u_int icmpOutErrors; - u_int icmpOutDestUnreachs; - u_int icmpOutTimeExcds; - u_int icmpOutParmProbs; - u_int icmpOutSrcQuenchs; - u_int icmpOutRedirects; - u_int icmpOutEchos; - u_int icmpOutEchoReps; - u_int icmpOutTimestamps; - u_int icmpOutTimestampReps; - u_int icmpOutAddrMasks; - u_int icmpOutAddrMaskReps; -}; - -struct mib_tcp { - int tcpRtoAlgorithm; /* retransmission timeout algorithm */ - int tcpRtoMin; /* minimum retransmission timeout (mS) */ - int tcpRtoMax; /* maximum retransmission timeout (mS) */ - int tcpMaxConn; /* maximum tcp connections possible */ - u_int tcpActiveOpens; /* number of SYN-SENT -> CLOSED transitions */ - u_int tcpPassiveOpens; /* number of SYN-RCVD -> LISTEN transitions */ - u_int tcpAttemptFails; /*(SYN-SENT,SYN-RCVD)->CLOSED or SYN-RCVD->LISTEN */ - u_int tcpEstabResets; /* (ESTABLISHED,CLOSE-WAIT) -> CLOSED */ - u_int tcpCurrEstab; /* number in ESTABLISHED or CLOSE-WAIT state */ - u_int tcpInSegs; /* number of segments received */ - u_int tcpOutSegs; /* number of segments sent */ - u_int tcpRetransSegs; /* number of retransmitted segments */ -}; - -struct mib_tcpConnEntry { - int tcpConnState; /* State of this connection */ - u_int tcpConnLocalAddress; /* local IP address for this connection */ - int tcpConnLocalPort; /* local port for this connection */ - u_int tcpConnRemAddress; /* remote IP address for this connection */ - int tcpConnRemPort; /* remote port for this connection */ -}; - -struct mib_udp { - u_int udpInDatagrams; /* No. of UDP datagrams delivered to users */ - u_int udpNoPorts; /* No. of UDP datagrams to port with no listener */ - u_int udpInErrors; /* No. of UDP datagrams unable to be delivered */ - u_int udpOutDatagrams; /* No. of UDP datagrams sent from this entity */ -}; - -struct mib_egp { - u_int egpInMsgs; /* No. of EGP msgs received without error */ - u_int egpInErrors; /* No. of EGP msgs received with error */ - u_int egpOutMsgs; /* No. of EGP msgs sent */ - u_int egpOutErrors; /* No. of (outgoing) EGP msgs dropped due to error */ -}; - -struct mib_egpNeighEntry { - int egpNeighState; /* local EGP state with this entry's neighbor */ - u_int egpNeighAddr; /* IP address of this entry's neighbor */ -}; - -#ifdef __cplusplus -} -#endif -#endif /* NET_SNMP_CMU_COMPAT_H */ diff --git a/utils/net-snmp/library/container.h b/utils/net-snmp/library/container.h deleted file mode 100644 index 2908e5f4d..000000000 --- a/utils/net-snmp/library/container.h +++ /dev/null @@ -1,497 +0,0 @@ -#ifndef NETSNMP_CONTAINER_H -#define NETSNMP_CONTAINER_H - -/* - * $Id: container.h,v 1.25 2004/09/14 02:29:16 rstory Exp $ - * - * WARNING: This is a recently created file, and all of it's contents are - * subject to change at any time. - * - * A basic container template. A generic way for code to store and - * retrieve data. Allows for interchangable storage algorithms. - */ -#ifndef NET_SNMP_CONFIG_H -#error "Please include before this file" -#endif - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - /************************************************************************* - * - * function pointer definitions - * - *************************************************************************/ - struct netsnmp_iterator_s; /** forward declare */ - struct netsnmp_container_s; /** forward declare */ - - /* - * function returning an int for an operation on a container - */ - typedef int (netsnmp_container_rc)(struct netsnmp_container_s *); - - /* - * function returning an int for an operation on a container - */ - typedef struct netsnmp_iterator_s * (netsnmp_container_it) - (struct netsnmp_container_s *); - - /* - * function returning a size_t for an operation on a container - */ - typedef size_t (netsnmp_container_size)(struct netsnmp_container_s *); - - /* - * function returning an int for an operation on an object and - * a container - */ - typedef int (netsnmp_container_op)(struct netsnmp_container_s *, - const void *data); - - /* - * function returning an oject for an operation on an object and a - * container - */ - typedef void * (netsnmp_container_rtn)(struct netsnmp_container_s *, - const void *data); - - /* - * function with no return which acts on an object - */ - typedef void (netsnmp_container_obj_func)(void *data, void *context); - - /* - * function with no return which acts on an object - */ - typedef void (netsnmp_container_func)(struct netsnmp_container_s *, - netsnmp_container_obj_func *, - void *context); - - /* - * function returning an array of objects for an operation on an - * ojbect and a container - */ - typedef netsnmp_void_array * (netsnmp_container_set) - (struct netsnmp_container_s *, void *data); - - /* - * function returning an int for a comparison between two objects - */ - typedef int (netsnmp_container_compare)(const void *lhs, - const void *rhs); - - /************************************************************************* - * - * Basic container - * - *************************************************************************/ - typedef struct netsnmp_container_s { - - /* - * pointer for container implementation - */ - void * container_data; - - /* - * returns the number of items in a container - */ - netsnmp_container_size *get_size; - - /* - * initialize a container - */ - netsnmp_container_rc *init; - - /* - * release memory used by a container. - * - * Note: if your data structures contained allocated - * memory, you are responsible for releasing that - * memory before calling this function! - */ - netsnmp_container_rc *cfree; - - /* - * add an entry to the container - */ - netsnmp_container_op *insert; - - /* - * remove an entry from the container - */ - netsnmp_container_op *remove; - - /* - * release memory for an entry from the container - */ - netsnmp_container_op *release; - - /* - * Note: do not change the key! If you need to - * change a key, remove the entry, change the key, - * and the re-add the entry. - */ - - /* - * find the entry in the container with the same key - * - */ - netsnmp_container_rtn *find; - - /* - * find the entry in the container with the next highest key - * - * If the key is NULL, return the first item in the container. - */ - netsnmp_container_rtn *find_next; - - /* - * find all entries in the container which match the partial key - * returns allocated memory (netsnmp_void_array). User is responsible - * for releasing this memory (free(array->array), free(array)). - * DO NOT FREE ELEMENTS OF THE ARRAY, because they are the same pointers - * stored in the container. - */ - netsnmp_container_set *get_subset; - - /* - * function to return an iterator for the container - */ - netsnmp_container_it *get_iterator; - - /* - * function to call another function for each object in the container - */ - netsnmp_container_func *for_each; - - /* - * specialized version of for_each used to optimize cleanup. - * clear the container, optionally calling a function for each item. - */ - netsnmp_container_func *clear; - - /* - * function to compare two object stored in the container. - * - * Returns: - * - * -1 LHS < RHS - * 0 LHS = RHS - * 1 LHS > RHS - */ - netsnmp_container_compare *compare; - - /* - * same as compare, but RHS will be a partial key - */ - netsnmp_container_compare *ncompare; - - /* - * unique name for finding a particular container in a list - */ - char *container_name; - - /* - * containers can contain other containers (additional indexes) - */ - struct netsnmp_container_s *next, *prev; - - } netsnmp_container; - - /* - * initialize/free a container of container factories. used by - * netsnmp_container_find* functions. - */ - void netsnmp_container_init_list(void); - void netsnmp_container_free_list(void); - - /* - * register a new container factory - */ - int netsnmp_container_register(const char* name, netsnmp_factory *f); - - /* - * search for and create a container from a list of types or a - * specific type. - */ - netsnmp_container * netsnmp_container_find(const char *type_list); - netsnmp_container * netsnmp_container_get(const char *type); - - /* - * utility routines - */ - void netsnmp_container_add_index(netsnmp_container *primary, - netsnmp_container *new_index); - - - netsnmp_factory *netsnmp_container_get_factory(const char *type); - - /* - * common comparison routines - */ - /** first data element is a 'netsnmp_index' */ - int netsnmp_compare_netsnmp_index(const void *lhs, const void *rhs); - int netsnmp_ncompare_netsnmp_index(const void *lhs, const void *rhs); - - /** first data element is a 'char *' */ - int netsnmp_compare_cstring(const void * lhs, const void * rhs); - int netsnmp_ncompare_cstring(const void * lhs, const void * rhs); - - /** useful for octet strings */ - int netsnmp_compare_mem(const char * lhs, size_t lhs_len, - const char * rhs, size_t rhs_len); - - /** for_each callback to call free on data item */ - void netsnmp_container_simple_free(void *data, void *context); - - /* - * useful macros (x = container; k = key; c = user context) - */ -#define CONTAINER_FIRST(x) (x)->find_next(x,NULL) -#define CONTAINER_FIND(x,k) (x)->find(x,k) -#define CONTAINER_NEXT(x,k) (x)->find_next(x,k) -/* - * GET_SUBSET returns allocated memory (netsnmp_void_array). User is responsible - * for releasing this memory (free(array->array), free(array)). - * DO NOT FREE ELEMENTS OF THE ARRAY, because they are the same pointers - * stored in the container. - */ -#define CONTAINER_GET_SUBSET(x,k) (x)->get_subset(x,k) -#define CONTAINER_SIZE(x) (x)->get_size(x) -#define CONTAINER_ITERATOR(x) (x)->get_iterator(x) -#define CONTAINER_COMPARE(x,l,r) (x)->compare(l,r) -#define CONTAINER_FOR_EACH(x,f,c) (x)->for_each(x,f,c) - - /* - * if you are getting multiple definitions of these three - * inline functions, you most likely have optimizations turned off. - * Either turn them back on, or define NETSNMP_NO_INLINE - */ -#ifndef NETSNMP_USE_INLINE /* default is to inline */ - /* - * insert k into all containers - */ - int CONTAINER_INSERT(netsnmp_container *x, const void *k); - - /* - * remove k from all containers - */ - int CONTAINER_REMOVE(netsnmp_container *x, const void *k); - - /* - * clear all containers. When clearing the *first* container, and - * *only* the first container, call the function f for each item. - * After calling this function, all containers should be empty. - */ - void CONTAINER_CLEAR(netsnmp_container *x, netsnmp_container_obj_func *f, - void *c); - /* - * free all containers - */ - int CONTAINER_FREE(netsnmp_container *x); -#else - /*------------------------------------------------------------------ - * These functions should EXACTLY match the function version in - * container.c. If you change one, change them both. - */ - NETSNMP_STATIC_INLINE /* gcc docs recommend static w/inline */ - int CONTAINER_INSERT(netsnmp_container *x, const void *k) - { - int rc2, rc = 0; - - /** start at first container */ - while(x->prev) - x = x->prev; - while(x) { - rc2 = x->insert(x,k); - if (rc2) { - snmp_log(LOG_ERR,"error on subcontainer insert (%d)\n", rc2); - rc = rc2; - } - x = x->next; - } - return rc; - } - - /*------------------------------------------------------------------ - * These functions should EXACTLY match the function version in - * container.c. If you change one, change them both. - */ - NETSNMP_STATIC_INLINE /* gcc docs recommend static w/inline */ - int CONTAINER_REMOVE(netsnmp_container *x, const void *k) - { - int rc2, rc = 0; - - /** start at last container */ - while(x->next) - x = x->next; - while(x) { - rc2 = x->remove(x,k); - if (rc2) { - snmp_log(LOG_ERR,"error on subcontainer remove (%d)\n", rc2); - rc = rc2; - } - x = x->prev; - - } - return rc; - } - - /*------------------------------------------------------------------ - * These functions should EXACTLY match the function version in - * container.c. If you change one, change them both. - */ - NETSNMP_STATIC_INLINE /* gcc docs recommend static w/inline */ - int CONTAINER_FREE(netsnmp_container *x) - { - int rc2, rc = 0; - - /** start at last container */ - while(x->next) - x = x->next; - while(x) { - netsnmp_container *tmp; - tmp = x->prev; - if (NULL != x->container_name) - SNMP_FREE(x->container_name); - rc2 = x->cfree(x); - if (rc2) { - snmp_log(LOG_ERR,"error on subcontainer cfree (%d)\n", rc2); - rc = rc2; - } - x = tmp; - } - return rc; - } - - /*------------------------------------------------------------------ - * These functions should EXACTLY match the function version in - * container.c. If you change one, change them both. - */ - /* - * clear all containers. When clearing the *first* container, and - * *only* the first container, call the function f for each item. - * After calling this function, all containers should be empty. - */ - NETSNMP_STATIC_INLINE /* gcc docs recommend static w/inline */ - void CONTAINER_CLEAR(netsnmp_container *x, netsnmp_container_obj_func *f, - void *c) - { - /** start at last container */ - while(x->next) - x = x->next; - while(x->prev) { - x->clear(x, NULL, c); - x = x->prev; - } - x->clear(x, f, c); - } - - /*------------------------------------------------------------------ - * These functions should EXACTLY match the function version in - * container.c. If you change one, change them both. - */ - /* - * Find a sub-container with the given name - */ - NETSNMP_STATIC_INLINE /* gcc docs recommend static w/inline */ - netsnmp_container *SUBCONTAINER_FIND(netsnmp_container *x, - const char* name) - { - if ((NULL == x) || (NULL == name)) - return NULL; - - /** start at first container */ - while(x->prev) - x = x->prev; - while(x) { - if ((NULL != x->container_name) && - (0 == strcmp(name,x->container_name))) - break; - x = x->next; - } - return x; - } - -#endif - - /************************************************************************* - * - * container iterator - * - *************************************************************************/ - /* - * function returning an int for an operation on an iterator - */ - typedef int (netsnmp_iterator_rc)(struct netsnmp_iterator_s *); - - /* - * function returning an int for an operation on an iterator and - * an object in the container. - */ - typedef int (netsnmp_iterator_rc_op)(struct netsnmp_iterator_s *, - void *data); - - /* - * function returning an oject for an operation on an iterator - */ - typedef void * (netsnmp_iterator_rtn)(struct netsnmp_iterator_s *); - - typedef struct netsnmp_iterator_s { - - netsnmp_container *container; - - void *context; - - netsnmp_iterator_rc *init; - netsnmp_iterator_rc_op *position; - netsnmp_iterator_rtn *first; - netsnmp_iterator_rtn *next; - netsnmp_iterator_rtn *last; - - } netsnmp_iterator; - - -#define ITERATOR_FIRST(x) x->first(x) -#define ITERATOR_NEXT(x) x->next(x) -#define ITERATOR_LAST(x) x->last(x) - - - /************************************************************************* - * - * Sorted container - * - *************************************************************************/ - typedef struct netsnmp_sorted_container_s { - - netsnmp_container bc; - - /* - * methods to manipulate container - */ - - netsnmp_container_rtn *first; - netsnmp_container_rtn *next; - netsnmp_container_set *subset; - - } netsnmp_sorted_container; - - - void - netsnmp_init_sorted_container(netsnmp_sorted_container *sc, - netsnmp_container_rtn *first, - netsnmp_container_rtn *next, - netsnmp_container_set *subset); - - - -#ifdef __cplusplus -} -#endif - -#endif /** NETSNMP_CONTAINER_H */ diff --git a/utils/net-snmp/library/container_binary_array.h b/utils/net-snmp/library/container_binary_array.h deleted file mode 100644 index a473aa9c6..000000000 --- a/utils/net-snmp/library/container_binary_array.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * binary_array.h - * $Id: container_binary_array.h,v 1.6 2004/03/02 05:03:36 rstory Exp $ - */ - -#ifndef BINARY_ARRAY_H -#define BINARY_ARRAY_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - - /* - * initialize binary array container. call at startup. - */ - void netsnmp_container_binary_array_init(void); - - /* - * get an container which uses an binary_array for storage - */ - netsnmp_container * netsnmp_container_get_binary_array(void); - - /* - * get a factory for producing binary_array objects - */ - netsnmp_factory * netsnmp_container_get_binary_array_factory(void); - - - int netsnmp_binary_array_remove(netsnmp_container *c, const void *key, - void **save); - - void netsnmp_binary_array_release(netsnmp_container *c); - - void netsnmp_container_binary_array_init(void); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/library/container_iterator.h b/utils/net-snmp/library/container_iterator.h deleted file mode 100644 index 6878292d1..000000000 --- a/utils/net-snmp/library/container_iterator.h +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @file container_iterator.h - * @addtogroup container_iterator - * @{ - */ -#ifndef _CONTAINER_ITERATOR_HANDLER_H_ -#define _CONTAINER_ITERATOR_HANDLER_H_ - -#include "container.h" - -#ifdef __cplusplus -extern "C" { -#endif - - typedef int (Netsnmp_Iterator_Loop_Key) (void *iterator_ctx, - netsnmp_ref_void* loop_ctx, - netsnmp_ref_void* key); - typedef int (Netsnmp_Iterator_Loop_Data)(void *iterator_ctx, - netsnmp_ref_void* loop_ctx, - netsnmp_ref_void* data); - typedef int (Netsnmp_Iterator_Ctx) (void *iterator_ctx, - netsnmp_ref_void* loop_ctx); - typedef int (Netsnmp_Iterator_Ctx_Dup) (void *iterator_ctx, - netsnmp_ref_void* loop_ctx, - netsnmp_ref_void* dup_ctx, - int reuse); - typedef int (Netsnmp_Iterator_Op) (void *iterator_ctx); - typedef int (Netsnmp_Iterator_Data) (void *iterator_ctx, - const void *data); - - void netsnmp_container_iterator_init(void); - - netsnmp_container* netsnmp_container_iterator_get( - void *iterator_user_ctx, - netsnmp_container_compare * compare, - Netsnmp_Iterator_Loop_Key * get_first, - Netsnmp_Iterator_Loop_Key * get_next, - Netsnmp_Iterator_Loop_Data * get_data, - Netsnmp_Iterator_Ctx_Dup * save_pos, /* iff returning static data */ - Netsnmp_Iterator_Ctx * init_loop_ctx, - Netsnmp_Iterator_Ctx * cleanup_loop_ctx, - Netsnmp_Iterator_Data * free_user_ctx, - int sorted); - - /* - * set up optional callbacks/ - * NOTE: even though the first parameter is a generic netsnmp_container, - * this function should only be called for a container created - * by netsnmp_container_iterator_get. - */ - void - netsnmp_container_iterator_set_data_cb(netsnmp_container *c, - Netsnmp_Iterator_Data * insert_data, - Netsnmp_Iterator_Data * remove_data, - Netsnmp_Iterator_Op * get_size); - -#ifdef __cplusplus -} -#endif - -#endif /* _CONTAINER_ITERATOR_HANDLER_H_ */ -/** @} */ diff --git a/utils/net-snmp/library/container_list_ssll.h b/utils/net-snmp/library/container_list_ssll.h deleted file mode 100644 index 6f5e29e3e..000000000 --- a/utils/net-snmp/library/container_list_ssll.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * container_list_sl.h - * $Id: container_list_ssll.h,v 1.3 2004/09/14 02:29:16 rstory Exp $ - * - */ -#ifndef NETSNMP_CONTAINER_SSLL_H -#define NETSNMP_CONTAINER_SSLL_H - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - netsnmp_container *netsnmp_container_get_sorted_singly_linked_list(void); - netsnmp_container *netsnmp_container_get_singly_linked_list(int fifo); - - void netsnmp_container_ssll_init(void); - - -#ifdef __cplusplus -} -#endif - -#endif /** NETSNMP_CONTAINER_SSLL_H */ diff --git a/utils/net-snmp/library/container_null.h b/utils/net-snmp/library/container_null.h deleted file mode 100644 index 64896063f..000000000 --- a/utils/net-snmp/library/container_null.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef NETSNMP_CONTAINER_NULL_H -#define NETSNMP_CONTAINER_NULL_H - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -netsnmp_container *netsnmp_container_get_null(void); - - void netsnmp_container_null_init(void); - - -#ifdef __cplusplus -} -#endif - -#endif /** NETSNMP_CONTAINER_NULL_H */ diff --git a/utils/net-snmp/library/data_list.h b/utils/net-snmp/library/data_list.h deleted file mode 100644 index ba118f8b3..000000000 --- a/utils/net-snmp/library/data_list.h +++ /dev/null @@ -1,98 +0,0 @@ -/* Portions of this file are subject to the following copyright(s). See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/* - * Portions of this file are copyrighted by: - * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ -/* - * @file netsnmp_data_list.h - * - * @addtogroup agent - * @addtogroup library * - * - * $Id: data_list.h,v 5.3 2004/02/16 20:46:24 hardaker Exp $ - * - * External definitions for functions and variables in netsnmp_data_list.c. - * - * @{ - */ - -#ifndef DATA_LIST_H -#define DATA_LIST_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - - typedef void (Netsnmp_Free_List_Data) (void *); - typedef int (Netsnmp_Save_List_Data) (char *buf, size_t buf_len, void *); - typedef void * (Netsnmp_Read_List_Data) (char *buf, size_t buf_len); - -/** @struct netsnmp_data_list_s - * used to iterate through lists of data - */ - typedef struct netsnmp_data_list_s { - struct netsnmp_data_list_s *next; - char *name; - /** The pointer to the data passed on. */ - void *data; - /** must know how to free netsnmp_data_list->data */ - Netsnmp_Free_List_Data *free_func; - } netsnmp_data_list; - - typedef struct netsnmp_data_list_saveinfo_s { - netsnmp_data_list **datalist; - const char *type; - const char *token; - Netsnmp_Save_List_Data *data_list_save_ptr; - Netsnmp_Read_List_Data *data_list_read_ptr; - Netsnmp_Free_List_Data *data_list_free_ptr; - } netsnmp_data_list_saveinfo; - - NETSNMP_INLINE netsnmp_data_list * - netsnmp_create_data_list(const char *, void *, Netsnmp_Free_List_Data* ); - void netsnmp_data_list_add_node(netsnmp_data_list **head, - netsnmp_data_list *node); - netsnmp_data_list * - netsnmp_data_list_add_data(netsnmp_data_list **head, - const char *name, void *data, - Netsnmp_Free_List_Data * beer); - void *netsnmp_get_list_data(netsnmp_data_list *head, - const char *node); - void netsnmp_free_list_data(netsnmp_data_list *head); /* single */ - void netsnmp_free_all_list_data(netsnmp_data_list *head); /* multiple */ - int netsnmp_remove_list_node(netsnmp_data_list **realhead, - const char *name); - NETSNMP_INLINE netsnmp_data_list * - netsnmp_get_list_node(netsnmp_data_list *head, - const char *name); - - /** depreciated: use netsnmp_data_list_add_node() */ - void netsnmp_add_list_data(netsnmp_data_list **head, - netsnmp_data_list *node); - - - void - netsnmp_register_save_list(netsnmp_data_list **datalist, - const char *type, const char *token, - Netsnmp_Save_List_Data *data_list_save_ptr, - Netsnmp_Read_List_Data *data_list_read_ptr, - Netsnmp_Free_List_Data *data_list_free_ptr); - int - netsnmp_save_all_data(netsnmp_data_list *head, - const char *type, const char *token, - Netsnmp_Save_List_Data * data_list_save_ptr); - SNMPCallback netsnmp_save_all_data_callback; - void netsnmp_read_data_callback(const char *token, char *line); -#ifdef __cplusplus -} -#endif -#endif -/** @} */ diff --git a/utils/net-snmp/library/default_store.h b/utils/net-snmp/library/default_store.h deleted file mode 100644 index 36cc16845..000000000 --- a/utils/net-snmp/library/default_store.h +++ /dev/null @@ -1,162 +0,0 @@ -/* Portions of this file are subject to the following copyright(s). See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/* - * Portions of this file are copyrighted by: - * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ -/* - * @file default_store.h: storage space for defaults - * - * @addtogroup default_store - * - * @{ - */ -#ifndef DEFAULT_STORE_H -#define DEFAULT_STORE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define NETSNMP_DS_MAX_IDS 3 -#define NETSNMP_DS_MAX_SUBIDS 40 /* needs to be a multiple of 8 */ - - /* - * begin storage definitions - */ -/** - * @def NETSNMP_DS_LIBRARY_ID These definitions correspond with the "storid" argument to the API - */ -#define NETSNMP_DS_LIBRARY_ID 0 -#define NETSNMP_DS_APPLICATION_ID 1 -#define NETSNMP_DS_TOKEN_ID 2 - - /* - * These definitions correspond with the "which" argument to the API, - * when the storeid argument is NETSNMP_DS_LIBRARY_ID - */ - /* - * library booleans - */ -#define NETSNMP_DS_LIB_MIB_ERRORS 0 -#define NETSNMP_DS_LIB_SAVE_MIB_DESCRS 1 -#define NETSNMP_DS_LIB_MIB_COMMENT_TERM 2 -#define NETSNMP_DS_LIB_MIB_PARSE_LABEL 3 -#define NETSNMP_DS_LIB_DUMP_PACKET 4 -#define NETSNMP_DS_LIB_LOG_TIMESTAMP 5 -#define NETSNMP_DS_LIB_DONT_READ_CONFIGS 6 -#define NETSNMP_DS_LIB_MIB_REPLACE 7 /* replace objects from latest module */ -#define NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM 8 /* print only numeric enum values */ -#define NETSNMP_DS_LIB_PRINT_NUMERIC_OIDS 9 /* print only numeric enum values */ -#define NETSNMP_DS_LIB_DONT_BREAKDOWN_OIDS 10 /* dont print oid indexes specially */ -#define NETSNMP_DS_LIB_ALARM_DONT_USE_SIG 11 /* don't use the alarm() signal */ -#define NETSNMP_DS_LIB_PRINT_FULL_OID 12 /* print fully qualified oids */ -#define NETSNMP_DS_LIB_QUICK_PRINT 13 /* print very brief output for parsing */ -#define NETSNMP_DS_LIB_RANDOM_ACCESS 14 /* random access to oid labels */ -#define NETSNMP_DS_LIB_REGEX_ACCESS 15 /* regex matching to oid labels */ -#define NETSNMP_DS_LIB_DONT_CHECK_RANGE 16 /* don't check values for ranges on send */ -#define NETSNMP_DS_LIB_NO_TOKEN_WARNINGS 17 /* no warn about unknown config tokens */ -#define NETSNMP_DS_LIB_NUMERIC_TIMETICKS 18 /* print timeticks as a number */ -#define NETSNMP_DS_LIB_ESCAPE_QUOTES 19 /* shell escape quote marks in oids */ -#define NETSNMP_DS_LIB_REVERSE_ENCODE 20 /* encode packets from back to front */ -#define NETSNMP_DS_LIB_PRINT_BARE_VALUE 21 /* just print value (not OID = value) */ -#define NETSNMP_DS_LIB_EXTENDED_INDEX 22 /* print extended index format [x1][x2] */ -#define NETSNMP_DS_LIB_PRINT_HEX_TEXT 23 /* print ASCII text along with hex strings */ -#define NETSNMP_DS_LIB_PRINT_UCD_STYLE_OID 24 /* print OID's using the UCD-style prefix suppression */ -#define NETSNMP_DS_LIB_READ_UCD_STYLE_OID 25 /* require top-level OIDs to be prefixed with a dot */ -#define NETSNMP_DS_LIB_HAVE_READ_PREMIB_CONFIG 26 /* have the pre-mib parsing config tokens been processed */ -#define NETSNMP_DS_LIB_HAVE_READ_CONFIG 27 /* have the config tokens been processed */ -#define NETSNMP_DS_LIB_QUICKE_PRINT 28 -#define NETSNMP_DS_LIB_DONT_PRINT_UNITS 29 /* don't print UNITS suffix */ -#define NETSNMP_DS_LIB_NO_DISPLAY_HINT 30 /* don't apply DISPLAY-HINTs */ -#define NETSNMP_DS_LIB_16BIT_IDS 31 /* restrict requestIDs, etc to 16-bit values */ -#define NETSNMP_DS_LIB_DONT_PERSIST_STATE 32 /* don't save/load any persistant state */ -#define NETSNMP_DS_LIB_2DIGIT_HEX_OUTPUT 33 /* print a leading 0 on hex values <= 'f' */ -#define NETSNMP_DS_LIB_IGNORE_NO_COMMUNITY 34 /* don't complain if not community is specified in the command arguments */ - - /* - * library integers - */ -#define NETSNMP_DS_LIB_MIB_WARNINGS 0 -#define NETSNMP_DS_LIB_SECLEVEL 1 -#define NETSNMP_DS_LIB_SNMPVERSION 2 -#define NETSNMP_DS_LIB_DEFAULT_PORT 3 -#define NETSNMP_DS_LIB_OID_OUTPUT_FORMAT 4 -#define NETSNMP_DS_LIB_PRINT_SUFFIX_ONLY NETSNMP_DS_LIB_OID_OUTPUT_FORMAT -#define NETSNMP_DS_LIB_STRING_OUTPUT_FORMAT 5 -#define NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH 6 -#define NETSNMP_DS_LIB_SERVERSENDBUF 7 /* send buffer (server) */ -#define NETSNMP_DS_LIB_SERVERRECVBUF 8 /* receive buffer (server) */ -#define NETSNMP_DS_LIB_CLIENTSENDBUF 9 /* send buffer (client) */ -#define NETSNMP_DS_LIB_CLIENTRECVBUF 10 /* receive buffer (client) */ - - /* - * special meanings for the default SNMP version slot (NETSNMP_DS_LIB_SNMPVERSION) - */ -#ifndef DISABLE_SNMPV1 -#define NETSNMP_DS_SNMP_VERSION_1 128 /* bogus */ -#endif -#ifndef DISABLE_SNMPV2C -#define NETSNMP_DS_SNMP_VERSION_2c 1 /* real */ -#endif -#define NETSNMP_DS_SNMP_VERSION_3 3 /* real */ - - - /* - * library strings - */ -#define NETSNMP_DS_LIB_SECNAME 0 -#define NETSNMP_DS_LIB_CONTEXT 1 -#define NETSNMP_DS_LIB_PASSPHRASE 2 -#define NETSNMP_DS_LIB_AUTHPASSPHRASE 3 -#define NETSNMP_DS_LIB_PRIVPASSPHRASE 4 -#define NETSNMP_DS_LIB_OPTIONALCONFIG 5 -#define NETSNMP_DS_LIB_APPTYPE 6 -#define NETSNMP_DS_LIB_COMMUNITY 7 -#define NETSNMP_DS_LIB_PERSISTENT_DIR 8 -#define NETSNMP_DS_LIB_CONFIGURATION_DIR 9 -#define NETSNMP_DS_LIB_SECMODEL 10 -#define NETSNMP_DS_LIB_MIBDIRS 11 -#define NETSNMP_DS_LIB_OIDSUFFIX 12 -#define NETSNMP_DS_LIB_OIDPREFIX 13 -#define NETSNMP_DS_LIB_CLIENT_ADDR 14 -#define NETSNMP_DS_LIB_TEMP_FILE_PATTERN 15 -#define NETSNMP_DS_LIB_AUTHMASTERKEY 16 -#define NETSNMP_DS_LIB_PRIVMASTERKEY 17 -#define NETSNMP_DS_LIB_AUTHLOCALIZEDKEY 18 -#define NETSNMP_DS_LIB_PRIVLOCALIZEDKEY 19 -#define NETSNMP_DS_LIB_APPTYPES 20 -#define NETSNMP_DS_LIB_KSM_KEYTAB 21 -#define NETSNMP_DS_LIB_KSM_SERVICE_NAME 22 - - /* - * end storage definitions - */ - - int netsnmp_ds_set_boolean(int storeid, int which, int value); - int netsnmp_ds_get_boolean(int storeid, int which); - int netsnmp_ds_toggle_boolean(int storeid, int which); - int netsnmp_ds_set_int(int storeid, int which, int value); - int netsnmp_ds_get_int(int storeid, int which); - int netsnmp_ds_set_string(int storeid, int which, - const char *value); - char *netsnmp_ds_get_string(int storeid, int which); - int netsnmp_ds_set_void(int storeid, int which, void *value); - void *netsnmp_ds_get_void(int storeid, int which); - int netsnmp_ds_register_config(u_char type, const char *ftype, - const char *token, int storeid, - int which); - int netsnmp_ds_register_premib(u_char type, const char *ftype, - const char *token, int storeid, - int which); - void netsnmp_ds_shutdown(void); - -#ifdef __cplusplus -} -#endif -#endif /* DEFAULT_STORE_H */ -/** @} */ diff --git a/utils/net-snmp/library/factory.h b/utils/net-snmp/library/factory.h deleted file mode 100644 index faf82a227..000000000 --- a/utils/net-snmp/library/factory.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef NETSNMP_FACTORY_H -#define NETSNMP_FACTORY_H - - -#ifdef __cplusplus -extern "C" { -#endif - - typedef void * (netsnmp_factory_produce_f)(void); - typedef int (netsnmp_factory_produce_noalloc_f)(void *); - - typedef struct netsnmp_factory_s { - /* - * a string describing the product the factory creates - */ - const char *product; - - /* - * a function to create an object in newly allcoated memory - */ - netsnmp_factory_produce_f *produce; - - /* - * a function to create an object in previously allcoated memory - */ - netsnmp_factory_produce_noalloc_f *produce_noalloc; - - } netsnmp_factory; - - /* - * init factory registry - */ - void netsnmp_factory_init(void); - - /* - * register a factory type - */ - int netsnmp_factory_register(netsnmp_factory *f); - - /* - * get a factory - */ - netsnmp_factory* netsnmp_factory_get(const char* product); - - /* - * ask a factory to produce an object - */ - void * netsnmp_factory_produce(const char* product); - - /* - * ask a factory to produce an object in the provided memory - */ - int netsnmp_factory_produce_noalloc(const char *product, void *memory); - - /* - * factory return codes - */ - enum { - FACTORY_NOERROR = 0, - FACTORY_EXISTS, - FACTORY_NOTFOUND, - FACTORY_NOMEMORY, - FACTORY_GENERR, - FACTORY_MAXIMUM_ERROR - }; - -#ifdef __cplusplus -} -#endif - - -#endif /* NETSNMP_FACTORY_H */ diff --git a/utils/net-snmp/library/getopt.h b/utils/net-snmp/library/getopt.h deleted file mode 100644 index 0f4d6915a..000000000 --- a/utils/net-snmp/library/getopt.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _GETOPT_H_ -#define _GETOPT_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -NETSNMP_IMPORT int getopt(int, char *const *, const char *); -NETSNMP_IMPORT char *optarg; -NETSNMP_IMPORT int optind, opterr, optopt, optreset; - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/library/int64.h b/utils/net-snmp/library/int64.h deleted file mode 100644 index fdc6805fd..000000000 --- a/utils/net-snmp/library/int64.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef INT64_INCLUDED -#define INT64_INCLUDED - -#ifdef __cplusplus -extern "C" { -#endif - - typedef struct counter64 U64; - -#define I64CHARSZ 21 - - void divBy10(U64, U64 *, unsigned int *); - void multBy10(U64, U64 *); - void incrByU16(U64 *, unsigned int); - void incrByU32(U64 *, unsigned int); - void zeroU64(U64 *); - int isZeroU64(const U64 *); - void printU64(char *, const U64 *); - void printI64(char *, const U64 *); - int read64(U64 *, const char *); - void u64Subtract(const U64 * pu64one, const U64 * pu64two, - U64 * pu64out); - void u64Incr(U64 * pu64out, const U64 * pu64one); - void u64UpdateCounter(U64 * pu64out, const U64 * pu64one, - const U64 * pu64two); - void u64Copy(U64 * pu64one, const U64 * pu64two); - - int netsnmp_c64_check_for_32bit_wrap(U64 *old_val, U64 *new_val, - int adjust); - int netsnmp_c64_check32_and_update(struct counter64 *prev_val, - struct counter64 *new_val, - struct counter64 *old_prev_val, - int *need_wrap_check); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/library/keytools.h b/utils/net-snmp/library/keytools.h deleted file mode 100644 index 2276216a5..000000000 --- a/utils/net-snmp/library/keytools.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * keytools.h - */ - -#ifndef _KEYTOOLS_H -#define _KEYTOOLS_H - -#ifdef __cplusplus -extern "C" { -#endif - - -#define USM_LENGTH_EXPANDED_PASSPHRASE (1024 * 1024) /* 1Meg. */ - -#define USM_LENGTH_KU_HASHBLOCK 64 /* In bytes. */ - -#define USM_LENGTH_P_MIN 8 /* In characters. */ - /* - * Recommended practice given in , - * * Section 11.2 "Defining Users". Move into cmdline app argument - * * parsing, and out of the internal routine? XXX - */ - - /* - * Prototypes.h - */ - int generate_Ku(const oid * hashtype, u_int hashtype_len, - u_char * P, size_t pplen, - u_char * Ku, size_t * kulen); - - int generate_kul(const oid * hashtype, u_int hashtype_len, - u_char * engineID, size_t engineID_len, - u_char * Ku, size_t ku_len, - u_char * Kul, size_t * kul_len); - - int encode_keychange(const oid * hashtype, - u_int hashtype_len, u_char * oldkey, - size_t oldkey_len, u_char * newkey, - size_t newkey_len, u_char * kcstring, - size_t * kcstring_len); - - int decode_keychange(const oid * hashtype, - u_int hashtype_len, u_char * oldkey, - size_t oldkey_len, u_char * kcstring, - size_t kcstring_len, u_char * newkey, - size_t * newkey_len); - - - /* - * All functions devolve to the following block if we can't do cryptography - */ -#define _KEYTOOLS_NOT_AVAILABLE \ -{ \ - return SNMPERR_KT_NOT_AVAILABLE; \ -} - -#ifdef __cplusplus -} -#endif -#endif /* _KEYTOOLS_H */ diff --git a/utils/net-snmp/library/lcd_time.h b/utils/net-snmp/library/lcd_time.h deleted file mode 100644 index 53867701c..000000000 --- a/utils/net-snmp/library/lcd_time.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * lcd_time.h - */ - -#ifndef _LCD_TIME_H -#define _LCD_TIME_H - -#ifdef __cplusplus -extern "C" { -#endif - - - /* - * undefine to enable time synchronization only on authenticated packets - */ -#define LCD_TIME_SYNC_OPT 1 - - /* - * Macros and definitions. - */ -#define ETIMELIST_SIZE 23 - - - - typedef struct enginetime_struct { - u_char *engineID; - u_int engineID_len; - - u_int engineTime; - u_int engineBoot; - /* - * Time & boots values received from last authenticated - * * message within the previous time window. - */ - - time_t lastReceivedEngineTime; - /* - * Timestamp made when engineTime/engineBoots was last - * * updated. Measured in seconds. - */ - -#ifdef LCD_TIME_SYNC_OPT - u_int authenticatedFlag; -#endif - struct enginetime_struct *next; - } enginetime , *Enginetime; - - - - - /* - * Macros for streamlined engineID existence checks -- - * - * e is char *engineID, - * e_l is u_int engineID_len. - * - * - * ISENGINEKNOWN(e, e_l) - * Returns: - * TRUE If engineID is recoreded in the EngineID List; - * FALSE Otherwise. - * - * ENSURE_ENGINE_RECORD(e, e_l) - * Adds the given engineID to the EngineID List if it does not exist - * already. engineID is added with a - * tuple of <0,0>. ALWAYS succeeds -- except in case of a - * fatal internal error. - * Returns: - * SNMPERR_SUCCESS On success; - * SNMPERR_GENERR Otherwise. - * - * MAKENEW_ENGINE_RECORD(e, e_l) - * Returns: - * SNMPERR_SUCCESS If engineID already exists in the EngineID List; - * SNMPERR_GENERR Otherwise -and- invokes ENSURE_ENGINE_RECORD() - * to add an entry to the EngineID List. - * - * XXX Requres the following declaration in modules calling ISENGINEKNOWN(): - * static u_int dummy_etime, dummy_eboot; - */ -#define ISENGINEKNOWN(e, e_l) \ - ( (get_enginetime(e, e_l, \ - &dummy_eboot, &dummy_etime, TRUE) == SNMPERR_SUCCESS) \ - ? TRUE \ - : FALSE ) - -#define ENSURE_ENGINE_RECORD(e, e_l) \ - ( (set_enginetime(e, e_l, 0, 0, FALSE) == SNMPERR_SUCCESS) \ - ? SNMPERR_SUCCESS \ - : SNMPERR_GENERR ) - -#define MAKENEW_ENGINE_RECORD(e, e_l) \ - ( (ISENGINEKNOWN(e, e_l) == TRUE) \ - ? SNMPERR_SUCCESS \ - : (ENSURE_ENGINE_RECORD(e, e_l), SNMPERR_GENERR) ) - - - - /* - * Prototypes. - */ - int get_enginetime(u_char * engineID, u_int engineID_len, - u_int * engine_boot, - u_int * engine_time, - u_int authenticated); - - int get_enginetime_ex(u_char * engineID, - u_int engineID_len, - u_int * engine_boot, - u_int * engine_time, - u_int * last_engine_time, - u_int authenticated); - - int set_enginetime(u_char * engineID, u_int engineID_len, - u_int engine_boot, u_int engine_time, - u_int authenticated); - - - - - - - - Enginetime - search_enginetime_list(u_char * engineID, u_int engineID_len); - - int hash_engineID(u_char * engineID, u_int engineID_len); - - void dump_etimelist_entry(Enginetime e, int count); - void dump_etimelist(void); - void free_enginetime(unsigned char *engineID, size_t engineID_len); - -#ifdef __cplusplus -} -#endif -#endif /* _LCD_TIME_H */ diff --git a/utils/net-snmp/library/md5.h b/utils/net-snmp/library/md5.h deleted file mode 100644 index c995c7ef3..000000000 --- a/utils/net-snmp/library/md5.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * ** ************************************************************************** - * ** md5.h -- Header file for implementation of MD5 Message Digest Algorithm ** - * ** Updated: 2/13/90 by Ronald L. Rivest ** - * ** (C) 1990 RSA Data Security, Inc. ** - * ** ************************************************************************** - */ - -#ifndef MD5_H -#define MD5_H - -#ifdef __cplusplus -extern "C" { -#endif - - - /* - * MDstruct is the data structure for a message digest computation. - */ - typedef struct { - unsigned int buffer[4]; /* Holds 4-word result of MD computation */ - unsigned char count[8]; /* Number of bits processed so far */ - unsigned int done; /* Nonzero means MD computation finished */ - } MDstruct , *MDptr; - - /* - * MDbegin(MD) - * ** Input: MD -- an MDptr - * ** Initialize the MDstruct prepatory to doing a message digest computation. - */ - extern void MDbegin(MDptr); - - /* - * MDupdate(MD,X,count) - * ** Input: MD -- an MDptr - * ** X -- a pointer to an array of unsigned characters. - * ** count -- the number of bits of X to use (an unsigned int). - * ** Updates MD using the first ``count'' bits of X. - * ** The array pointed to by X is not modified. - * ** If count is not a multiple of 8, MDupdate uses high bits of last byte. - * ** This is the basic input routine for a user. - * ** The routine terminates the MD computation when count < 512, so - * ** every MD computation should end with one call to MDupdate with a - * ** count less than 512. Zero is OK for a count. - */ - extern int MDupdate(MDptr, unsigned char *, unsigned int); - - /* - * MDprint(MD) - * ** Input: MD -- an MDptr - * ** Prints message digest buffer MD as 32 hexadecimal digits. - * ** Order is from low-order byte of buffer[0] to high-order byte of buffer[3]. - * ** Each byte is printed with high-order hexadecimal digit first. - */ - extern void MDprint(MDptr); - - int MDchecksum(u_char * data, size_t len, u_char * mac, - size_t maclen); - int MDsign(u_char * data, size_t len, u_char * mac, - size_t maclen, u_char * secret, - size_t secretlen); - void MDget(MDstruct * MD, u_char * buf, size_t buflen); - - /* - * ** End of md5.h - * ****************************(cut)**************************************** - */ -#ifdef __cplusplus -} -#endif -#endif /* MD5_H */ diff --git a/utils/net-snmp/library/mib.h b/utils/net-snmp/library/mib.h deleted file mode 100644 index 9e84be6ac..000000000 --- a/utils/net-snmp/library/mib.h +++ /dev/null @@ -1,528 +0,0 @@ -#ifndef MIB_H -#define MIB_H - -#ifdef __cplusplus -extern "C" { -#endif - /* - * mib.h - Definitions for the variables as defined in the MIB - * - * Update: 1998-07-17 - * Added prototypes for print_oid_report* functions. - */ -/*********************************************************** - Copyright 1988, 1989 by Carnegie Mellon University - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of CMU not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -******************************************************************/ - -#include /* for FILE */ - -#define MIB 1, 3, 6, 1, 2, 1 - -#define MIB_IFTYPE_OTHER 1 -#define MIB_IFTYPE_REGULAR1822 2 -#define MIB_IFTYPE_HDH1822 3 -#define MIB_IFTYPE_DDNX25 4 -#define MIB_IFTYPE_RFC877X25 5 -#define MIB_IFTYPE_ETHERNETCSMACD 6 -#define MIB_IFTYPE_ISO88023CSMACD 7 -#define MIB_IFTYPE_ISO88024TOKENBUS 8 -#define MIB_IFTYPE_ISO88025TOKENRING 9 -#define MIB_IFTYPE_ISO88026MAN 10 -#define MIB_IFTYPE_STARLAN 11 -#define MIB_IFTYPE_PROTEON10MBIT 12 -#define MIB_IFTYPE_PROTEON80MBIT 13 -#define MIB_IFTYPE_HYPERCHANNEL 14 -#define MIB_IFTYPE_FDDI 15 -#define MIB_IFTYPE_LAPB 16 -#define MIB_IFTYPE_SDLC 17 -#define MIB_IFTYPE_T1CARRIER 18 -#define MIB_IFTYPE_CEPT 19 -#define MIB_IFTYPE_BASICISDN 20 -#define MIB_IFTYPE_PRIMARYISDN 21 -#define MIB_IFTYPE_PROPPOINTTOPOINTSERIAL 22 - -#define MIB_IFSTATUS_UP 1 -#define MIB_IFSTATUS_DOWN 2 -#define MIB_IFSTATUS_TESTING 3 - -#define MIB_FORWARD_GATEWAY 1 -#define MIB_FORWARD_HOST 2 - -#define MIB_IPROUTETYPE_OTHER 1 -#define MIB_IPROUTETYPE_INVALID 2 -#define MIB_IPROUTETYPE_DIRECT 3 -#define MIB_IPROUTETYPE_REMOTE 4 - -#define MIB_IPROUTEPROTO_OTHER 1 -#define MIB_IPROUTEPROTO_LOCAL 2 -#define MIB_IPROUTEPROTO_NETMGMT 3 -#define MIB_IPROUTEPROTO_ICMP 4 -#define MIB_IPROUTEPROTO_EGP 5 -#define MIB_IPROUTEPROTO_GGP 6 -#define MIB_IPROUTEPROTO_HELLO 7 -#define MIB_IPROUTEPROTO_RIP 8 -#define MIB_IPROUTEPROTO_ISIS 9 -#define MIB_IPROUTEPROTO_ESIS 10 -#define MIB_IPROUTEPROTO_CISCOIGRP 11 -#define MIB_IPROUTEPROTO_BBNSPFIGP 12 -#define MIB_IPROUTEPROTO_OIGP 13 - -#define MIB_TCPRTOALG_OTHER 1 -#define MIB_TCPRTOALG_CONSTANT 2 -#define MIB_TCPRTOALG_RSRE 3 -#define MIB_TCPRTOALG_VANJ 4 - -#define MIB_TCPCONNSTATE_CLOSED 1 -#define MIB_TCPCONNSTATE_LISTEN 2 -#define MIB_TCPCONNSTATE_SYNSENT 3 -#define MIB_TCPCONNSTATE_SYNRECEIVED 4 -#define MIB_TCPCONNSTATE_ESTABLISHED 5 -#define MIB_TCPCONNSTATE_FINWAIT1 6 -#define MIB_TCPCONNSTATE_FINWAIT2 7 -#define MIB_TCPCONNSTATE_CLOSEWAIT 8 -#define MIB_TCPCONNSTATE_LASTACK 9 -#define MIB_TCPCONNSTATE_CLOSING 10 -#define MIB_TCPCONNSTATE_TIMEWAIT 11 - -#define MIB_EGPNEIGHSTATE_IDLE 1 -#define MIB_EGPNEIGHSTATE_AQUISITION 2 -#define MIB_EGPNEIGHSTATE_DOWN 3 -#define MIB_EGPNEIGHSTATE_UP 4 -#define MIB_EGPNEIGHSTATE_CEASE 5 - - struct variable_list; - struct enum_list; - - void print_mib(FILE * fp); - void print_ascii_dump(FILE *); - int read_objid(const char *, oid *, size_t *); - void register_mib_handlers(void); - void netsnmp_set_mib_directory(const char *dir); - char *netsnmp_get_mib_directory(void); - void netsnmp_fixup_mib_directory(void); - void init_mib(void); - void shutdown_mib(void); - void print_description(oid *, size_t, int); - void fprint_description(FILE *, oid *, size_t, int); - int snprint_description(char *, size_t, oid *, size_t, int); - int sprint_realloc_description(u_char **, size_t *, size_t *, - int, oid *, size_t, int); - int get_module_node(const char *, const char *, oid *, - size_t *); - int get_wild_node(const char *, oid *, size_t *); - int get_node(const char *, oid *, size_t *); - oid *snmp_parse_oid(const char *, oid *, size_t *); - struct tree *get_symbol(oid *, size_t, struct tree *, char *); - struct tree *get_tree(const oid *, size_t, struct tree *); - struct tree *get_tree_head(void); - void set_function(struct tree *); - - int parse_one_oid_index(oid ** oidStart, size_t * oidLen, - netsnmp_variable_list * data, - int complete); - int parse_oid_indexes(oid * oidIndex, size_t oidLen, - netsnmp_variable_list * data); - int build_oid_noalloc(oid * in, size_t in_len, - size_t * out_len, oid * prefix, - size_t prefix_len, - netsnmp_variable_list * indexes); - int build_oid(oid ** out, size_t * out_len, oid * prefix, - size_t prefix_len, - netsnmp_variable_list * indexes); - int build_oid_segment(netsnmp_variable_list * var); - - - void print_variable(const oid * objid, size_t objidlen, - const netsnmp_variable_list * variable); - - void fprint_variable(FILE * fp, - const oid * objid, size_t objidlen, - const netsnmp_variable_list * variable); - - int snprint_variable(char *buf, size_t buf_len, - const oid * objid, size_t objidlen, - const netsnmp_variable_list * variable); - - int sprint_realloc_variable(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const oid * objid, - size_t objidlen, - const netsnmp_variable_list * - variable); - -#ifndef DISABLE_MIB_LOADING - struct tree * -#else - void -#endif - netsnmp_sprint_realloc_objid_tree(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - int *buf_overflow, - const oid * objid, - size_t objidlen); - - void - netsnmp_sprint_realloc_objid(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - int *buf_overflow, - const oid * objid, - size_t objidlen); - - void print_value(const oid * objid, size_t objidlen, - const netsnmp_variable_list * variable); - - void fprint_value(FILE * fp, - const oid * objid, size_t objidlen, - const netsnmp_variable_list * variable); - - int snprint_value(char *buf, size_t buf_len, - const oid * objid, size_t objidlen, - const netsnmp_variable_list * variable); - - int sprint_realloc_value(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const oid * objid, - size_t objidlen, - const netsnmp_variable_list * variable); - - - void print_objid(const oid * objid, size_t objidlen); - - void fprint_objid(FILE * fp, - const oid * objid, size_t objidlen); - - int snprint_objid(char *buf, size_t buf_len, - const oid * objid, size_t objidlen); - - int sprint_realloc_objid(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const oid * objid, - size_t objidlen); - - - int sprint_realloc_by_type(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list * var, - const struct enum_list *enums, - const char *hint, - const char *units); - - int sprint_realloc_hexstring(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const u_char *, size_t); - - int sprint_realloc_asciistring(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const u_char * cp, - size_t len); - - int sprint_realloc_octet_string(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, - const char *); - - int sprint_realloc_opaque(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int sprint_realloc_object_identifier(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list - *, const struct enum_list *, - const char *, - const char *); - - int sprint_realloc_timeticks(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, const char *); - - int sprint_realloc_hinted_integer(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, long, - const char, const char *, - const char *); - - int sprint_realloc_integer(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, const char *); - - int sprint_realloc_uinteger(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, const char *); - - int sprint_realloc_gauge(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int sprint_realloc_counter(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, const char *); - - int sprint_realloc_networkaddress(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, - const char *); - - int sprint_realloc_ipaddress(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, const char *); - - int sprint_realloc_null(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int sprint_realloc_bitstring(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, const char *); - - int sprint_realloc_nsapaddress(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, const char *); - - int sprint_realloc_counter64(u_char ** buf, - size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, const char *); - - int sprint_realloc_badtype(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, const char *); - -#ifdef OPAQUE_SPECIAL_TYPES - int sprint_realloc_float(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int sprint_realloc_double(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); -#endif - - - int snprint_by_type(char *buf, size_t buf_len, - netsnmp_variable_list * var, - const struct enum_list *enums, - const char *hint, const char *units); - - int snprint_hexstring(char *buf, size_t buf_len, - const u_char *, size_t); - - int snprint_asciistring(char *buf, size_t buf_len, - const u_char * cp, size_t len); - - int snprint_octet_string(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_opaque(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_object_identifier(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, const char *); - - int snprint_timeticks(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_hinted_integer(char *buf, size_t buf_len, - long, const char *, - const char *); - - int snprint_integer(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_uinteger(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_gauge(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_counter(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_networkaddress(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, - const char *, const char *); - - int snprint_ipaddress(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_null(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_bitstring(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_nsapaddress(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_counter64(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_badtype(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - -#ifdef OPAQUE_SPECIAL_TYPES - int snprint_float(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - - int snprint_double(char *buf, size_t buf_len, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); -#endif - - void print_oid_report(FILE *); - void print_oid_report_enable_labeledoid(void); - void print_oid_report_enable_oid(void); - void print_oid_report_enable_suffix(void); - void print_oid_report_enable_symbolic(void); - - const char *parse_octet_hint(const char *hint, const char *value, - unsigned char **new_val, int *new_val_len); - - void clear_tree_flags(register struct tree *tp); - - char *snmp_out_toggle_options(char *); - void snmp_out_toggle_options_usage(const char *, FILE *); - char *snmp_in_toggle_options(char *); - char *snmp_in_options(char *, int, char * const *); - void snmp_in_toggle_options_usage(const char *, FILE *); - u_char mib_to_asn_type(int mib_type); - - - int netsnmp_str2oid(const char *S, oid * O, int L); - - -#define NETSNMP_STRING_OUTPUT_GUESS 1 -#define NETSNMP_STRING_OUTPUT_ASCII 2 -#define NETSNMP_STRING_OUTPUT_HEX 3 - -#define NETSNMP_OID_OUTPUT_SUFFIX 1 -#define NETSNMP_OID_OUTPUT_MODULE 2 -#define NETSNMP_OID_OUTPUT_FULL 3 -#define NETSNMP_OID_OUTPUT_NUMERIC 4 -#define NETSNMP_OID_OUTPUT_UCD 5 -#define NETSNMP_OID_OUTPUT_NONE 6 -#ifdef __cplusplus -} -#endif -#endif /* MIB_H */ diff --git a/utils/net-snmp/library/mt_support.h b/utils/net-snmp/library/mt_support.h deleted file mode 100644 index 1f0109247..000000000 --- a/utils/net-snmp/library/mt_support.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * mt_support.h - multi-thread resource locking support declarations - */ -/* - * Author: Markku Laukkanen - * Created: 6-Sep-1999 - * History: - * 8-Sep-1999 M. Slifcak method names changed; - * use array of resource locking structures. - */ - -#ifndef MT_SUPPORT_H -#define MT_SUPPORT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Lock group identifiers - */ - -#define MT_LIBRARY_ID 0 -#define MT_APPLICATION_ID 1 -#define MT_TOKEN_ID 2 - -#define MT_MAX_IDS 3 /* one greater than last from above */ -#define MT_MAX_SUBIDS 10 - - -/* - * Lock resource identifiers for library resources - */ - -#define MT_LIB_NONE 0 -#define MT_LIB_SESSION 1 -#define MT_LIB_REQUESTID 2 -#define MT_LIB_MESSAGEID 3 -#define MT_LIB_SESSIONID 4 -#define MT_LIB_TRANSID 5 - -#define MT_LIB_MAXIMUM 6 /* must be one greater than the last one */ - - -#if defined(NS_REENTRANT) || defined(WIN32) - -#if HAVE_PTHREAD_H -#include -typedef pthread_mutex_t mutex_type; -#ifdef pthread_mutexattr_default -#define MT_MUTEX_INIT_DEFAULT pthread_mutexattr_default -#else -#define MT_MUTEX_INIT_DEFAULT 0 -#endif - -#elif defined(WIN32) || defined(cygwin) - -#include -typedef CRITICAL_SECTION mutex_type; - -#else /* HAVE_PTHREAD_H */ -error "There is no re-entrant support as defined." -#endif /* HAVE_PTHREAD_H */ - - -int snmp_res_init(void); -int snmp_res_lock(int groupID, int resourceID); -int snmp_res_unlock(int groupID, int resourceID); -int snmp_res_destroy_mutex(int groupID, int resourceID); - -#else /* NS_REENTRANT */ - -#ifndef WIN32 -#define snmp_res_init() do {} while (0) -#define snmp_res_lock(x,y) do {} while (0) -#define snmp_res_unlock(x,y) do {} while (0) -#define snmp_res_destroy_mutex(x,y) do {} while (0) -#endif /* WIN32 */ - -#endif /* NS_REENTRANT */ - -#ifdef __cplusplus -} -#endif -#endif /* MT_SUPPORT_H */ diff --git a/utils/net-snmp/library/oid_stash.h b/utils/net-snmp/library/oid_stash.h deleted file mode 100644 index cf13f6275..000000000 --- a/utils/net-snmp/library/oid_stash.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef OID_STASH_H -#define OID_STASH_H - -/* - * designed to store/retrieve information associated with a given oid. - * Storage is done in an efficient tree manner for fast lookups. - */ - -#define OID_STASH_CHILDREN_SIZE 31 - -#ifdef __cplusplus -extern "C" { -#endif - - struct netsnmp_oid_stash_node_s; - - /* args: buffer, sizeof(buffer), yourdata, stashnode */ - typedef int (NetSNMPStashDump) (char *, size_t, - void *, - struct netsnmp_oid_stash_node_s *); - - typedef void (NetSNMPStashFreeNode) (void *); - - typedef struct netsnmp_oid_stash_node_s { - oid value; - struct netsnmp_oid_stash_node_s **children; /* array of children */ - size_t children_size; - struct netsnmp_oid_stash_node_s *next_sibling; /* cache too small links */ - struct netsnmp_oid_stash_node_s *prev_sibling; - struct netsnmp_oid_stash_node_s *parent; - - void *thedata; - } netsnmp_oid_stash_node; - - typedef struct netsnmp_oid_stash_save_info_s { - const char *token; - netsnmp_oid_stash_node **root; - NetSNMPStashDump *dumpfn; - } netsnmp_oid_stash_save_info; - - int netsnmp_oid_stash_add_data(netsnmp_oid_stash_node - **root, oid * lookup, - size_t lookup_len, - void *mydata); - SNMPCallback netsnmp_oid_stash_store_all; - - - netsnmp_oid_stash_node - *netsnmp_oid_stash_get_node(netsnmp_oid_stash_node *root, - oid * lookup, size_t lookup_len); - void *netsnmp_oid_stash_get_data(netsnmp_oid_stash_node - *root, oid * lookup, - size_t lookup_len); - netsnmp_oid_stash_node * - netsnmp_oid_stash_getnext_node(netsnmp_oid_stash_node *root, - oid * lookup, size_t lookup_len); - - netsnmp_oid_stash_node *netsnmp_oid_stash_create_sized_node(size_t - mysize); - netsnmp_oid_stash_node *netsnmp_oid_stash_create_node(void); /* returns a malloced node */ - - void netsnmp_oid_stash_store(netsnmp_oid_stash_node *root, - const char *tokenname, - NetSNMPStashDump *dumpfn, - oid *curoid, size_t curoid_len); - - /* frees all data in the stash and cleans it out. Sets root = NULL */ - void netsnmp_oid_stash_free(netsnmp_oid_stash_node **root, - NetSNMPStashFreeNode *freefn); - - - /* a noop function that can be passed to netsnmp_oid_stash_node to - NOT free the data */ - NetSNMPStashFreeNode netsnmp_oid_stash_no_free; -#ifdef __cplusplus -} -#endif -#endif /* OID_STASH_H */ diff --git a/utils/net-snmp/library/parse.h b/utils/net-snmp/library/parse.h deleted file mode 100644 index 0d94b6751..000000000 --- a/utils/net-snmp/library/parse.h +++ /dev/null @@ -1,251 +0,0 @@ -#ifndef PARSE_H -#define PARSE_H - -#ifdef __cplusplus -extern "C" { -#endif - /* - * parse.h - */ -/*********************************************************** - Copyright 1989 by Carnegie Mellon University - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of CMU not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -******************************************************************/ - -#define MAXLABEL 64 /* maximum characters in a label */ -#define MAXTOKEN 128 /* maximum characters in a token */ -#define MAXQUOTESTR 4096 /* maximum characters in a quoted string */ - - struct variable_list; - - /* - * A linked list of tag-value pairs for enumerated integers. - */ - struct enum_list { - struct enum_list *next; - int value; - char *label; - }; - - /* - * A linked list of ranges - */ - struct range_list { - struct range_list *next; - int low, high; - }; - - /* - * A linked list of indexes - */ - struct index_list { - struct index_list *next; - char *ilabel; - char isimplied; - }; - - /* - * A linked list of varbinds - */ - struct varbind_list { - struct varbind_list *next; - char *vblabel; - }; - - /* - * A linked list of nodes. - */ - struct node { - struct node *next; - char *label; /* This node's (unique) textual name */ - u_long subid; /* This node's integer subidentifier */ - int modid; /* The module containing this node */ - char *parent; /* The parent's textual name */ - int tc_index; /* index into tclist (-1 if NA) */ - int type; /* The type of object this represents */ - int access; - int status; - struct enum_list *enums; /* (optional) list of enumerated integers */ - struct range_list *ranges; - struct index_list *indexes; - char *augments; - struct varbind_list *varbinds; - char *hint; - char *units; - char *description; /* description (a quoted string) */ - char *reference; /* references (a quoted string) */ - char *defaultValue; - char *filename; - int lineno; - }; - - /* - * A tree in the format of the tree structure of the MIB. - */ - struct tree { - struct tree *child_list; /* list of children of this node */ - struct tree *next_peer; /* Next node in list of peers */ - struct tree *next; /* Next node in hashed list of names */ - struct tree *parent; - char *label; /* This node's textual name */ - u_long subid; /* This node's integer subidentifier */ - int modid; /* The module containing this node */ - int number_modules; - int *module_list; /* To handle multiple modules */ - int tc_index; /* index into tclist (-1 if NA) */ - int type; /* This node's object type */ - int access; /* This nodes access */ - int status; /* This nodes status */ - struct enum_list *enums; /* (optional) list of enumerated integers */ - struct range_list *ranges; - struct index_list *indexes; - char *augments; - struct varbind_list *varbinds; - char *hint; - char *units; - int (*printomat) (u_char **, size_t *, size_t *, int, - const netsnmp_variable_list *, - const struct enum_list *, const char *, - const char *); - void (*printer) (char *, const netsnmp_variable_list *, const struct enum_list *, const char *, const char *); /* Value printing function */ - char *description; /* description (a quoted string) */ - char *reference; /* references (a quoted string) */ - int reported; /* 1=report started in print_subtree... */ - char *defaultValue; - }; - - /* - * Information held about each MIB module - */ - struct module_import { - char *label; /* The descriptor being imported */ - int modid; /* The module imported from */ - }; - - struct module { - char *name; /* This module's name */ - char *file; /* The file containing the module */ - struct module_import *imports; /* List of descriptors being imported */ - int no_imports; /* The number of such import descriptors */ - /* - * -1 implies the module hasn't been read in yet - */ - int modid; /* The index number of this module */ - struct module *next; /* Linked list pointer */ - }; - - struct module_compatability { - const char *old_module; - const char *new_module; - const char *tag; /* NULL implies unconditional replacement, - * otherwise node identifier or prefix */ - size_t tag_len; /* 0 implies exact match (or unconditional) */ - struct module_compatability *next; /* linked list */ - }; - - - /* - * non-aggregate types for tree end nodes - */ -#define TYPE_OTHER 0 -#define TYPE_OBJID 1 -#define TYPE_OCTETSTR 2 -#define TYPE_INTEGER 3 -#define TYPE_NETADDR 4 -#define TYPE_IPADDR 5 -#define TYPE_COUNTER 6 -#define TYPE_GAUGE 7 -#define TYPE_TIMETICKS 8 -#define TYPE_OPAQUE 9 -#define TYPE_NULL 10 -#define TYPE_COUNTER64 11 -#define TYPE_BITSTRING 12 -#define TYPE_NSAPADDRESS 13 -#define TYPE_UINTEGER 14 -#define TYPE_UNSIGNED32 15 -#define TYPE_INTEGER32 16 - -#define TYPE_SIMPLE_LAST 16 - -#define TYPE_TRAPTYPE 20 -#define TYPE_NOTIFTYPE 21 -#define TYPE_OBJGROUP 22 -#define TYPE_NOTIFGROUP 23 -#define TYPE_MODID 24 -#define TYPE_AGENTCAP 25 -#define TYPE_MODCOMP 26 - -#define MIB_ACCESS_READONLY 18 -#define MIB_ACCESS_READWRITE 19 -#define MIB_ACCESS_WRITEONLY 20 -#define MIB_ACCESS_NOACCESS 21 -#define MIB_ACCESS_NOTIFY 67 -#define MIB_ACCESS_CREATE 48 - -#define MIB_STATUS_MANDATORY 23 -#define MIB_STATUS_OPTIONAL 24 -#define MIB_STATUS_OBSOLETE 25 -#define MIB_STATUS_DEPRECATED 39 -#define MIB_STATUS_CURRENT 57 - -#define ANON "anonymous#" -#define ANON_LEN strlen(ANON) - - struct tree *read_module(const char *); - struct tree *read_mib(const char *); - struct tree *read_all_mibs(void); - int unload_module(const char *name); - void unload_all_mibs(void); - void init_mib_internals(void); - int add_mibfile(const char*, const char*, FILE *); - int add_mibdir(const char *); - void add_module_replacement(const char *, const char *, - const char *, int); - int which_module(const char *); - char *module_name(int, char *); - void print_subtree(FILE *, struct tree *, int); - void print_ascii_dump_tree(FILE *, struct tree *, int); - struct tree *find_tree_node(const char *, int); - const char *get_tc_descriptor(int); - const char *get_tc_description(int); - struct tree *find_best_tree_node(const char *, struct tree *, - u_int *); - /* - * backwards compatability - */ - struct tree *find_node(const char *, struct tree *); - struct tree *find_node2(const char *, const char *); - struct module *find_module(int); - void adopt_orphans(void); - char *snmp_mib_toggle_options(char *options); - void snmp_mib_toggle_options_usage(const char *lead, - FILE * outf); - void print_mib(FILE *); - void print_mib_tree(FILE *, struct tree *, int); - int get_mib_parse_error_count(void); - int snmp_get_token(FILE * fp, char *token, int maxtlen); - struct tree *find_best_tree_node(const char *name, - struct tree *tree_top, - u_int * match); - -#ifdef __cplusplus -} -#endif -#endif /* PARSE_H */ diff --git a/utils/net-snmp/library/read_config.h b/utils/net-snmp/library/read_config.h deleted file mode 100644 index dbde29c6d..000000000 --- a/utils/net-snmp/library/read_config.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * read_config.h: reads configuration files for extensible sections. - * - */ -#ifndef READ_CONFIG_H -#define READ_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define STRINGMAX 1024 - -#define NORMAL_CONFIG 0 -#define PREMIB_CONFIG 1 -#define EITHER_CONFIG 2 - - - - /* - * Defines a set of file types and the parse and free functions - * which process the syntax following a given token in a given file. - */ - struct config_files { - char *fileHeader; /* Label for entire file. */ - struct config_line *start; - struct config_files *next; - }; - - struct config_line { - char *config_token; /* Label for each line parser - * in the given file. */ - void (*parse_line) (const char *, char *); - void (*free_func) (void); - struct config_line *next; - char config_time; /* {NORMAL,PREMIB,EITHER}_CONFIG */ - char *help; - }; - - struct read_config_memory { - char *line; - struct read_config_memory *next; - }; - - - int netsnmp_config(char *); /* parse a simple line: token=values */ - void netsnmp_config_remember(char *); /* process later, during snmp_init() */ - void netsnmp_config_process_memories(void); /* run all memories through parser */ - void read_config(const char *, struct config_line *, int); - void read_configs(void); - void read_premib_configs(void); - void read_config_files(int); - void free_config(void); - void config_perror(const char *); - void config_pwarn(const char *); - char *skip_white(char *); - char *skip_not_white(char *); - char *skip_token(char *); - char *copy_nword(char *, char *, int); - char *copy_word(char *, char *); /* do not use */ - void read_config_with_type(const char *, const char *); - struct config_line *register_config_handler(const char *, const char *, - void (*parser) (const char - *, char *), - void (*releaser) (void), - const char *); - struct config_line *register_app_config_handler(const char *, - void (*parser) (const - char *, - char - *), - void (*releaser) - (void), const char *); - struct config_line *register_prenetsnmp_mib_handler(const char *, - const char *, - void (*parser) - (const char *, - char *), - void (*releaser) - (void), - const char *); - struct config_line *register_app_prenetsnmp_mib_handler(const char *, - void (*parser) - (const char *, - char *), - void - (*releaser) - (void), - const char *); - void unregister_config_handler(const char *, const char *); - void unregister_app_config_handler(const char *); - void unregister_all_config_handlers(void); - void read_config_print_usage(const char *lead); - char *read_config_save_octet_string(char *saveto, - u_char * str, - size_t len); - char *read_config_read_octet_string(char *readfrom, - u_char ** str, - size_t * len); - char *read_config_read_objid(char *readfrom, oid ** objid, - size_t * len); - char *read_config_save_objid(char *saveto, oid * objid, - size_t len); - char *read_config_read_data(int type, char *readfrom, - void *dataptr, size_t * len); - char *read_config_read_memory(int type, char *readfrom, - char *dataptr, size_t * len); - char *read_config_store_data(int type, char *storeto, - void *dataptr, size_t * len); - char *read_config_store_data_prefix(char prefix, int type, - char *storeto, - void *dataptr, size_t len); - void read_config_store(const char *type, const char *line); - void read_app_config_store(const char *line); - void snmp_save_persistent(const char *type); - void snmp_clean_persistent(const char *type); - struct config_line *read_config_get_handlers(const char *type); - - /* - * external memory list handlers - */ - void snmp_config_remember_in_list(char *line, - struct read_config_memory - **mem); - void snmp_config_process_memory_list(struct - read_config_memory - **mem, int, int); - void snmp_config_remember_free_list(struct - read_config_memory - **mem); - - void set_configuration_directory(const char *dir); - const char *get_configuration_directory(void); - void set_persistent_directory(const char *dir); - const char *get_persistent_directory(void); - void set_temp_file_pattern(const char *pattern); - const char *get_temp_file_pattern(void); - void handle_long_opt(const char *myoptarg); - -#ifdef __cplusplus -} -#endif -#endif /* READ_CONFIG_H */ diff --git a/utils/net-snmp/library/scapi.h b/utils/net-snmp/library/scapi.h deleted file mode 100644 index cd2579275..000000000 --- a/utils/net-snmp/library/scapi.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * scapi.h - */ - -#ifndef _SCAPI_H -#define _SCAPI_H - -#ifdef __cplusplus -extern "C" { -#endif - - /* - * Authentication/privacy transform bitlengths. - */ -#define SNMP_TRANS_AUTHLEN_HMACMD5 128 -#define SNMP_TRANS_AUTHLEN_HMACSHA1 160 - -#define SNMP_TRANS_AUTHLEN_HMAC96 96 - -#define SNMP_TRANS_PRIVLEN_1DES 64 -#define SNMP_TRANS_PRIVLEN_1DES_IV 64 - -#define SNMP_TRANS_PRIVLEN_AES 128 -#define SNMP_TRANS_PRIVLEN_AES_IV 128 -#define SNMP_TRANS_AES_PADSIZE 128 /* backwards compat */ -#define SNMP_TRANS_PRIVLEN_AES128 128 /* backwards compat */ -#define SNMP_TRANS_PRIVLEN_AES128_IV 128 /* backwards compat */ -#define SNMP_TRANS_AES_AES128_PADSIZE 128 /* backwards compat */ - - /* - * Prototypes. - */ - int sc_get_properlength(const oid * hashtype, - u_int hashtype_len); - int sc_get_proper_priv_length(const oid * privtype, - u_int privtype_len); - - int sc_init(void); - int sc_shutdown(int majorID, int minorID, void *serverarg, - void *clientarg); - - int sc_random(u_char * buf, size_t * buflen); - - int sc_generate_keyed_hash(const oid * authtype, - size_t authtypelen, - u_char * key, u_int keylen, - u_char * message, u_int msglen, - u_char * MAC, size_t * maclen); - - int sc_check_keyed_hash(const oid * authtype, - size_t authtypelen, u_char * key, - u_int keylen, u_char * message, - u_int msglen, u_char * MAC, - u_int maclen); - - int sc_encrypt(const oid * privtype, size_t privtypelen, - u_char * key, u_int keylen, - u_char * iv, u_int ivlen, - u_char * plaintext, u_int ptlen, - u_char * ciphertext, size_t * ctlen); - - int sc_decrypt(const oid * privtype, size_t privtypelen, - u_char * key, u_int keylen, - u_char * iv, u_int ivlen, - u_char * ciphertext, u_int ctlen, - u_char * plaintext, size_t * ptlen); - - int sc_hash(const oid * hashtype, size_t hashtypelen, - u_char * buf, size_t buf_len, - u_char * MAC, size_t * MAC_len); - - int sc_get_transform_type(oid * hashtype, - u_int hashtype_len, - int (**hash_fn) (const int mode, - void **context, - const u_char * - data, - const int - data_len, - u_char ** - digest, - size_t * - digest_len)); - - - /* - * All functions devolve to the following block if we can't do cryptography - */ -#define _SCAPI_NOT_CONFIGURED \ -{ \ - snmp_log(LOG_ERR, "Encryption support not enabled.\n"); \ - DEBUGMSGTL(("scapi", "SCAPI not configured")); \ - return SNMPERR_SC_NOT_CONFIGURED; \ -} - - /* - * define a transform type if we're using the internal md5 support - */ -#ifdef USE_INTERNAL_MD5 -#define INTERNAL_MD5 1 -#endif - -#ifdef __cplusplus -} -#endif -#endif /* _SCAPI_H */ diff --git a/utils/net-snmp/library/snmp-tc.h b/utils/net-snmp/library/snmp-tc.h deleted file mode 100644 index bfb4c5f2a..000000000 --- a/utils/net-snmp/library/snmp-tc.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef SNMP_TC_H -#define SNMP_TC_H - -#ifdef __cplusplus -extern "C" { -#endif - /* - * snmp-tc.h: Provide some standard #defines for Textual Convention - * related value information - */ - - int - netsnmp_dateandtime_set_buf_from_vars(u_char *buf, size_t *bufsize, - u_short y, u_char mon, u_char d, - u_char h, u_char min, u_char s, - u_char deci_seconds, - int utc_offset_direction, - u_char utc_offset_hours, - u_char utc_offset_minutes); - - u_char *date_n_time(time_t *, size_t *); - time_t ctime_to_timet(char *); - - /* - * TrueValue - */ -#define TV_TRUE 1 -#define TV_FALSE 2 - - /* - * RowStatus - */ -#define RS_NONEXISTENT 0 -#define RS_ACTIVE 1 -#define RS_NOTINSERVICE 2 -#define RS_NOTREADY 3 -#define RS_CREATEANDGO 4 -#define RS_CREATEANDWAIT 5 -#define RS_DESTROY 6 - -#define RS_IS_GOING_ACTIVE( x ) ( x == RS_CREATEANDGO || x == RS_ACTIVE ) -#define RS_IS_ACTIVE( x ) ( x == RS_ACTIVE ) -#define RS_IS_NOT_ACTIVE( x ) ( ! RS_IS_GOING_ACTIVE(x) ) - - /* - * StorageType - */ -#define ST_NONE 0 -#define ST_OTHER 1 -#define ST_VOLATILE 2 -#define ST_NONVOLATILE 3 -#define ST_PERMANENT 4 -#define ST_READONLY 5 - - char check_rowstatus_transition(int old_val, int new_val); - char check_storage_transition(int old_val, int new_val); - -#ifdef __cplusplus -} -#endif -#endif /* SNMP_TC_H */ diff --git a/utils/net-snmp/library/snmp.h b/utils/net-snmp/library/snmp.h deleted file mode 100644 index 30f3aaa4f..000000000 --- a/utils/net-snmp/library/snmp.h +++ /dev/null @@ -1,344 +0,0 @@ -#ifndef SNMP_H -#define SNMP_H - -#ifdef __cplusplus -extern "C" { -#endif - /* - * Definitions for the Simple Network Management Protocol (RFC 1067). - * - * - */ -/*********************************************************** - Copyright 1988, 1989 by Carnegie Mellon University - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of CMU not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -******************************************************************/ - - -#define SNMP_PORT 161 /* standard UDP port for SNMP agents - * to receive requests messages */ -#define SNMP_TRAP_PORT 162 /* standard UDP port for SNMP - * managers to receive notificaion - * (trap and inform) messages */ - -#define SNMP_MAX_LEN 1500 /* typical maximum message size */ -#define SNMP_MIN_MAX_LEN 484 /* minimum maximum message size */ - - /* - * SNMP versions - */ - /* - * There currently exists the following SNMP versions. - * * (Note that only SNMPv1 is in widespread usage, and this code supports - * * only SNMPv1, SNMPv2c, and SNMPv3. - * * - * * SNMPv1 - (full) the original version, defined by RFC 1157 - * * SNMPsec - (historic) the first attempt to add strong security - * * to SNMPv1, defined by RFCs 1351, 1352, and 1353. - * * SNMPv2p - (historic) party-based SNMP, which was another - * * attempt to add strong security to SNMP, defined - * * by RFCs 1441, 1445, 1446, 1448, and 1449. - * * SNMPv2c - (experimental) community string-based SNMPv2, - * * which was an attempt to combine the protocol - * * operations of SNMPv2 with the security of - * * SNMPv1, defined by RFCs 1901, 1905, and 1906. - * * SNMPv2u - (experimental) user-based SNMPv2, which provided - * * security based on user names and protocol - * * operations of SNMPv2, defined by RFCs 1905, - * * 1909, and 1910. - * * SNMPv2* (or SNMPv2star) - (experimental) an attempt to add the - * * best features of SNMPv2p and SNMPv2u, defined - * * by unpublished documents found at WEB site - * * owned by SNMP Research (a leading SNMP vendor) - * * SNMPv3 - the current attempt by the IETF working group to merge - * * the SNMPv2u and SNMPv2* proposals into a more widly - * * accepted SNMPv3. It is defined by not yet published - * * documents of the IETF SNMPv3 WG. - * * - * * SNMPv1, SNMPv2c, SNMPv2u, and SNMPv3 messages have a common - * * form, which is an ASN.1 sequence containing a message version - * * field, followed by version dependent fields. - * * SNMPsec, SNMPv2p, and SNMPv2* messages have a common form, - * * which is a tagged ASN.1 context specific sequence containing - * * message dependent fields. - * * - * * In the #defines for the message versions below, the value - * * for SNMPv1, SNMPv2c, SNMPv2u, and SNMPv3 messages is the - * * value of the message version field. Since SNMPsec, SNMPv2p, - * * and SNMPv2* messages do not have a message version field, - * * the value in the defines for them is choosen to be a large - * * arbitrary number. - * * - * * Note that many of the version ID's are defined below purely for - * * documentational purposes. At this point the only protocol planned - * * for future implementations is SNMP3, as the other v2 protocols will - * * not be supported by the IETF (ie, v2u, v2sec, v2star) or used by - * * the snmp community at large (at the time of this writing). - */ - - /* - * versions based on version field - */ -#ifndef DISABLE_SNMPV1 -#define SNMP_VERSION_1 0 -#endif -#ifndef DISABLE_SNMPV2C -#define SNMP_VERSION_2c 1 -#endif -#define SNMP_VERSION_2u 2 /* not (will never be) supported by this code */ -#define SNMP_VERSION_3 3 - - /* - * versions not based on a version field - */ -#define SNMP_VERSION_sec 128 /* not (will never be) supported by this code */ -#define SNMP_VERSION_2p 129 /* no longer supported by this code (> 4.0) */ -#define SNMP_VERSION_2star 130 /* not (will never be) supported by this code */ - - /* - * PDU types in SNMPv1, SNMPsec, SNMPv2p, SNMPv2c, SNMPv2u, SNMPv2*, and SNMPv3 - */ -#define SNMP_MSG_GET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0) /* a0=160 */ -#define SNMP_MSG_GETNEXT (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x1) /* a1=161 */ -#define SNMP_MSG_RESPONSE (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x2) /* a2=162 */ -#define SNMP_MSG_SET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x3) /* a3=163 */ - - /* - * PDU types in SNMPv1 and SNMPsec - */ -#define SNMP_MSG_TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x4) /* a4=164 */ - - /* - * PDU types in SNMPv2p, SNMPv2c, SNMPv2u, SNMPv2*, and SNMPv3 - */ -#define SNMP_MSG_GETBULK (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x5) /* a5=165 */ -#define SNMP_MSG_INFORM (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x6) /* a6=166 */ -#define SNMP_MSG_TRAP2 (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x7) /* a7=167 */ - - /* - * PDU types in SNMPv2u, SNMPv2*, and SNMPv3 - */ -#define SNMP_MSG_REPORT (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x8) /* a8=168 */ - - /* - * internal modes that should never be used by the protocol for the - * pdu type. - * - * All modes < 128 are reserved for SET requests. - */ -#define SNMP_MSG_INTERNAL_SET_BEGIN -1 -#define SNMP_MSG_INTERNAL_SET_RESERVE1 0 /* these should match snmp.h */ -#define SNMP_MSG_INTERNAL_SET_RESERVE2 1 -#define SNMP_MSG_INTERNAL_SET_ACTION 2 -#define SNMP_MSG_INTERNAL_SET_COMMIT 3 -#define SNMP_MSG_INTERNAL_SET_FREE 4 -#define SNMP_MSG_INTERNAL_SET_UNDO 5 -#define SNMP_MSG_INTERNAL_SET_MAX 6 - -#define SNMP_MSG_INTERNAL_CHECK_VALUE 17 -#define SNMP_MSG_INTERNAL_ROW_CREATE 18 -#define SNMP_MSG_INTERNAL_UNDO_SETUP 19 -#define SNMP_MSG_INTERNAL_SET_VALUE 20 -#define SNMP_MSG_INTERNAL_CHECK_CONSISTENCY 21 -#define SNMP_MSG_INTERNAL_UNDO_SET 22 -#define SNMP_MSG_INTERNAL_COMMIT 23 -#define SNMP_MSG_INTERNAL_UNDO_COMMIT 24 -#define SNMP_MSG_INTERNAL_IRREVERSIBLE_COMMIT 25 -#define SNMP_MSG_INTERNAL_UNDO_CLEANUP 26 - - /* - * modes > 128 for non sets. - * Note that 160-168 overlap with SNMP ASN1 pdu types - */ -#define SNMP_MSG_INTERNAL_PRE_REQUEST 128 -#define SNMP_MSG_INTERNAL_OBJECT_LOOKUP 129 -#define SNMP_MSG_INTERNAL_POST_REQUEST 130 -#define SNMP_MSG_INTERNAL_GET_STASH 131 - - /* - * test for member of Confirmed Class i.e., reportable - */ -#define SNMP_CMD_CONFIRMED(c) (c == SNMP_MSG_INFORM || c == SNMP_MSG_GETBULK ||\ - c == SNMP_MSG_GETNEXT || c == SNMP_MSG_GET || \ - c == SNMP_MSG_SET) - - /* - * Exception values for SNMPv2p, SNMPv2c, SNMPv2u, SNMPv2*, and SNMPv3 - */ -#define SNMP_NOSUCHOBJECT (ASN_CONTEXT | ASN_PRIMITIVE | 0x0) /* 80=128 */ -#define SNMP_NOSUCHINSTANCE (ASN_CONTEXT | ASN_PRIMITIVE | 0x1) /* 81=129 */ -#define SNMP_ENDOFMIBVIEW (ASN_CONTEXT | ASN_PRIMITIVE | 0x2) /* 82=130 */ - - /* - * Error codes (the value of the field error-status in PDUs) - */ - - /* - * in SNMPv1, SNMPsec, SNMPv2p, SNMPv2c, SNMPv2u, SNMPv2*, and SNMPv3 PDUs - */ -#define SNMP_ERR_NOERROR (0) /* XXX Used only for PDUs? */ -#define SNMP_ERR_TOOBIG (1) -#define SNMP_ERR_NOSUCHNAME (2) -#define SNMP_ERR_BADVALUE (3) -#define SNMP_ERR_READONLY (4) -#define SNMP_ERR_GENERR (5) - - /* - * in SNMPv2p, SNMPv2c, SNMPv2u, SNMPv2*, and SNMPv3 PDUs - */ -#define SNMP_ERR_NOACCESS (6) -#define SNMP_ERR_WRONGTYPE (7) -#define SNMP_ERR_WRONGLENGTH (8) -#define SNMP_ERR_WRONGENCODING (9) -#define SNMP_ERR_WRONGVALUE (10) -#define SNMP_ERR_NOCREATION (11) -#define SNMP_ERR_INCONSISTENTVALUE (12) -#define SNMP_ERR_RESOURCEUNAVAILABLE (13) -#define SNMP_ERR_COMMITFAILED (14) -#define SNMP_ERR_UNDOFAILED (15) -#define SNMP_ERR_AUTHORIZATIONERROR (16) -#define SNMP_ERR_NOTWRITABLE (17) - - /* - * in SNMPv2c, SNMPv2u, SNMPv2*, and SNMPv3 PDUs - */ -#define SNMP_ERR_INCONSISTENTNAME (18) - -#define MAX_SNMP_ERR 18 - -#define SNMP_VALIDATE_ERR(x) ( (x > MAX_SNMP_ERR) ? \ - SNMP_ERR_GENERR : \ - (x < SNMP_ERR_NOERROR) ? \ - SNMP_ERR_GENERR : \ - x ) - - /* - * values of the generic-trap field in trap PDUs - */ -#define SNMP_TRAP_COLDSTART (0) -#define SNMP_TRAP_WARMSTART (1) -#define SNMP_TRAP_LINKDOWN (2) -#define SNMP_TRAP_LINKUP (3) -#define SNMP_TRAP_AUTHFAIL (4) -#define SNMP_TRAP_EGPNEIGHBORLOSS (5) -#define SNMP_TRAP_ENTERPRISESPECIFIC (6) - - /* - * row status values - */ -#define SNMP_ROW_NONEXISTENT 0 -#define SNMP_ROW_ACTIVE 1 -#define SNMP_ROW_NOTINSERVICE 2 -#define SNMP_ROW_NOTREADY 3 -#define SNMP_ROW_CREATEANDGO 4 -#define SNMP_ROW_CREATEANDWAIT 5 -#define SNMP_ROW_DESTROY 6 - - /* - * row storage values - */ -#define SNMP_STORAGE_NONE 0 -#define SNMP_STORAGE_OTHER 1 -#define SNMP_STORAGE_VOLATILE 2 -#define SNMP_STORAGE_NONVOLATILE 3 -#define SNMP_STORAGE_PERMANENT 4 -#define SNMP_STORAGE_READONLY 5 - - /* - * message processing models - */ -#define SNMP_MP_MODEL_SNMPv1 0 -#define SNMP_MP_MODEL_SNMPv2c 1 -#define SNMP_MP_MODEL_SNMPv2u 2 -#define SNMP_MP_MODEL_SNMPv3 3 -#define SNMP_MP_MODEL_SNMPv2p 256 - - /* - * security values - */ -#define SNMP_SEC_MODEL_ANY 0 -#define SNMP_SEC_MODEL_SNMPv1 1 -#define SNMP_SEC_MODEL_SNMPv2c 2 -#define SNMP_SEC_MODEL_USM 3 -#define SNMP_SEC_MODEL_SNMPv2p 256 - -#define SNMP_SEC_LEVEL_NOAUTH 1 -#define SNMP_SEC_LEVEL_AUTHNOPRIV 2 -#define SNMP_SEC_LEVEL_AUTHPRIV 3 - -#define SNMP_MSG_FLAG_AUTH_BIT 0x01 -#define SNMP_MSG_FLAG_PRIV_BIT 0x02 -#define SNMP_MSG_FLAG_RPRT_BIT 0x04 - - /* - * control PDU handling characteristics - */ -#define UCD_MSG_FLAG_RESPONSE_PDU 0x100 -#define UCD_MSG_FLAG_EXPECT_RESPONSE 0x200 -#define UCD_MSG_FLAG_FORCE_PDU_COPY 0x400 -#define UCD_MSG_FLAG_ALWAYS_IN_VIEW 0x800 -#define UCD_MSG_FLAG_PDU_TIMEOUT 0x1000 -#define UCD_MSG_FLAG_ONE_PASS_ONLY 0x2000 - - /* - * view status - */ -#define SNMP_VIEW_INCLUDED 1 -#define SNMP_VIEW_EXCLUDED 2 - - /* - * basic oid values - */ -#define SNMP_OID_INTERNET 1, 3, 6, 1 -#define SNMP_OID_ENTERPRISES SNMP_OID_INTERNET, 4, 1 -#define SNMP_OID_MIB2 SNMP_OID_INTERNET, 2, 1 -#define SNMP_OID_SNMPV2 SNMP_OID_INTERNET, 6 -#define SNMP_OID_SNMPMODULES SNMP_OID_SNMPV2, 3 - - /* - * lengths as defined by TCs - */ -#define SNMPADMINLENGTH 255 - - - char *uptime_string(u_long, char *); - void xdump(const u_char *, size_t, const char *); - u_char *snmp_parse_var_op(u_char *, oid *, size_t *, u_char *, - size_t *, u_char **, size_t *); - u_char *snmp_build_var_op(u_char *, oid *, size_t *, u_char, - size_t, u_char *, size_t *); - - -#ifdef USE_REVERSE_ASNENCODING - int snmp_realloc_rbuild_var_op(u_char ** pkt, - size_t * pkt_len, - size_t * offset, - int allow_realloc, - const oid * name, - size_t * name_len, - u_char value_type, - u_char * value, - size_t value_length); -#endif - -#ifdef __cplusplus -} -#endif -#endif /* SNMP_H */ diff --git a/utils/net-snmp/library/snmpCallbackDomain.h b/utils/net-snmp/library/snmpCallbackDomain.h deleted file mode 100644 index e9636299f..000000000 --- a/utils/net-snmp/library/snmpCallbackDomain.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _SNMPCALLBACKDOMAIN_H -#define _SNMPCALLBACKDOMAIN_H - -#ifndef NET_SNMP_CONFIG_H -#error "Please include before this file" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef SNMP_TRANSPORT_CALLBACK_DOMAIN - -#include - -typedef struct netsnmp_callback_pass_s { - int return_transport_num; - netsnmp_pdu *pdu; - struct netsnmp_callback_pass_s *next; -} netsnmp_callback_pass; - -typedef struct netsnmp_callback_info_s { - int linkedto; - void *parent_data; - netsnmp_callback_pass *data; - int callback_num; - int pipefds[2]; -} netsnmp_callback_info; - -netsnmp_transport *netsnmp_callback_transport(int); -int netsnmp_callback_hook_parse(netsnmp_session * sp, - netsnmp_pdu *pdu, - u_char * packetptr, - size_t len); -int netsnmp_callback_hook_build(netsnmp_session * sp, - netsnmp_pdu *pdu, - u_char * ptk, size_t * len); -int netsnmp_callback_check_packet(u_char * pkt, size_t len); -netsnmp_pdu *netsnmp_callback_create_pdu(netsnmp_transport *transport, - void *opaque, size_t olength); -netsnmp_session *netsnmp_callback_open(int attach_to, - int (*return_func) (int op, - netsnmp_session - * session, - int reqid, - netsnmp_pdu - *pdu, - void *magic), - int (*fpre_parse) (netsnmp_session - *, - struct - netsnmp_transport_s - *, void *, int), - int (*fpost_parse) (netsnmp_session - *, - netsnmp_pdu *, - int)); -void netsnmp_clear_callback_list(void); - -#else - -#define netsnmp_clear_callback_list() - - -#endif /*SNMP_TRANSPORT_CALLBACK_DOMAIN*/ - -#ifdef __cplusplus -} -#endif -#endif/*_SNMPCALLBACKDOMAIN_H*/ diff --git a/utils/net-snmp/library/snmpTCPDomain.h b/utils/net-snmp/library/snmpTCPDomain.h deleted file mode 100644 index add69dece..000000000 --- a/utils/net-snmp/library/snmpTCPDomain.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _SNMPTCPDOMAIN_H -#define _SNMPTCPDOMAIN_H - -#ifdef SNMP_TRANSPORT_TCP_DOMAIN - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NETINET_IN_H -#include -#endif - -/* - * The SNMP over TCP over IPv4 transport domain is identified by - * transportDomainTcpIpv4 as defined in RFC 3419. - */ - -#define TRANSPORT_DOMAIN_TCP_IP 1,3,6,1,2,1,100,1,5 -extern oid netsnmp_snmpTCPDomain[]; - -netsnmp_transport *netsnmp_tcp_transport(struct sockaddr_in *addr, int local); - -/* - * "Constructor" for transport domain object. - */ - -void netsnmp_tcp_ctor(void); - -#ifdef __cplusplus -} -#endif -#endif /*SNMP_TRANSPORT_TCP_DOMAIN */ - -#endif/*_SNMPTCPDOMAIN_H*/ diff --git a/utils/net-snmp/library/snmpUDPDomain.h b/utils/net-snmp/library/snmpUDPDomain.h deleted file mode 100644 index 8e0cd3ab5..000000000 --- a/utils/net-snmp/library/snmpUDPDomain.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef _SNMPUDPDOMAIN_H -#define _SNMPUDPDOMAIN_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NETINET_IN_H -#include -#endif - -netsnmp_transport *netsnmp_udp_transport(struct sockaddr_in *addr, int local); - - -/* - * Convert a "traditional" peername into a sockaddr_in structure which is - * written to *addr. Returns 1 if the conversion was successful, or 0 if it - * failed. - */ - -int netsnmp_sockaddr_in(struct sockaddr_in *addr, - const char *peername, int remote_port); - - -/* - * Register any configuration tokens specific to the agent. - */ - -void netsnmp_udp_agent_config_tokens_register(void); - -void netsnmp_udp_parse_security(const char *token, char *param); - -int netsnmp_udp_getSecName(void *opaque, int olength, - const char *community, - size_t community_len, - char **secname, - char **contextName); - -/* - * "Constructor" for transport domain object. - */ - -void netsnmp_udp_ctor(void); - -#ifdef __cplusplus -} -#endif -#endif/*_SNMPUDPDOMAIN_H*/ diff --git a/utils/net-snmp/library/snmpUnixDomain.h b/utils/net-snmp/library/snmpUnixDomain.h deleted file mode 100644 index 8afc96ea0..000000000 --- a/utils/net-snmp/library/snmpUnixDomain.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef _SNMPUNIXDOMAIN_H -#define _SNMPUNIXDOMAIN_H - -#ifdef SNMP_TRANSPORT_UNIX_DOMAIN - -#ifdef __cplusplus -extern "C" { -#endif - -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_SYS_UN_H -#include -#endif - -#include -#include - -/* - * The SNMP over local socket transport domain is identified by - * transportDomainLocal as defined in RFC 3419. - */ - -#define TRANSPORT_DOMAIN_LOCAL 1,3,6,1,2,1,100,1,13 -extern oid netsnmp_UnixDomain[]; - -netsnmp_transport *netsnmp_unix_transport(struct sockaddr_un *addr, - int local); -void netsnmp_unix_agent_config_tokens_register(void); -void netsnmp_unix_parse_security(const char *token, char *param); -int netsnmp_unix_getSecName(void *opaque, int olength, - const char *community, - size_t community_len, char **secName, - char **contextName); - - -/* - * "Constructor" for transport domain object. - */ - -void netsnmp_unix_ctor(void); - -#ifdef __cplusplus -} -#endif -#endif /*SNMP_TRANSPORT_UNIX_DOMAIN */ - -#endif/*_SNMPUNIXDOMAIN_H*/ diff --git a/utils/net-snmp/library/snmp_alarm.h b/utils/net-snmp/library/snmp_alarm.h deleted file mode 100644 index f13b2a959..000000000 --- a/utils/net-snmp/library/snmp_alarm.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef SNMP_ALARM_H -#define SNMP_ALARM_H - -#ifdef __cplusplus -extern "C" { -#endif - - typedef void (SNMPAlarmCallback) (unsigned int clientreg, - void *clientarg); - - /* - * alarm flags - */ -#define SA_REPEAT 0x01 /* keep repeating every X seconds */ - - struct snmp_alarm { - struct timeval t; - unsigned int flags; - unsigned int clientreg; - struct timeval t_last; - struct timeval t_next; - void *clientarg; - SNMPAlarmCallback *thecallback; - struct snmp_alarm *next; - }; - - /* - * the ones you should need - */ - void snmp_alarm_unregister(unsigned int clientreg); - void snmp_alarm_unregister_all(void); - unsigned int snmp_alarm_register(unsigned int when, - unsigned int flags, - SNMPAlarmCallback * thecallback, - void *clientarg); - - unsigned int snmp_alarm_register_hr(struct timeval t, - unsigned int flags, - SNMPAlarmCallback * cb, - void *cd); - - - /* - * the ones you shouldn't - */ - void init_snmp_alarm(void); - int init_alarm_post_config(int majorid, int minorid, - void *serverarg, - void *clientarg); - void sa_update_entry(struct snmp_alarm *alrm); - struct snmp_alarm *sa_find_next(void); - void run_alarms(void); - RETSIGTYPE alarm_handler(int a); - void set_an_alarm(void); - int get_next_alarm_delay_time(struct timeval *delta); - -#ifdef __cplusplus -} -#endif -#endif /* SNMP_ALARM_H */ diff --git a/utils/net-snmp/library/snmp_api.h b/utils/net-snmp/library/snmp_api.h deleted file mode 100644 index 5c5fab97e..000000000 --- a/utils/net-snmp/library/snmp_api.h +++ /dev/null @@ -1,1071 +0,0 @@ -/* Portions of this file are subject to the following copyright(s). See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/* - * Portions of this file are copyrighted by: - * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ -#ifndef SNMP_API_H -#define SNMP_API_H - -/* - * @file snmp_api.h - API for access to snmp. - * - * @addtogroup library - * - * Caution: when using this library in a multi-threaded application, - * the values of global variables "snmp_errno" and "snmp_detail" - * cannot be reliably determined. Suggest using snmp_error() - * to obtain the library error codes. - * - * @{ - */ - -#ifndef DONT_SHARE_ERROR_WITH_OTHER_THREADS -#define SET_SNMP_ERROR(x) snmp_errno=(x) -#else -#define SET_SNMP_ERROR(x) -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -/*********************************************************** - Copyright 1989 by Carnegie Mellon University - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of CMU not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -******************************************************************/ - -/** @typedef struct variable_list netsnmp_variable_list - * Typedefs the variable_list struct into netsnmp_variable_list */ -struct variable_list; -typedef struct variable_list netsnmp_variable_list; -struct timeval; -struct netsnmp_transport_s; - -#define USM_AUTH_KU_LEN 32 -#define USM_PRIV_KU_LEN 32 - -/** @typedef struct snmp_pdu to netsnmp_pdu - * Typedefs the snmp_pdu struct into netsnmp_pdu */ -/** @struct snmp_pdu - * The snmp protocol data unit. - */ -typedef struct snmp_pdu { - - /* - * Protocol-version independent fields - */ - /** snmp version */ - long version; - /** Type of this PDU */ - int command; - /** Request id - note: not incremented on retries */ - long reqid; - /** Message id for V3 messages note: incremented for each retry */ - long msgid; - /** Unique ID for incoming transactions */ - long transid; - /** Session id for AgentX messages */ - long sessid; - /** Error status (non_repeaters in GetBulk) */ - long errstat; - /** Error index (max_repetitions in GetBulk) */ - long errindex; - /** Uptime */ - u_long time; - u_long flags; - - int securityModel; - /** noAuthNoPriv, authNoPriv, authPriv */ - int securityLevel; - int msgParseModel; - - /** - * Transport-specific opaque data. This replaces the IP-centric address - * field. - */ - - void *transport_data; - int transport_data_length; - - /** - * The actual transport domain. This SHOULD NOT BE FREE()D. - */ - - const oid *tDomain; - size_t tDomainLen; - - netsnmp_variable_list *variables; - - - /* - * SNMPv1 & SNMPv2c fields - */ - /** community for outgoing requests. */ - u_char *community; - /** length of community name. */ - size_t community_len; - - /* - * Trap information - */ - /** System OID */ - oid *enterprise; - size_t enterprise_length; - /** trap type */ - long trap_type; - /** specific type */ - long specific_type; - /** This is ONLY used for v1 TRAPs */ - unsigned char agent_addr[4]; - - /* - * SNMPv3 fields - */ - /** context snmpEngineID */ - u_char *contextEngineID; - /** Length of contextEngineID */ - size_t contextEngineIDLen; - /** authoritative contextName */ - char *contextName; - /** Length of contextName */ - size_t contextNameLen; - /** authoritative snmpEngineID for security */ - u_char *securityEngineID; - /** Length of securityEngineID */ - size_t securityEngineIDLen; - /** on behalf of this principal */ - char *securityName; - /** Length of securityName. */ - size_t securityNameLen; - - /* - * AgentX fields - * (also uses SNMPv1 community field) - */ - int priority; - int range_subid; - - void *securityStateRef; -} netsnmp_pdu; - -struct snmp_session; - -/** @typedef struct snmp_session netsnmp_session - * Typedefs the snmp_session struct intonetsnmp_session */ -typedef struct snmp_session netsnmp_session; - -typedef int (*snmp_callback) (int, netsnmp_session *, int, - netsnmp_pdu *, void *); -typedef int (*netsnmp_callback) (int, netsnmp_session *, int, - netsnmp_pdu *, void *); -/** @struct snmp_session - * The snmp session structure. - */ -struct snmp_session { - /* - * Protocol-version independent fields - */ - /** snmp version */ - long version; - /** Number of retries before timeout. */ - int retries; - /** Number of uS until first timeout, then exponential backoff */ - long timeout; - u_long flags; - struct snmp_session *subsession; - struct snmp_session *next; - - /** Domain name or dotted IP address of default peer */ - char *peername; - /** UDP port number of peer. */ - u_short remote_port; - /** My Domain name or dotted IP address, 0 for default */ - char *localname; - /** My UDP port number, 0 for default, picked randomly */ - u_short local_port; - /** - * Authentication function or NULL if null authentication is used - */ - u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t); - /** Function to interpret incoming data */ - netsnmp_callback callback; - /** - * Pointer to data that the callback function may consider important - */ - void *callback_magic; - /** copy of system errno */ - int s_errno; - /** copy of library errno */ - int s_snmp_errno; - /** Session id - AgentX only */ - long sessid; - - /* - * SNMPv1 & SNMPv2c fields - */ - /** community for outgoing requests. */ - u_char *community; - /** Length of community name. */ - size_t community_len; - /** Largest message to try to receive. */ - size_t rcvMsgMaxSize; - /** Largest message to try to send. */ - size_t sndMsgMaxSize; - - /* - * SNMPv3 fields - */ - /** are we the authoritative engine? */ - u_char isAuthoritative; - /** authoritative snmpEngineID */ - u_char *contextEngineID; - /** Length of contextEngineID */ - size_t contextEngineIDLen; - /** initial engineBoots for remote engine */ - u_int engineBoots; - /** initial engineTime for remote engine */ - u_int engineTime; - /** authoritative contextName */ - char *contextName; - /** Length of contextName */ - size_t contextNameLen; - /** authoritative snmpEngineID */ - u_char *securityEngineID; - /** Length of contextEngineID */ - size_t securityEngineIDLen; - /** on behalf of this principal */ - char *securityName; - /** Length of securityName. */ - size_t securityNameLen; - - /** auth protocol oid */ - oid *securityAuthProto; - /** Length of auth protocol oid */ - size_t securityAuthProtoLen; - /** Ku for auth protocol XXX */ - u_char securityAuthKey[USM_AUTH_KU_LEN]; - /** Length of Ku for auth protocol */ - size_t securityAuthKeyLen; - /** Kul for auth protocol */ - u_char *securityAuthLocalKey; - /** Length of Kul for auth protocol XXX */ - size_t securityAuthLocalKeyLen; - - /** priv protocol oid */ - oid *securityPrivProto; - /** Length of priv protocol oid */ - size_t securityPrivProtoLen; - /** Ku for privacy protocol XXX */ - u_char securityPrivKey[USM_PRIV_KU_LEN]; - /** Length of Ku for priv protocol */ - size_t securityPrivKeyLen; - /** Kul for priv protocol */ - u_char *securityPrivLocalKey; - /** Length of Kul for priv protocol XXX */ - size_t securityPrivLocalKeyLen; - - /** snmp security model, v1, v2c, usm */ - int securityModel; - /** noAuthNoPriv, authNoPriv, authPriv */ - int securityLevel; - - /** - * security module specific - */ - void *securityInfo; - - /** - * use as you want data - */ - void *myvoid; -}; - -/* - * A list of all the outstanding requests for a particular session. - */ -#ifdef SNMP_NEED_REQUEST_LIST -typedef struct request_list { - struct request_list *next_request; - long request_id; /* request id */ - long message_id; /* message id */ - netsnmp_callback callback; /* user callback per request (NULL if unused) */ - void *cb_data; /* user callback data per request (NULL if unused) */ - int retries; /* Number of retries */ - u_long timeout; /* length to wait for timeout */ - struct timeval time; /* Time this request was made */ - struct timeval expire; /* time this request is due to expire */ - struct snmp_session *session; - netsnmp_pdu *pdu; /* The pdu for this request - * (saved so it can be retransmitted */ -} netsnmp_request_list; -#endif /* SNMP_NEED_REQUEST_LIST */ - - /* - * Set fields in session and pdu to the following to get a default or unconfigured value. - */ -#define SNMP_DEFAULT_COMMUNITY_LEN 0 /* to get a default community name */ -#define SNMP_DEFAULT_RETRIES -1 -#define SNMP_DEFAULT_TIMEOUT -1 -#define SNMP_DEFAULT_REMPORT 0 -#define SNMP_DEFAULT_REQID -1 -#define SNMP_DEFAULT_MSGID -1 -#define SNMP_DEFAULT_ERRSTAT -1 -#define SNMP_DEFAULT_ERRINDEX -1 -#define SNMP_DEFAULT_ADDRESS 0 -#define SNMP_DEFAULT_PEERNAME NULL -#define SNMP_DEFAULT_ENTERPRISE_LENGTH 0 -#define SNMP_DEFAULT_TIME 0 -#define SNMP_DEFAULT_VERSION -1 -#define SNMP_DEFAULT_SECMODEL -1 -#define SNMP_DEFAULT_CONTEXT "" -#ifndef DISABLE_MD5 -#define SNMP_DEFAULT_AUTH_PROTO usmHMACMD5AuthProtocol -#else -#define SNMP_DEFAULT_AUTH_PROTO usmHMACSHA1AuthProtocol -#endif -#define SNMP_DEFAULT_AUTH_PROTOLEN USM_LENGTH_OID_TRANSFORM -#ifndef DISABLE_DES -#define SNMP_DEFAULT_PRIV_PROTO usmDESPrivProtocol -#else -#define SNMP_DEFAULT_PRIV_PROTO usmAESPrivProtocol -#endif -#define SNMP_DEFAULT_PRIV_PROTOLEN USM_LENGTH_OID_TRANSFORM - - extern const char *snmp_api_errstring(int); - extern void snmp_perror(const char *); - extern void snmp_set_detail(const char *); - -#define SNMP_MAX_MSG_SIZE 1472 /* ethernet MTU minus IP/UDP header */ -#define SNMP_MAX_MSG_V3_HDRS (4+3+4+7+7+3+7+16) /* fudge factor=16 */ -#define SNMP_MAX_ENG_SIZE 32 -#define SNMP_MAX_SEC_NAME_SIZE 256 -#define SNMP_MAX_CONTEXT_SIZE 256 -#define SNMP_SEC_PARAM_BUF_SIZE 256 - - /* - * set to one to ignore unauthenticated Reports - */ -#define SNMPV3_IGNORE_UNAUTH_REPORTS 0 - - /* - * authoritative engine definitions - */ -#define SNMP_SESS_NONAUTHORITATIVE 0 /* should be 0 to default to this */ -#define SNMP_SESS_AUTHORITATIVE 1 /* don't learn engineIDs */ -#define SNMP_SESS_UNKNOWNAUTH 2 /* sometimes (like NRs) */ - - /* - * to determine type of Report from varbind_list - */ -#define REPORT_STATS_LEN 9 -#define REPORT_snmpUnknownSecurityModels_NUM 1 -#define REPORT_snmpInvalidMsgs_NUM 2 -#define REPORT_usmStatsUnsupportedSecLevels_NUM 1 -#define REPORT_usmStatsNotInTimeWindows_NUM 2 -#define REPORT_usmStatsUnknownUserNames_NUM 3 -#define REPORT_usmStatsUnknownEngineIDs_NUM 4 -#define REPORT_usmStatsWrongDigests_NUM 5 -#define REPORT_usmStatsDecryptionErrors_NUM 6 - -#define SNMP_DETAIL_SIZE 512 - -#define SNMP_FLAGS_DONT_PROBE 0x100 /* don't probe for an engineID */ -#define SNMP_FLAGS_STREAM_SOCKET 0x80 -#define SNMP_FLAGS_LISTENING 0x40 /* Server stream sockets only */ -#define SNMP_FLAGS_SUBSESSION 0x20 -#define SNMP_FLAGS_STRIKE2 0x02 -#define SNMP_FLAGS_STRIKE1 0x01 - -#define CLEAR_SNMP_STRIKE_FLAGS(x) \ - x &= ~(SNMP_FLAGS_STRIKE2|SNMP_FLAGS_STRIKE1) - - /* - * returns '1' if the session is to be regarded as dead, - * otherwise set the strike flags appropriately, and return 0 - */ -#define SET_SNMP_STRIKE_FLAGS(x) \ - (( x & SNMP_FLAGS_STRIKE2 ) ? 1 : \ - ((( x & SNMP_FLAGS_STRIKE1 ) ? ( x |= SNMP_FLAGS_STRIKE2 ) : \ - ( x |= SNMP_FLAGS_STRIKE1 )), \ - 0)) - - /* - * Error return values. - * - * SNMPERR_SUCCESS is the non-PDU "success" code. - * - * XXX These should be merged with SNMP_ERR_* defines and confined - * to values < 0. ??? - */ -#define SNMPERR_SUCCESS (0) /* XXX Non-PDU "success" code. */ -#define SNMPERR_GENERR (-1) -#define SNMPERR_BAD_LOCPORT (-2) -#define SNMPERR_BAD_ADDRESS (-3) -#define SNMPERR_BAD_SESSION (-4) -#define SNMPERR_TOO_LONG (-5) -#define SNMPERR_NO_SOCKET (-6) -#define SNMPERR_V2_IN_V1 (-7) -#define SNMPERR_V1_IN_V2 (-8) -#define SNMPERR_BAD_REPEATERS (-9) -#define SNMPERR_BAD_REPETITIONS (-10) -#define SNMPERR_BAD_ASN1_BUILD (-11) -#define SNMPERR_BAD_SENDTO (-12) -#define SNMPERR_BAD_PARSE (-13) -#define SNMPERR_BAD_VERSION (-14) -#define SNMPERR_BAD_SRC_PARTY (-15) -#define SNMPERR_BAD_DST_PARTY (-16) -#define SNMPERR_BAD_CONTEXT (-17) -#define SNMPERR_BAD_COMMUNITY (-18) -#define SNMPERR_NOAUTH_DESPRIV (-19) -#define SNMPERR_BAD_ACL (-20) -#define SNMPERR_BAD_PARTY (-21) -#define SNMPERR_ABORT (-22) -#define SNMPERR_UNKNOWN_PDU (-23) -#define SNMPERR_TIMEOUT (-24) -#define SNMPERR_BAD_RECVFROM (-25) -#define SNMPERR_BAD_ENG_ID (-26) -#define SNMPERR_BAD_SEC_NAME (-27) -#define SNMPERR_BAD_SEC_LEVEL (-28) -#define SNMPERR_ASN_PARSE_ERR (-29) -#define SNMPERR_UNKNOWN_SEC_MODEL (-30) -#define SNMPERR_INVALID_MSG (-31) -#define SNMPERR_UNKNOWN_ENG_ID (-32) -#define SNMPERR_UNKNOWN_USER_NAME (-33) -#define SNMPERR_UNSUPPORTED_SEC_LEVEL (-34) -#define SNMPERR_AUTHENTICATION_FAILURE (-35) -#define SNMPERR_NOT_IN_TIME_WINDOW (-36) -#define SNMPERR_DECRYPTION_ERR (-37) -#define SNMPERR_SC_GENERAL_FAILURE (-38) -#define SNMPERR_SC_NOT_CONFIGURED (-39) -#define SNMPERR_KT_NOT_AVAILABLE (-40) -#define SNMPERR_UNKNOWN_REPORT (-41) -#define SNMPERR_USM_GENERICERROR (-42) -#define SNMPERR_USM_UNKNOWNSECURITYNAME (-43) -#define SNMPERR_USM_UNSUPPORTEDSECURITYLEVEL (-44) -#define SNMPERR_USM_ENCRYPTIONERROR (-45) -#define SNMPERR_USM_AUTHENTICATIONFAILURE (-46) -#define SNMPERR_USM_PARSEERROR (-47) -#define SNMPERR_USM_UNKNOWNENGINEID (-48) -#define SNMPERR_USM_NOTINTIMEWINDOW (-49) -#define SNMPERR_USM_DECRYPTIONERROR (-50) -#define SNMPERR_NOMIB (-51) -#define SNMPERR_RANGE (-52) -#define SNMPERR_MAX_SUBID (-53) -#define SNMPERR_BAD_SUBID (-54) -#define SNMPERR_LONG_OID (-55) -#define SNMPERR_BAD_NAME (-56) -#define SNMPERR_VALUE (-57) -#define SNMPERR_UNKNOWN_OBJID (-58) -#define SNMPERR_NULL_PDU (-59) -#define SNMPERR_NO_VARS (-60) -#define SNMPERR_VAR_TYPE (-61) -#define SNMPERR_MALLOC (-62) -#define SNMPERR_KRB5 (-63) - -#define SNMPERR_MAX (-63) - -#define non_repeaters errstat -#define max_repetitions errindex - -typedef union { - long *integer; - u_char *string; - oid *objid; - u_char *bitstring; - struct counter64 *counter64; -#ifdef OPAQUE_SPECIAL_TYPES - float *floatVal; - double *doubleVal; - /* - * t_union *unionVal; - */ -#endif /* OPAQUE_SPECIAL_TYPES */ -} netsnmp_vardata; - - -/** @struct variable_list - * The netsnmp variable list binding structure, it's typedef'd to - * netsnmp_variable_list. - */ -struct variable_list { - /** NULL for last variable */ - struct variable_list *next_variable; - /** Object identifier of variable */ - oid *name; - /** number of subid's in name */ - size_t name_length; - /** ASN type of variable */ - u_char type; - /** value of variable */ - netsnmp_vardata val; - /** the length of the value to be copied into buf */ - size_t val_len; - /** 90 percentile < 24. */ - oid name_loc[MAX_OID_LEN]; - /** 90 percentile < 40. */ - u_char buf[40]; - /** (Opaque) hook for additional data */ - void *data; - /** callback to free above */ - void (*dataFreeHook)(void *); - int index; -}; - - - - /* - * netsnmp_session *snmp_open(session) - * netsnmp_session *session; - * - * Sets up the session with the snmp_session information provided - * by the user. Then opens and binds the necessary UDP port. - * A handle to the created session is returned (this is different than - * the pointer passed to snmp_open()). On any error, NULL is returned - * and snmp_errno is set to the appropriate error code. - */ - netsnmp_session *snmp_open(netsnmp_session *); - - /* - * int snmp_close(session) - * netsnmp_session *session; - * - * Close the input session. Frees all data allocated for the session, - * dequeues any pending requests, and closes any sockets allocated for - * the session. Returns 0 on error, 1 otherwise. - * - * snmp_close_sessions() does the same thing for all open sessions - */ - int snmp_close(netsnmp_session *); - int snmp_close_sessions(void); - - - /* - * int snmp_send(session, pdu) - * netsnmp_session *session; - * netsnmp_pdu *pdu; - * - * Sends the input pdu on the session after calling snmp_build to create - * a serialized packet. If necessary, set some of the pdu data from the - * session defaults. Add a request corresponding to this pdu to the list - * of outstanding requests on this session, then send the pdu. - * Returns the request id of the generated packet if applicable, otherwise 1. - * On any error, 0 is returned. - * The pdu is freed by snmp_send() unless a failure occured. - */ - int snmp_send(netsnmp_session *, netsnmp_pdu *); - - /* - * int snmp_async_send(session, pdu, callback, cb_data) - * netsnmp_session *session; - * netsnmp_pdu *pdu; - * netsnmp_callback callback; - * void *cb_data; - * - * Sends the input pdu on the session after calling snmp_build to create - * a serialized packet. If necessary, set some of the pdu data from the - * session defaults. Add a request corresponding to this pdu to the list - * of outstanding requests on this session and store callback and data, - * then send the pdu. - * Returns the request id of the generated packet if applicable, otherwise 1. - * On any error, 0 is returned. - * The pdu is freed by snmp_send() unless a failure occured. - */ - int snmp_async_send(netsnmp_session *, netsnmp_pdu *, - netsnmp_callback, void *); - - - /* - * void snmp_read(fdset) - * fd_set *fdset; - * - * Checks to see if any of the fd's set in the fdset belong to - * snmp. Each socket with it's fd set has a packet read from it - * and snmp_parse is called on the packet received. The resulting pdu - * is passed to the callback routine for that session. If the callback - * routine returns successfully, the pdu and it's request are deleted. - */ - void snmp_read(fd_set *); - - - - /* - * void - * snmp_free_pdu(pdu) - * netsnmp_pdu *pdu; - * - * Frees the pdu and any malloc'd data associated with it. - */ - void snmp_free_pdu(netsnmp_pdu *); - - void snmp_free_var(netsnmp_variable_list *); /* frees just this one */ - - void snmp_free_varbind(netsnmp_variable_list * var); /* frees all in list */ - - /* - * int snmp_select_info(numfds, fdset, timeout, block) - * int *numfds; - * fd_set *fdset; - * struct timeval *timeout; - * int *block; - * - * Returns info about what snmp requires from a select statement. - * numfds is the number of fds in the list that are significant. - * All file descriptors opened for SNMP are OR'd into the fdset. - * If activity occurs on any of these file descriptors, snmp_read - * should be called with that file descriptor set. - * - * The timeout is the latest time that SNMP can wait for a timeout. The - * select should be done with the minimum time between timeout and any other - * timeouts necessary. This should be checked upon each invocation of select. - * If a timeout is received, snmp_timeout should be called to check if the - * timeout was for SNMP. (snmp_timeout is idempotent) - * - * Block is 1 if the select is requested to block indefinitely, rather than - * time out. If block is input as 1, the timeout value will be treated as - * undefined, but it must be available for setting in snmp_select_info. On - * return, if block is true, the value of timeout will be undefined. - * - * snmp_select_info returns the number of open sockets. (i.e. The number - * of sessions open) - */ - int snmp_select_info(int *, fd_set *, struct timeval *, - int *); - - - - /* - * void snmp_timeout(); - * - * snmp_timeout should be called whenever the timeout from snmp_select_info - * expires, but it is idempotent, so snmp_timeout can be polled (probably a - * cpu expensive proposition). snmp_timeout checks to see if any of the - * sessions have an outstanding request that has timed out. If it finds one - * (or more), and that pdu has more retries available, a new packet is formed - * from the pdu and is resent. If there are no more retries available, the - * callback for the session is used to alert the user of the timeout. - */ - - void snmp_timeout(void); - - - /* - * This routine must be supplied by the application: - * - * u_char *authenticator(pdu, length, community, community_len) - * u_char *pdu; The rest of the PDU to be authenticated - * int *length; The length of the PDU (updated by the authenticator) - * u_char *community; The community name to authenticate under. - * int community_len The length of the community name. - * - * Returns the authenticated pdu, or NULL if authentication failed. - * If null authentication is used, the authenticator in snmp_session can be - * set to NULL(0). - */ - - - - /* - * This routine must be supplied by the application: - * - * int callback(operation, session, reqid, pdu, magic) - * int operation; - * netsnmp_session *session; The session authenticated under. - * int reqid; The request id of this pdu (0 for TRAP) - * netsnmp_pdu *pdu; The pdu information. - * void *magic A link to the data for this routine. - * - * Returns 1 if request was successful, 0 if it should be kept pending. - * Any data in the pdu must be copied because it will be freed elsewhere. - * Operations are defined below: - */ - -#define NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE 1 -#define NETSNMP_CALLBACK_OP_TIMED_OUT 2 -#define NETSNMP_CALLBACK_OP_SEND_FAILED 3 -#define NETSNMP_CALLBACK_OP_CONNECT 4 -#define NETSNMP_CALLBACK_OP_DISCONNECT 5 - - long snmp_get_next_msgid(void); - long snmp_get_next_reqid(void); - long snmp_get_next_sessid(void); - long snmp_get_next_transid(void); - - int snmp_oid_compare(const oid *, size_t, const oid *, - size_t); - int snmp_oid_ncompare(const oid *, size_t, const oid *, - size_t, size_t); - int snmp_oidtree_compare(const oid *, size_t, const oid *, - size_t); - int netsnmp_oid_equals(const oid *, size_t, const oid *, - size_t); - int netsnmp_oid_tree_equals(const oid *, size_t, const oid *, - size_t); - int netsnmp_oid_is_subtree(const oid *, size_t, const oid *, - size_t); - int netsnmp_oid_find_prefix(const oid * in_name1, size_t len1, - const oid * in_name2, size_t len2); - void init_snmp(const char *); - u_char *snmp_pdu_build(netsnmp_pdu *, u_char *, size_t *); -#ifdef USE_REVERSE_ASNENCODING - u_char *snmp_pdu_rbuild(netsnmp_pdu *, u_char *, size_t *); -#endif - int snmpv3_parse(netsnmp_pdu *, u_char *, size_t *, - u_char **, netsnmp_session *); - int snmpv3_packet_build(netsnmp_session *, - netsnmp_pdu *pdu, u_char * packet, - size_t * out_length, - u_char * pdu_data, - size_t pdu_data_len); - int snmpv3_packet_rbuild(netsnmp_session *, - netsnmp_pdu *pdu, u_char * packet, - size_t * out_length, - u_char * pdu_data, - size_t pdu_data_len); - int snmpv3_make_report(netsnmp_pdu *pdu, int error); - int snmpv3_get_report_type(netsnmp_pdu *pdu); - int snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, - size_t * length); - u_char *snmpv3_scopedPDU_parse(netsnmp_pdu *pdu, u_char * cp, - size_t * length); - void snmp_store(const char *type); - void snmp_shutdown(const char *type); - netsnmp_variable_list *snmp_pdu_add_variable(netsnmp_pdu *, const oid *, - size_t, u_char, const u_char *, - size_t); - netsnmp_variable_list *snmp_varlist_add_variable(netsnmp_variable_list - ** varlist, - const oid * name, - size_t name_length, - u_char type, - const u_char * value, - size_t len); - int snmp_add_var(netsnmp_pdu *, const oid *, size_t, char, - const char *); - oid *snmp_duplicate_objid(const oid * objToCopy, size_t); - u_int snmp_increment_statistic(int which); - u_int snmp_increment_statistic_by(int which, int count); - u_int snmp_get_statistic(int which); - void snmp_init_statistics(void); - int create_user_from_session(netsnmp_session * session); - int snmp_get_fd_for_session(struct snmp_session *sessp); - - /* - * New re-allocating reverse encoding functions. - */ -#ifdef USE_REVERSE_ASNENCODING - - int snmpv3_packet_realloc_rbuild(u_char ** pkt, size_t * pkt_len, - size_t * offset, - netsnmp_session * session, - netsnmp_pdu *pdu, u_char * pdu_data, - size_t pdu_data_len); - - int snmp_pdu_realloc_rbuild(u_char ** pkt, size_t * pkt_len, - size_t * offset, netsnmp_pdu *pdu); -#endif - - - - /* - * Extended open; fpre_parse has changed. - */ - - netsnmp_session *snmp_open_ex(netsnmp_session *, - int (*fpre_parse) (netsnmp_session *, - struct - netsnmp_transport_s *, - void *, int), - int (*fparse) (netsnmp_session *, - netsnmp_pdu *, u_char *, - size_t), - int (*fpost_parse) (netsnmp_session *, - netsnmp_pdu *, int), - int (*fbuild) (netsnmp_session *, - netsnmp_pdu *, u_char *, - size_t *), - int (*frbuild) (netsnmp_session *, - netsnmp_pdu *, u_char **, - size_t *, size_t *), - int (*fcheck) (u_char *, size_t)); - - /* - * provided for backwards compatability. Don't use these functions. - * See snmp_debug.h and snmp_debug.c instead. - */ - - void snmp_set_do_debugging(int); - int snmp_get_do_debugging(void); - - - /* - * snmp_error - return error data - * Inputs : address of errno, address of snmp_errno, address of string - * Caller must free the string returned after use. - */ - void snmp_error(netsnmp_session *, int *, int *, char **); - /* - * single session API. - * - * These functions perform similar actions as snmp_XX functions, - * but operate on a single session only. - * - * Synopsis: - - void * sessp; - netsnmp_session session, *ss; - netsnmp_pdu *pdu, *response; - - snmp_sess_init(&session); - session.retries = ... - session.remote_port = ... - sessp = snmp_sess_open(&session); - ss = snmp_sess_session(sessp); - if (ss == NULL) - exit(1); - ... - if (ss->community) free(ss->community); - ss->community = strdup(gateway); - ss->community_len = strlen(gateway); - ... - snmp_sess_synch_response(sessp, pdu, &response); - ... - snmp_sess_close(sessp); - - * See also: - * snmp_sess_synch_response, in snmp_client.h. - - * Notes: - * 1. Invoke snmp_sess_session after snmp_sess_open. - * 2. snmp_sess_session return value is an opaque pointer. - * 3. Do NOT free memory returned by snmp_sess_session. - * 4. Replace snmp_send(ss,pdu) with snmp_sess_send(sessp,pdu) - */ - - void snmp_sess_init(netsnmp_session *); - void *snmp_sess_open(netsnmp_session *); - void *snmp_sess_pointer(netsnmp_session *); - netsnmp_session *snmp_sess_session(void *); - - /* - * Return the netsnmp_transport structure associated with the given opaque - * pointer. - */ - - struct netsnmp_transport_s *snmp_sess_transport(void *); - void snmp_sess_transport_set(void *, - struct netsnmp_transport_s *); - - /* - * EXPERIMENTAL API EXTENSIONS ------------------------------------------ - * - * snmp_sess_add_ex, snmp_sess_add, snmp_add - * - * Analogous to snmp_open family of functions, but taking an - * netsnmp_transport pointer as an extra argument. Unlike snmp_open et - * al. it doesn't attempt to interpret the in_session->peername as a - * transport endpoint specifier, but instead uses the supplied transport. - * JBPN - * - */ - - void *snmp_sess_add_ex(netsnmp_session *, - struct netsnmp_transport_s *, - int (*fpre_parse) (netsnmp_session *, - struct - netsnmp_transport_s - *, void *, int), - int (*fparse) (netsnmp_session *, - struct snmp_pdu *, - u_char *, size_t), - int (*fpost_parse) (netsnmp_session *, - struct snmp_pdu *, - int), - int (*fbuild) (netsnmp_session *, - struct snmp_pdu *, - u_char *, size_t *), - int (*frbuild) (netsnmp_session *, - struct snmp_pdu *, - u_char **, size_t *, - size_t *), - int (*fcheck) (u_char *, size_t), - netsnmp_pdu *(*fcreate_pdu) (struct - netsnmp_transport_s - *, - void *, - size_t)); - - void *snmp_sess_add(netsnmp_session *, - struct netsnmp_transport_s *, - int (*fpre_parse) (netsnmp_session *, - struct - netsnmp_transport_s *, - void *, int), - int (*fpost_parse) (netsnmp_session *, - netsnmp_pdu *, int)); - - netsnmp_session *snmp_add(netsnmp_session *, - struct netsnmp_transport_s *, - int (*fpre_parse) (netsnmp_session *, - struct netsnmp_transport_s - *, void *, int), - int (*fpost_parse) (netsnmp_session *, - netsnmp_pdu *, int)); - netsnmp_session *snmp_add_full(netsnmp_session * in_session, - struct netsnmp_transport_s *transport, - int (*fpre_parse) (netsnmp_session *, - struct - netsnmp_transport_s - *, void *, int), - int (*fparse) (netsnmp_session *, - netsnmp_pdu *, u_char *, - size_t), - int (*fpost_parse) (netsnmp_session *, - netsnmp_pdu *, int), - int (*fbuild) (netsnmp_session *, - netsnmp_pdu *, u_char *, - size_t *), - int (*frbuild) (netsnmp_session *, - netsnmp_pdu *, - u_char **, size_t *, - size_t *), - int (*fcheck) (u_char *, size_t), - netsnmp_pdu *(*fcreate_pdu) (struct - netsnmp_transport_s - *, void *, - size_t) - ); - - /* - * use return value from snmp_sess_open as void * parameter - */ - - int snmp_sess_send(void *, netsnmp_pdu *); - int snmp_sess_async_send(void *, netsnmp_pdu *, - netsnmp_callback, void *); - int snmp_sess_select_info(void *, int *, fd_set *, - struct timeval *, int *); - int snmp_sess_read(void *, fd_set *); - void snmp_sess_timeout(void *); - int snmp_sess_close(void *); - - void snmp_sess_error(void *, int *, int *, char **); - void netsnmp_sess_log_error(int priority, - const char *prog_string, - netsnmp_session * ss); - void snmp_sess_perror(const char *prog_string, - netsnmp_session * ss); - - /* - * end single session API - */ - - /* - * generic statistic counters - */ - - /* - * snmpv3 statistics - */ - - /* - * mpd stats - */ -#define STAT_SNMPUNKNOWNSECURITYMODELS 0 -#define STAT_SNMPINVALIDMSGS 1 -#define STAT_SNMPUNKNOWNPDUHANDLERS 2 -#define STAT_MPD_STATS_START STAT_SNMPUNKNOWNSECURITYMODELS -#define STAT_MPD_STATS_END STAT_SNMPUNKNOWNPDUHANDLERS - - /* - * usm stats - */ -#define STAT_USMSTATSUNSUPPORTEDSECLEVELS 3 -#define STAT_USMSTATSNOTINTIMEWINDOWS 4 -#define STAT_USMSTATSUNKNOWNUSERNAMES 5 -#define STAT_USMSTATSUNKNOWNENGINEIDS 6 -#define STAT_USMSTATSWRONGDIGESTS 7 -#define STAT_USMSTATSDECRYPTIONERRORS 8 -#define STAT_USM_STATS_START STAT_USMSTATSUNSUPPORTEDSECLEVELS -#define STAT_USM_STATS_END STAT_USMSTATSDECRYPTIONERRORS - - /* - * snmp counters - */ -#define STAT_SNMPINPKTS 9 -#define STAT_SNMPOUTPKTS 10 -#define STAT_SNMPINBADVERSIONS 11 -#define STAT_SNMPINBADCOMMUNITYNAMES 12 -#define STAT_SNMPINBADCOMMUNITYUSES 13 -#define STAT_SNMPINASNPARSEERRS 14 - /* - * #define STAT_SNMPINBADTYPES 15 - */ -#define STAT_SNMPINTOOBIGS 16 -#define STAT_SNMPINNOSUCHNAMES 17 -#define STAT_SNMPINBADVALUES 18 -#define STAT_SNMPINREADONLYS 19 -#define STAT_SNMPINGENERRS 20 -#define STAT_SNMPINTOTALREQVARS 21 -#define STAT_SNMPINTOTALSETVARS 22 -#define STAT_SNMPINGETREQUESTS 23 -#define STAT_SNMPINGETNEXTS 24 -#define STAT_SNMPINSETREQUESTS 25 -#define STAT_SNMPINGETRESPONSES 26 -#define STAT_SNMPINTRAPS 27 -#define STAT_SNMPOUTTOOBIGS 28 -#define STAT_SNMPOUTNOSUCHNAMES 29 -#define STAT_SNMPOUTBADVALUES 30 - /* - * #define STAT_SNMPOUTREADONLYS 31 - */ -#define STAT_SNMPOUTGENERRS 32 -#define STAT_SNMPOUTGETREQUESTS 33 -#define STAT_SNMPOUTGETNEXTS 34 -#define STAT_SNMPOUTSETREQUESTS 35 -#define STAT_SNMPOUTGETRESPONSES 36 -#define STAT_SNMPOUTTRAPS 37 - /* - * AUTHTRAPENABLE 38 - */ -#define STAT_SNMPSILENTDROPS 39 -#define STAT_SNMPPROXYDROPS 40 -#define STAT_SNMP_STATS_START STAT_SNMPINPKTS -#define STAT_SNMP_STATS_END STAT_SNMPPROXYDROPS - - /* - * target mib counters - */ -#define STAT_SNMPUNAVAILABLECONTEXTS 41 -#define STAT_SNMPUNKNOWNCONTEXTS 42 -#define STAT_TARGET_STATS_START STAT_SNMPUNAVAILABLECONTEXTS -#define STAT_TARGET_STATS_END STAT_SNMPUNKNOWNCONTEXTS - -#define MAX_STATS 43 - -#ifdef __cplusplus -} -#endif -#endif /* SNMP_API_H */ diff --git a/utils/net-snmp/library/snmp_assert.h b/utils/net-snmp/library/snmp_assert.h deleted file mode 100644 index b54e2fe9e..000000000 --- a/utils/net-snmp/library/snmp_assert.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef SNMP_ASSERT_H -#define SNMP_ASSERT_H - -#ifdef NETSNMP_USE_ASSERT -# include -#else -# include -#endif - - -/* - * MACROs don't need extern "C" - */ - -/* - * define __STRING for systems (*cough* sun *cough*) that don't have it - */ -#ifndef __STRING -# ifdef __STDC__ -# define __STRING(x) #x -# else -# define __STRING(x) "x" -# endif /* __STDC__ */ -#endif /* __STRING */ - -/* - * always use assert if requested - */ -#ifdef NETSNMP_USE_ASSERT -/* void netsnmp_assert( int );*/ -# define netsnmp_assert(x) assert( x ) -#else -/* - * if asserts weren't requested, just log, unless SNMP_NO_DEBUGGING specified - */ -# ifndef SNMP_NO_DEBUGGING -# ifdef HAVE_CPP_UNDERBAR_FUNCTION_DEFINED -# define netsnmp_assert(x) do { \ - if ( x ) \ - ; \ - else \ - snmp_log(LOG_ERR,"netsnmp_assert %s failed %s:%d %s()\n", \ - __STRING(x),__FILE__,__LINE__,__FUNCTION__); \ - }while(0) -# else -# define netsnmp_assert(x) do { \ - if( x )\ - ; \ - else \ - snmp_log(LOG_ERR,"netsnmp_assert %s failed %s:%d\n", \ - __STRING(x),__FILE__,__LINE__); \ - }while(0) -# endif -# else /* NO DEBUGGING */ -# define netsnmp_assert(x) -# endif /* NO DEBUGGING */ -#endif /* not NETSNMP_USE_ASSERT */ - - -#endif /* SNMP_ASSERT_H */ diff --git a/utils/net-snmp/library/snmp_client.h b/utils/net-snmp/library/snmp_client.h deleted file mode 100644 index 6ca0f0ae7..000000000 --- a/utils/net-snmp/library/snmp_client.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * snmp_client.h - */ -/*********************************************************** - Copyright 1988, 1989 by Carnegie Mellon University - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of CMU not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -******************************************************************/ - -#ifndef SNMP_CLIENT_H -#define SNMP_CLIENT_H - -#ifdef __cplusplus -extern "C" { -#endif - - - struct snmp_pdu; - struct snmp_session; - struct variable_list; - - struct synch_state { - int waiting; - int status; - /* - * status codes - */ -#define STAT_SUCCESS 0 -#define STAT_ERROR 1 -#define STAT_TIMEOUT 2 - int reqid; - netsnmp_pdu *pdu; - }; - - int snmp_set_var_value(netsnmp_variable_list *, - const u_char *, size_t); - int snmp_set_var_objid(netsnmp_variable_list * vp, - const oid * objid, - size_t name_length); - int snmp_set_var_typed_value(netsnmp_variable_list * - newvar, u_char type, - const u_char * val_str, - size_t val_len); - void snmp_replace_var_types(netsnmp_variable_list * vbl, - u_char old_type, - u_char new_type); - void snmp_reset_var_buffers(netsnmp_variable_list * var); - void snmp_reset_var_types(netsnmp_variable_list * vbl, - u_char new_type); - int count_varbinds(netsnmp_variable_list * var_ptr); - int count_varbinds_of_type(netsnmp_variable_list * var_ptr, - u_char type); - netsnmp_variable_list *find_varbind_of_type(netsnmp_variable_list * - var_ptr, u_char type); - - netsnmp_variable_list *snmp_add_null_var(netsnmp_pdu *, const oid *, size_t); - netsnmp_pdu *snmp_pdu_create(int); - netsnmp_pdu *snmp_fix_pdu(netsnmp_pdu *, int); - netsnmp_pdu *snmp_clone_pdu(netsnmp_pdu *); - netsnmp_pdu *snmp_split_pdu(netsnmp_pdu *, int skipCount, - int copyCount); - - unsigned long snmp_varbind_len(netsnmp_pdu *pdu); - int snmp_clone_var(netsnmp_variable_list *, - netsnmp_variable_list *); - netsnmp_variable_list *snmp_clone_varbind(netsnmp_variable_list *); - const char *snmp_errstring(int); - int snmp_synch_response(netsnmp_session *, netsnmp_pdu *, - netsnmp_pdu **); - int snmp_synch_response_cb(netsnmp_session *, - netsnmp_pdu *, netsnmp_pdu **, - snmp_callback); - int snmp_clone_mem(void **, void *, unsigned); - - /* - * single session API - see snmp_api.h for full details - */ - int snmp_sess_synch_response(void *, netsnmp_pdu *, - netsnmp_pdu **); - -#ifdef __cplusplus -} -#endif -#endif /* SNMP_CLIENT_H */ diff --git a/utils/net-snmp/library/snmp_debug.h b/utils/net-snmp/library/snmp_debug.h deleted file mode 100644 index a05a7cec4..000000000 --- a/utils/net-snmp/library/snmp_debug.h +++ /dev/null @@ -1,279 +0,0 @@ -#ifndef SNMP_DEBUG_H -#define SNMP_DEBUG_H - -#ifdef __cplusplus -extern "C" { -#endif - - /* - * snmp_debug.h: - * - * - prototypes for snmp debugging routines. - * - easy to use macros to wrap around the functions. This also provides - * the ability to remove debugging code easily from the applications at - * compile time. - */ - - - /* - * These functions should not be used, if at all possible. Instead, use - * the macros below. - */ -#if HAVE_STDARG_H - void debugmsg(const char *token, const char *format, ...); - void debugmsgtoken(const char *token, const char *format, - ...); - void debug_combo_nc(const char *token, const char *format, - ...); -#else - void debugmsg(va_alist); - void debugmsgtoken(va_alist); - void debug_combo_nc(va_alist); -#endif - void debugmsg_oid(const char *token, const oid * theoid, - size_t len); - void debugmsg_suboid(const char *token, const oid * theoid, - size_t len); - void debugmsg_var(const char *token, - netsnmp_variable_list * var); - void debugmsg_oidrange(const char *token, - const oid * theoid, size_t len, - size_t var_subid, oid range_ubound); - void debugmsg_hex(const char *token, u_char * thedata, - size_t len); - void debugmsg_hextli(const char *token, u_char * thedata, - size_t len); - void debug_indent_add(int amount); - char *debug_indent(void); - - /* - * Use these macros instead of the functions above to allow them to be - * re-defined at compile time to NOP for speed optimization. - * - * They need to be called enclosing all the arguments in a single set of ()s. - * Example: - * DEBUGMSGTL(("token", "debugging of something %s related\n", "snmp")); - * - * Usage: - * All of the functions take a "token" argument that helps determine when - * the output in question should be printed. See the snmpcmd.1 manual page - * on the -D flag to turn on/off output for a given token on the command line. - * - * DEBUGMSG((token, format, ...)): equivalent to printf(format, ...) - * (if "token" debugging output - * is requested by the user) - * - * DEBUGMSGT((token, format, ...)): equivalent to DEBUGMSG, but prints - * "token: " at the beginning of the - * line for you. - * - * DEBUGTRACE Insert this token anywhere you want - * tracing output displayed when the - * "trace" debugging token is selected. - * - * DEBUGMSGL((token, format, ...)): equivalent to DEBUGMSG, but includes - * DEBUGTRACE debugging line just before - * yours. - * - * DEBUGMSGTL((token, format, ...)): Same as DEBUGMSGL and DEBUGMSGT - * combined. - * - * Important: - * It is considered best if you use DEBUGMSGTL() everywhere possible, as it - * gives the nicest format output and provides tracing support just before - * every debugging statement output. - * - * To print multiple pieces to a single line in one call, use: - * - * DEBUGMSGTL(("token", "line part 1")); - * DEBUGMSG (("token", " and part 2\n")); - * - * to get: - * - * token: line part 1 and part 2 - * - * as debugging output. - * - * - * Each of these macros also have a version with a suffix of '_NC'. The - * NC suffix stands for 'No Check', which means that no check will be - * performed to see if debug is enabled or if the token has been turned - * on. These NC versions are intended for use within a DEBUG_IF {} block, - * where the debug/token check has already been performed. - */ - -#ifndef SNMP_NO_DEBUGGING /* make sure we're wanted */ - - /* - * define two macros : one macro with, one without, - * a test if debugging is enabled. - * - * Generally, use the macro with _DBG_IF_ - */ - -/******************* Start private macros ************************/ -#define _DBG_IF_ snmp_get_do_debugging() -#define DEBUGIF(x) if (_DBG_IF_ && debug_is_token_registered(x) == SNMPERR_SUCCESS) - -#define __DBGMSGT(x) debugmsgtoken x, debugmsg x -#define __DBGMSG_NC(x) debugmsg x -#define __DBGMSGT_NC(x) debug_combo_nc x -#define __DBGMSGL_NC(x) __DBGTRACE; debugmsg x -#define __DBGMSGTL_NC(x) __DBGTRACE; debug_combo_nc x - -#ifdef HAVE_CPP_UNDERBAR_FUNCTION_DEFINED -#define __DBGTRACE __DBGMSGT(("trace","%s(): %s, %d:\n",__FUNCTION__,\ - __FILE__,__LINE__)) -#else -#define __DBGTRACE __DBGMSGT(("trace"," %s, %d:\n", __FILE__,__LINE__)) -#endif - -#define __DBGMSGL(x) __DBGTRACE, debugmsg x -#define __DBGMSGTL(x) __DBGTRACE, debugmsgtoken x, debugmsg x -#define __DBGMSGOID(x) debugmsg_oid x -#define __DBGMSGSUBOID(x) debugmsg_suboid x -#define __DBGMSGVAR(x) debugmsg_var x -#define __DBGMSGOIDRANGE(x) debugmsg_oidrange x -#define __DBGMSGHEX(x) debugmsg_hex x -#define __DBGMSGHEXTLI(x) debugmsg_hextli x -#define __DBGINDENT() debug_indent() -#define __DBGINDENTADD(x) debug_indent_add(x) -#define __DBGINDENTMORE() debug_indent_add(2) -#define __DBGINDENTLESS() debug_indent_add(-2) -#define __DBGPRINTINDENT(token) __DBGMSGTL((token, "%s", __DBGINDENT())) - -#define __DBGDUMPHEADER(token,x) \ - __DBGPRINTINDENT("dumph_" token); \ - debugmsg("dumph_" token,x); \ - if (debug_is_token_registered("dumpx" token) == SNMPERR_SUCCESS || \ - debug_is_token_registered("dumpv" token) == SNMPERR_SUCCESS || \ - (debug_is_token_registered("dumpx_" token) != SNMPERR_SUCCESS && \ - debug_is_token_registered("dumpv_" token) != SNMPERR_SUCCESS)) { \ - debugmsg("dumph_" token,"\n"); \ - } else { \ - debugmsg("dumph_" token," "); \ - } \ - __DBGINDENTMORE() - -#define __DBGDUMPSECTION(token,x) \ - __DBGPRINTINDENT("dumph_" token); \ - debugmsg("dumph_" token,x); \ - debugmsg("dumph_" token,"\n"); \ - __DBGINDENTMORE() - -#define __DBGDUMPSETUP(token,buf,len) \ - debugmsg("dumpx" token, "dumpx_%s:%s", token, __DBGINDENT()); \ - __DBGMSGHEX(("dumpx_" token,buf,len)); \ - if (debug_is_token_registered("dumpv" token) == SNMPERR_SUCCESS || \ - debug_is_token_registered("dumpv_" token) != SNMPERR_SUCCESS) { \ - debugmsg("dumpx_" token,"\n"); \ - } else { \ - debugmsg("dumpx_" token," "); \ - } \ - debugmsg("dumpv" token, "dumpv_%s:%s", token, __DBGINDENT()); - -/******************* End private macros ************************/ -/*****************************************************************/ - -/*****************************************************************/ -/********************Start public macros ************************/ - -#define DEBUGMSG(x) do {if (_DBG_IF_) {debugmsg x;} }while(0) -#define DEBUGMSGT(x) do {if (_DBG_IF_) {__DBGMSGT(x);} }while(0) -#define DEBUGTRACE do {if (_DBG_IF_) {__DBGTRACE;} }while(0) -#define DEBUGMSGL(x) do {if (_DBG_IF_) {__DBGMSGL(x);} }while(0) -#define DEBUGMSGTL(x) do {if (_DBG_IF_) {__DBGMSGTL(x);} }while(0) -#define DEBUGMSGOID(x) do {if (_DBG_IF_) {__DBGMSGOID(x);} }while(0) -#define DEBUGMSGSUBOID(x) do {if (_DBG_IF_) {__DBGMSGSUBOID(x);} }while(0) -#define DEBUGMSGVAR(x) do {if (_DBG_IF_) {__DBGMSGVAR(x);} }while(0) -#define DEBUGMSGOIDRANGE(x) do {if (_DBG_IF_) {__DBGMSGOIDRANGE(x);} }while(0) -#define DEBUGMSGHEX(x) do {if (_DBG_IF_) {__DBGMSGHEX(x);} }while(0) -#define DEBUGMSGHEXTLI(x) do {if (_DBG_IF_) {__DBGMSGHEXTLI(x);} }while(0) -#define DEBUGINDENT() do {if (_DBG_IF_) {__DBGINDENT();} }while(0) -#define DEBUGINDENTADD(x) do {if (_DBG_IF_) {__DBGINDENTADD(x);} }while(0) -#define DEBUGINDENTMORE() do {if (_DBG_IF_) {__DBGINDENTMORE();} }while(0) -#define DEBUGINDENTLESS() do {if (_DBG_IF_) {__DBGINDENTLESS();} }while(0) -#define DEBUGPRINTINDENT(token) \ - do {if (_DBG_IF_) {__DBGPRINTINDENT(token);} }while(0) - - -#define DEBUGDUMPHEADER(token,x) \ - do {if (_DBG_IF_) {__DBGDUMPHEADER(token,x);} }while(0) - -#define DEBUGDUMPSECTION(token,x) \ - do {if (_DBG_IF_) {__DBGDUMPSECTION(token,x);} }while(0) - -#define DEBUGDUMPSETUP(token,buf,len) \ - do {if (_DBG_IF_) {__DBGDUMPSETUP(token,buf,len);} }while(0) - -#define DEBUGMSG_NC(x) do { __DBGMSG_NC(x); }while(0) -#define DEBUGMSGT_NC(x) do { __DBGMSGT_NC(x); }while(0) - -#else /* SNMP_NO_DEBUGGING := enable streamlining of the code */ - -#define DEBUGMSG(x) -#define DEBUGMSGT(x) -#define DEBUGTRACE -#define DEBUGMSGL(x) -#define DEBUGMSGTL(x) -#define DEBUGMSGOID(x) -#define DEBUGMSGSUBOID(x) -#define DEBUGMSGVAR(x) -#define DEBUGMSGOIDRANGE(x) -#define DEBUGMSGHEX(x) -#define DEBUGIF(x) if(0) -#define DEBUGDUMP(t,b,l,p) -#define DEBUGINDENT() -#define DEBUGINDENTMORE() -#define DEBUGINDENTLESS() -#define DEBUGINDENTADD(x) -#define DEBUGMSGHEXTLI(x) -#define DEBUGPRINTINDENT(token) -#define DEBUGDUMPHEADER(token,x) -#define DEBUGDUMPSECTION(token,x) -#define DEBUGDUMPSETUP(token, buf, len) - -#define DEBUGMSG_NC(x) -#define DEBUGMSGT_NC(x) - -#endif - -#define MAX_DEBUG_TOKENS 256 -#define MAX_DEBUG_TOKEN_LEN 128 -#define DEBUG_TOKEN_DELIMITER "," -#define DEBUG_ALWAYS_TOKEN "all" - - /* - * setup routines: - * - * debug_register_tokens(char *): registers a list of tokens to - * print debugging output for. - * - * debug_is_token_registered(char *): returns SNMPERR_SUCCESS or SNMPERR_GENERR - * if a token has been registered or - * not (and debugging output is "on"). - * snmp_debug_init(void): registers .conf handlers. - */ - void debug_register_tokens(char *tokens); - int debug_is_token_registered(const char *token); - void snmp_debug_init(void); - void snmp_set_do_debugging(int); - int snmp_get_do_debugging(void); - -/* - * internal: - * You probably shouldn't be using this information unless the word - * "expert" applies to you. I know it looks tempting. - */ -typedef struct netsnmp_token_descr_s { - char *token_name; - char enabled; -} netsnmp_token_descr; - -extern int debug_num_tokens; -extern netsnmp_token_descr dbg_tokens[MAX_DEBUG_TOKENS]; - -#ifdef __cplusplus -} -#endif -#endif /* SNMP_DEBUG_H */ diff --git a/utils/net-snmp/library/snmp_enum.h b/utils/net-snmp/library/snmp_enum.h deleted file mode 100644 index 34e2e62d9..000000000 --- a/utils/net-snmp/library/snmp_enum.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef SNMP_ENUM_H -#define SNMP_ENUM_H - -#ifdef __cplusplus -extern "C" { -#endif - - struct snmp_enum_list { - struct snmp_enum_list *next; - int value; - char *label; - }; - -#define SE_MAX_IDS 5 -#define SE_MAX_SUBIDS 32 /* needs to be a multiple of 8 */ - - /* - * begin storage definitions - */ - /* - * These definitions correspond with the "storid" argument to the API - */ -#define SE_LIBRARY_ID 0 -#define SE_MIB_ID 1 -#define SE_APPLICATION_ID 2 -#define SE_ASSIGNED_ID 3 - - /* - * library specific enum locations - */ - - /* - * error codes - */ -#define SE_OK 0 -#define SE_NOMEM 1 -#define SE_ALREADY_THERE 2 -#define SE_DNE -2 - - int init_snmp_enum(const char *type); - struct snmp_enum_list *se_find_list(unsigned int major, - unsigned int minor); - struct snmp_enum_list *se_find_slist(const char *listname); - int se_store_in_list(struct snmp_enum_list *, - unsigned int major, unsigned int minor); - int se_find_value(unsigned int major, unsigned int minor, - char *label); - int se_find_free_value(unsigned int major, unsigned int minor); - char *se_find_label(unsigned int major, unsigned int minor, - int value); - int se_add_pair(unsigned int major, unsigned int minor, - char *label, int value); - - /* - * finds a list of enums in a list of enum structs associated by a name. - */ - /* - * find a list, and then operate on that list - * ( direct methods further below if you already have the list pointer) - */ - char *se_find_label_in_slist(const char *listname, - int value); - int se_find_value_in_slist(const char *listname, - char *label); - int se_find_free_value_in_slist(const char *listname); - int se_add_pair_to_slist(const char *listname, char *label, - int value); - - /* - * operates directly on a possibly external list - */ - char *se_find_label_in_list(struct snmp_enum_list *list, - int value); - int se_find_value_in_list(struct snmp_enum_list *list, - char *label); - int se_find_free_value_in_list(struct snmp_enum_list *list); - int se_add_pair_to_list(struct snmp_enum_list **list, - char *label, int value); - - /* - * Persistent enumeration lists - */ - void se_store_enum_list(struct snmp_enum_list *new_list, - const char *token, char *type); - void se_store_list(unsigned int major, unsigned int minor, char *type); - void se_store_slist(const char *listname, char *type); - int se_store_slist_callback(int majorID, int minorID, - void *serverargs, void *clientargs); - void se_read_conf(const char *word, char *cptr); - void clear_snmp_enum(void); - -#ifdef __cplusplus -} -#endif -#endif /* SNMP_ENUM_H */ diff --git a/utils/net-snmp/library/snmp_impl.h b/utils/net-snmp/library/snmp_impl.h deleted file mode 100644 index bb3237154..000000000 --- a/utils/net-snmp/library/snmp_impl.h +++ /dev/null @@ -1,141 +0,0 @@ -#ifndef SNMP_IMPL_H -#define SNMP_IMPL_H - -#ifdef __cplusplus -extern "C" { -#endif - /* - * * file: snmp_impl.h - */ - - /* - * Definitions for SNMP implementation. - * - * - */ -/*********************************************************** - Copyright 1988, 1989 by Carnegie Mellon University - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of CMU not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -******************************************************************/ - -#include -#include /* for 'u_char', etc */ - -#define COMMUNITY_MAX_LEN 256 - - /* - * Space for character representation of an object identifier - */ -#define SPRINT_MAX_LEN 2560 - - -#ifndef NULL -#define NULL 0 -#endif - -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif - -#define READ 1 -#define WRITE 0 - -#define RESERVE1 0 -#define RESERVE2 1 -#define ACTION 2 -#define COMMIT 3 -#define FREE 4 -#define UNDO 5 -#define FINISHED_SUCCESS 9 -#define FINISHED_FAILURE 10 - - /* - * Access control statements for the agent - */ -#define RONLY 0x1 /* read access only */ -#define RWRITE 0x2 /* read and write access (must have 0x2 bit set) */ - -#define NOACCESS 0x0000 /* no access for anybody */ - - /* - * defined types (from the SMI, RFC 1157) - */ -#define ASN_IPADDRESS (ASN_APPLICATION | 0) -#define ASN_COUNTER (ASN_APPLICATION | 1) -#define ASN_GAUGE (ASN_APPLICATION | 2) -#define ASN_UNSIGNED (ASN_APPLICATION | 2) /* RFC 1902 - same as GAUGE */ -#define ASN_TIMETICKS (ASN_APPLICATION | 3) -#define ASN_OPAQUE (ASN_APPLICATION | 4) /* changed so no conflict with other includes */ - - /* - * defined types (from the SMI, RFC 1442) - */ -#define ASN_NSAP (ASN_APPLICATION | 5) /* historic - don't use */ -#define ASN_COUNTER64 (ASN_APPLICATION | 6) -#define ASN_UINTEGER (ASN_APPLICATION | 7) /* historic - don't use */ - -#ifdef OPAQUE_SPECIAL_TYPES - /* - * defined types from draft-perkins-opaque-01.txt - */ -#define ASN_FLOAT (ASN_APPLICATION | 8) -#define ASN_DOUBLE (ASN_APPLICATION | 9) -#define ASN_INTEGER64 (ASN_APPLICATION | 10) -#define ASN_UNSIGNED64 (ASN_APPLICATION | 11) -#endif /* OPAQUE_SPECIAL_TYPES */ - - /* - * changed to ERROR_MSG to eliminate conflict with other includes - */ -#ifndef ERROR_MSG -#define ERROR_MSG(string) snmp_set_detail(string) -#endif - - /* - * from snmp.c - */ - extern u_char sid[]; /* size SID_MAX_LEN */ - NETSNMP_IMPORT int snmp_errno; - - - /* - * For calling secauth_build, FIRST_PASS is an indication that a new nonce - * and lastTimeStamp should be recorded. LAST_PASS is an indication that - * the packet should be checksummed and encrypted if applicable, in - * preparation for transmission. - * 0 means do neither, FIRST_PASS | LAST_PASS means do both. - * For secauth_parse, FIRST_PASS means decrypt the packet, otherwise leave it - * alone. LAST_PASS is ignored. - */ -#define FIRST_PASS 1 -#define LAST_PASS 2 - u_char *snmp_comstr_parse(u_char *, size_t *, u_char *, - size_t *, long *); - u_char *snmp_comstr_build(u_char *, size_t *, u_char *, - size_t *, long *, size_t); - - int has_access(u_char, int, int, int); -#ifdef __cplusplus -} -#endif -#endif /* SNMP_IMPL_H */ diff --git a/utils/net-snmp/library/snmp_locking.h b/utils/net-snmp/library/snmp_locking.h deleted file mode 100644 index 99f3aa2f7..000000000 --- a/utils/net-snmp/library/snmp_locking.h +++ /dev/null @@ -1,56 +0,0 @@ - -/* - * snmp_locking.h - multi-thread resource locking support declarations - */ -/* - * Author: Markku Laukkanen - * Created: 6-Sep-1999 - * History: - * 8-Sep-1999 M. Slifcak method names changed; - * use array of resource locking structures. - * 3-Jan-2001 R. Story copy mt_resource.h to snmp_locking.h - */ - -#ifndef SNMP_LOCKING_H -#define SNMP_LOCKING_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef NS_REENTRANT - -#if HAVE_PTHREAD_H -#include -typedef pthread_mutex_t mutex_type; -#ifdef pthread_mutexattr_default -#define MT_MUTEX_INIT_DEFAULT pthread_mutexattr_default -#else -#define MT_MUTEX_INIT_DEFAULT 0 -#endif - -#elif defined(WIN32) || defined(cygwin) -#include -typedef CRITICAL_SECTION mutex_type; -#else - error "There is no re-entrant support as defined." -#endif /* HAVE_PTHREAD_H */ - -int netsnmp_mutex_init(mutex_type *); -int netsnmp_mutex_lock(mutex_type *); -int netsnmp_mutex_unlock(mutex_type *); -int netsnmp_mutex_destroy_mutex(mutex_type *); - -#else /* !NS_REENTRANT */ - -#define netsnmp_mutex_init(x) do {} while (0) -#define netsnmp_mutex_lock(x) do {} while (0) -#define netsnmp_mutex_unlock(x) do {} while (0) -#define netsnmp_mutex_destroy_mutex(x) do {} while (0) - -#endif /* !NS_REENTRANT */ - -#ifdef __cplusplus -} -#endif -#endif /* SNMP_LOCKING_H */ diff --git a/utils/net-snmp/library/snmp_logging.h b/utils/net-snmp/library/snmp_logging.h deleted file mode 100644 index fcf1512d5..000000000 --- a/utils/net-snmp/library/snmp_logging.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef SNMP_LOGGING_H -#define SNMP_LOGGING_H - -#ifdef __cplusplus -extern "C" { -#endif - -#if HAVE_SYSLOG_H -#include -#endif -#if HAVE_STDARG_H -#include -#else -#include -#endif - -#ifndef LOG_ERR -#define LOG_EMERG 0 /* system is unusable */ -#define LOG_ALERT 1 /* action must be taken immediately */ -#define LOG_CRIT 2 /* critical conditions */ -#define LOG_ERR 3 /* error conditions */ -#define LOG_WARNING 4 /* warning conditions */ -#define LOG_NOTICE 5 /* normal but significant condition */ -#define LOG_INFO 6 /* informational */ -#define LOG_DEBUG 7 /* debug-level messages */ -#endif - - struct snmp_log_message { - int priority; - const char *msg; - }; - -#ifndef DEFAULT_LOG_ID -#define DEFAULT_LOG_ID "net-snmp" -#endif - - void init_snmp_logging(void); - int snmp_get_do_logging(void); - void snmp_disable_syslog(void); - void snmp_disable_filelog(void); - void snmp_disable_stderrlog(void); - void snmp_disable_calllog(void); - void snmp_disable_log(void); - void snmp_enable_syslog(void); - void snmp_enable_syslog_ident(const char *ident, - const int facility); - void snmp_enable_filelog(const char *logfilename, - int dont_zero_log); - void snmp_enable_stderrlog(void); - void snmp_enable_calllog(void); - -#if HAVE_STDARG_H - int snmp_log(int priority, const char *format, ...); -#else - int snmp_log(va_alist); -#endif - int snmp_vlog(int priority, const char *format, - va_list ap); - /* - * 0 - successful message formatting - */ - /* - * -1 - Could not format log-string - */ - /* - * -2 - Could not allocate memory for log-message - */ - /* - * -3 - Log-message too long! - */ - - void snmp_log_perror(const char *s); - - -#define NETSNMP_LOGHANDLER_STDOUT 1 -#define NETSNMP_LOGHANDLER_STDERR 2 -#define NETSNMP_LOGHANDLER_FILE 3 -#define NETSNMP_LOGHANDLER_SYSLOG 4 -#define NETSNMP_LOGHANDLER_CALLBACK 5 -#define NETSNMP_LOGHANDLER_NONE 6 - - int snmp_log_options(char *optarg, int argc, char *const *argv); - void snmp_log_options_usage(const char *lead, FILE *outf); - char *snmp_log_syslogname(char *syslogname); - typedef struct netsnmp_log_handler_s netsnmp_log_handler; - typedef int (NetsnmpLogHandler)(netsnmp_log_handler*, int, const char *); - - NetsnmpLogHandler log_handler_stdouterr; - NetsnmpLogHandler log_handler_file; - NetsnmpLogHandler log_handler_syslog; - NetsnmpLogHandler log_handler_callback; - NetsnmpLogHandler log_handler_null; - - struct netsnmp_log_handler_s { - int enabled; - int priority; - int pri_max; - int type; - const char *token; /* Also used for filename */ - - NetsnmpLogHandler *handler; - - int imagic; /* E.g. file descriptor, syslog facility */ - void *magic; /* E.g. Callback function */ - - netsnmp_log_handler *next, *prev; - }; - -netsnmp_log_handler *get_logh_head( void ); -netsnmp_log_handler *netsnmp_register_loghandler( int type, int pri ); -netsnmp_log_handler *netsnmp_find_loghandler( const char *token ); -int netsnmp_add_loghandler( netsnmp_log_handler *logh ); -int netsnmp_remove_loghandler( netsnmp_log_handler *logh ); -int netsnmp_enable_loghandler( const char *token ); -int netsnmp_disable_loghandler( const char *token ); -#ifdef __cplusplus -} -#endif -#endif /* SNMP_LOGGING_H */ diff --git a/utils/net-snmp/library/snmp_parse_args.h b/utils/net-snmp/library/snmp_parse_args.h deleted file mode 100644 index c0fe71ecd..000000000 --- a/utils/net-snmp/library/snmp_parse_args.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef SNMP_PARSE_ARGS_H -#define SNMP_PARSE_ARGS_H -#ifdef __cplusplus -extern "C" { -#endif - -int -snmp_parse_args(int argc, char **argv, netsnmp_session *session, - const char *localOpts, void (*proc)(int, char *const *, int)); - -void -snmp_parse_args_descriptions(FILE *); - -void -snmp_parse_args_usage(FILE *); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/library/snmp_secmod.h b/utils/net-snmp/library/snmp_secmod.h deleted file mode 100644 index 8cd673117..000000000 --- a/utils/net-snmp/library/snmp_secmod.h +++ /dev/null @@ -1,158 +0,0 @@ -#ifndef SNMPSECMOD_H -#define SNMPSECMOD_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -struct snmp_secmod_def; - -/* - * parameter information passed to security model routines - */ -struct snmp_secmod_outgoing_params { - int msgProcModel; - u_char *globalData; - size_t globalDataLen; - int maxMsgSize; - int secModel; - u_char *secEngineID; - size_t secEngineIDLen; - char *secName; - size_t secNameLen; - int secLevel; - u_char *scopedPdu; - size_t scopedPduLen; - void *secStateRef; - u_char *secParams; - size_t *secParamsLen; - u_char **wholeMsg; - size_t *wholeMsgLen; - size_t *wholeMsgOffset; - netsnmp_pdu *pdu; /* IN - the pdu getting encoded */ - netsnmp_session *session; /* IN - session sending the message */ -}; - -struct snmp_secmod_incoming_params { - int msgProcModel; /* IN */ - size_t maxMsgSize; /* IN - Used to calc maxSizeResponse. */ - - u_char *secParams; /* IN - BER encoded securityParameters. */ - int secModel; /* IN */ - int secLevel; /* IN - AuthNoPriv; authPriv etc. */ - - u_char *wholeMsg; /* IN - Original v3 message. */ - size_t wholeMsgLen; /* IN - Msg length. */ - - u_char *secEngineID; /* OUT - Pointer snmpEngineID. */ - size_t *secEngineIDLen; /* IN/OUT - Len available; len returned. */ - /* - * NOTE: Memory provided by caller. - */ - - char *secName; /* OUT - Pointer to securityName. */ - size_t *secNameLen; /* IN/OUT - Len available; len returned. */ - - u_char **scopedPdu; /* OUT - Pointer to plaintext scopedPdu. */ - size_t *scopedPduLen; /* IN/OUT - Len available; len returned. */ - - size_t *maxSizeResponse; /* OUT - Max size of Response PDU. */ - void **secStateRef; /* OUT - Ref to security state. */ - netsnmp_session *sess; /* IN - session which got the message */ - netsnmp_pdu *pdu; /* IN - the pdu getting parsed */ - u_char msg_flags; /* IN - v3 Message flags. */ -}; - - -/* - * function pointers: - */ - -/* - * free's a given security module's data; called at unregistration time - */ -typedef int (SecmodSessionCallback) (netsnmp_session *); -typedef int (SecmodPduCallback) (netsnmp_pdu *); -typedef int (Secmod2PduCallback) (netsnmp_pdu *, netsnmp_pdu *); -typedef int (SecmodOutMsg) (struct snmp_secmod_outgoing_params *); -typedef int (SecmodInMsg) (struct snmp_secmod_incoming_params *); -typedef void (SecmodFreeState) (void *); -typedef void (SecmodHandleReport) (void *sessp, - netsnmp_transport *transport, - netsnmp_session *, - int result, - netsnmp_pdu *origpdu); - -/* - * definition of a security module - */ - -/* - * all of these callback functions except the encoding and decoding - * routines are optional. The rest of them are available if need. - */ -struct snmp_secmod_def { - /* - * session maniplation functions - */ - SecmodSessionCallback *session_open; /* called in snmp_sess_open() */ - SecmodSessionCallback *session_close; /* called in snmp_sess_close() */ - - /* - * pdu manipulation routines - */ - SecmodPduCallback *pdu_free; /* called in free_pdu() */ - Secmod2PduCallback *pdu_clone; /* called in snmp_clone_pdu() */ - SecmodPduCallback *pdu_timeout; /* called when request timesout */ - SecmodFreeState *pdu_free_state_ref; /* frees pdu->securityStateRef */ - - /* - * de/encoding routines: mandatory - */ - SecmodOutMsg *encode_reverse; /* encode packet back to front */ - SecmodOutMsg *encode_forward; /* encode packet forward */ - SecmodInMsg *decode; /* decode & validate incoming */ - - /* - * error and report handling - */ - SecmodHandleReport *handle_report; -}; - - -/* - * internal list - */ -struct snmp_secmod_list { - int securityModel; - struct snmp_secmod_def *secDef; - struct snmp_secmod_list *next; -}; - - -/* - * register a security service - */ -int register_sec_mod(int, const char *, - struct snmp_secmod_def *); -/* - * find a security service definition - */ -struct snmp_secmod_def *find_sec_mod(int); -/* - * register a security service - */ -int unregister_sec_mod(int); /* register a security service */ -void init_secmod(void); - -/* - * clears the sec_mod list - */ -void clear_sec_mod(void); - -#ifdef __cplusplus -} -#endif -#endif /* SNMPSECMOD_H */ diff --git a/utils/net-snmp/library/snmp_transport.h b/utils/net-snmp/library/snmp_transport.h deleted file mode 100644 index 02cff4409..000000000 --- a/utils/net-snmp/library/snmp_transport.h +++ /dev/null @@ -1,161 +0,0 @@ -#ifndef _SNMP_TRANSPORT_H -#define _SNMP_TRANSPORT_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Some transport-type constants. */ - -#ifndef NETSNMP_STREAM_QUEUE_LEN -#define NETSNMP_STREAM_QUEUE_LEN 5 -#endif - -/* Some transport-type flags. */ - -#define NETSNMP_TRANSPORT_FLAG_STREAM 0x01 -#define NETSNMP_TRANSPORT_FLAG_LISTEN 0x02 - -/* The standard SNMP domains. */ - -extern oid netsnmpUDPDomain[]; /* = { 1, 3, 6, 1, 6, 1, 1 }; */ -extern oid netsnmpCLNSDomain[]; /* = { 1, 3, 6, 1, 6, 1, 2 }; */ -extern oid netsnmpCONSDomain[]; /* = { 1, 3, 6, 1, 6, 1, 3 }; */ -extern oid netsnmpDDPDomain[]; /* = { 1, 3, 6, 1, 6, 1, 4 }; */ -extern oid netsnmpIPXDomain[]; /* = { 1, 3, 6, 1, 6, 1, 5 }; */ -extern size_t netsnmpUDPDomain_len; -extern size_t netsnmpCLNSDomain_len; -extern size_t netsnmpCONSDomain_len; -extern size_t netsnmpDDPDomain_len; -extern size_t netsnmpIPXDomain_len; - -/* Structure which defines the transport-independent API. */ - -typedef struct netsnmp_transport_s { - /* The transport domain object identifier. */ - - const oid *domain; - int domain_length; /* In sub-IDs, not octets. */ - - /* Local transport address (in relevant SNMP-style encoding). */ - - unsigned char *local; - int local_length; /* In octets. */ - - /* Remote transport address (in relevant SNMP-style encoding). */ - - unsigned char *remote; - int remote_length; /* In octets. */ - - /* The actual socket. */ - - int sock; - - /* Flags (see #definitions above). */ - - unsigned int flags; - - /* Protocol-specific opaque data pointer. */ - - void *data; - int data_length; - - /* Maximum size of PDU that can be sent/received by this transport. */ - - size_t msgMaxSize; - - /* Callbacks. Arguments are: - * - * "this" pointer, fd, buf, size, *opaque, *opaque_length - */ - - int (*f_recv) (struct netsnmp_transport_s *, void *, - int, void **, int *); - int (*f_send) (struct netsnmp_transport_s *, void *, - int, void **, int *); - int (*f_close) (struct netsnmp_transport_s *); - - /* This callback is only necessary for stream-oriented transports. */ - - int (*f_accept) (struct netsnmp_transport_s *); - - /* Optional callback to format a transport address. */ - - char *(*f_fmtaddr)(struct netsnmp_transport_s *, void *, - int); -} netsnmp_transport; - -typedef struct netsnmp_transport_list_s { - netsnmp_transport *transport; - struct netsnmp_transport_list_s *next; -} netsnmp_transport_list; - -typedef struct netsnmp_tdomain_s { - const oid *name; - size_t name_length; - const char **prefix; - netsnmp_transport *(*f_create_from_tstring) (const char *, int); - netsnmp_transport *(*f_create_from_ostring) (const u_char *, size_t, int); - - struct netsnmp_tdomain_s *next; -} netsnmp_tdomain; - - -/* Some utility functions. */ - -int netsnmp_transport_add_to_list(netsnmp_transport_list **transport_list, - netsnmp_transport *transport); -int netsnmp_transport_remove_from_list(netsnmp_transport_list **transport_list, - netsnmp_transport *transport); - - -/* - * Return an exact (deep) copy of t, or NULL if there is a memory allocation - * problem (for instance). - */ - -netsnmp_transport *netsnmp_transport_copy(netsnmp_transport *t); - - -/* Free an netsnmp_transport. */ - -void netsnmp_transport_free(netsnmp_transport *t); - - -/* - * If the passed oid (in_oid, in_len) corresponds to a supported transport - * domain, return 1; if not return 0. If out_oid is not NULL and out_len is - * not NULL, then the "internal" oid which should be used to identify this - * domain (e.g. in pdu->tDomain etc.) is written to *out_oid and its length to - * *out_len. - */ - -int netsnmp_tdomain_support(const oid *in_oid, size_t in_len, - const oid **out_oid, size_t *out_len); - -int netsnmp_tdomain_register(netsnmp_tdomain *domain); - -int netsnmp_tdomain_unregister(netsnmp_tdomain *domain); - -void netsnmp_clear_tdomain_list(void); - -void netsnmp_tdomain_init(void); - -netsnmp_transport *netsnmp_tdomain_transport(const char *string, - int local, - const char - *default_domain); - -netsnmp_transport *netsnmp_tdomain_transport_oid(const oid * dom, - size_t dom_len, - const u_char * o, - size_t o_len, - int local); - -#ifdef __cplusplus -} -#endif -#endif/*_SNMP_TRANSPORT_H*/ diff --git a/utils/net-snmp/library/snmpusm.h b/utils/net-snmp/library/snmpusm.h deleted file mode 100644 index 1c03d0444..000000000 --- a/utils/net-snmp/library/snmpusm.h +++ /dev/null @@ -1,245 +0,0 @@ -/* - * snmpusm.h - * - * Header file for USM support. - */ - -#ifndef SNMPUSM_H -#define SNMPUSM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define WILDCARDSTRING "*" - - /* - * General. - */ -#define USM_MAX_ID_LENGTH 1024 /* In bytes. */ -#define USM_MAX_SALT_LENGTH 128 /* In BITS. */ -#define USM_DES_SALT_LENGTH 64 /* In BITS. */ -#define USM_AES_SALT_LENGTH 128 /* In BITS. */ -#define USM_MAX_KEYEDHASH_LENGTH 128 /* In BITS. */ - -#define USM_TIME_WINDOW 150 -#define USM_MD5_AND_SHA_AUTH_LEN 12 /* bytes */ -#define USM_MAX_AUTHSIZE USM_MD5_AND_SHA_AUTH_LEN - -#define USM_SEC_MODEL_NUMBER 3 - - /* - * Structures. - */ - struct usmStateReference { - char *usr_name; - size_t usr_name_length; - u_char *usr_engine_id; - size_t usr_engine_id_length; - oid *usr_auth_protocol; - size_t usr_auth_protocol_length; - u_char *usr_auth_key; - size_t usr_auth_key_length; - oid *usr_priv_protocol; - size_t usr_priv_protocol_length; - u_char *usr_priv_key; - size_t usr_priv_key_length; - u_int usr_sec_level; - }; - - - /* - * struct usmUser: a structure to represent a given user in a list - */ - /* - * Note: Any changes made to this structure need to be reflected in - * the following functions: - */ - - struct usmUser; - struct usmUser { - u_char *engineID; - size_t engineIDLen; - char *name; - char *secName; - oid *cloneFrom; - size_t cloneFromLen; - oid *authProtocol; - size_t authProtocolLen; - u_char *authKey; - size_t authKeyLen; - oid *privProtocol; - size_t privProtocolLen; - u_char *privKey; - size_t privKeyLen; - u_char *userPublicString; - int userStatus; - int userStorageType; - /* these are actually DH * pointers but only if openssl is avail. */ - void *usmDHUserAuthKeyChange; - void *usmDHUserPrivKeyChange; - struct usmUser *next; - struct usmUser *prev; - }; - - - - /* - * Prototypes. - */ - struct usmStateReference *usm_malloc_usmStateReference(void); - - void usm_free_usmStateReference(void *old); - - int usm_set_usmStateReference_name(struct usmStateReference - *ref, char *name, - size_t name_len); - - int usm_set_usmStateReference_engine_id(struct - usmStateReference - *ref, - u_char * engine_id, - size_t - engine_id_len); - - int usm_set_usmStateReference_auth_protocol(struct - usmStateReference - *ref, - oid * - auth_protocol, - size_t - auth_protocol_len); - - int usm_set_usmStateReference_auth_key(struct - usmStateReference - *ref, - u_char * auth_key, - size_t - auth_key_len); - - int usm_set_usmStateReference_priv_protocol(struct - usmStateReference - *ref, - oid * - priv_protocol, - size_t - priv_protocol_len); - - int usm_set_usmStateReference_priv_key(struct - usmStateReference - *ref, - u_char * priv_key, - size_t - priv_key_len); - - int usm_set_usmStateReference_sec_level(struct - usmStateReference - *ref, - int sec_level); - -#ifdef SNMP_TESTING_CODE - void emergency_print(u_char * field, u_int length); -#endif - - int asn_predict_int_length(int type, long number, - size_t len); - - int asn_predict_length(int type, u_char * ptr, - size_t u_char_len); - - int usm_set_salt(u_char * iv, - size_t * iv_length, - u_char * priv_salt, - size_t priv_salt_length, - u_char * msgSalt); - - int usm_parse_security_parameters(u_char * secParams, - size_t remaining, - u_char * secEngineID, - size_t * secEngineIDLen, - u_int * boots_uint, - u_int * time_uint, - char *secName, - size_t * secNameLen, - u_char * signature, - size_t * - signature_length, - u_char * salt, - size_t * salt_length, - u_char ** data_ptr); - - int usm_check_and_update_timeliness(u_char * secEngineID, - size_t secEngineIDLen, - u_int boots_uint, - u_int time_uint, - int *error); - - SecmodOutMsg usm_secmod_generate_out_msg; - SecmodOutMsg usm_secmod_generate_out_msg; - SecmodInMsg usm_secmod_process_in_msg; - int usm_generate_out_msg(int, u_char *, size_t, int, int, - u_char *, size_t, char *, size_t, - int, u_char *, size_t, void *, - u_char *, size_t *, u_char **, - size_t *); - int usm_rgenerate_out_msg(int, u_char *, size_t, int, int, - u_char *, size_t, char *, size_t, - int, u_char *, size_t, void *, - u_char **, size_t *, size_t *); - - int usm_process_in_msg(int, size_t, u_char *, int, int, - u_char *, size_t, u_char *, - size_t *, char *, size_t *, - u_char **, size_t *, size_t *, - void **, netsnmp_session *, u_char); - - int usm_check_secLevel(int level, struct usmUser *user); - struct usmUser *usm_get_userList(void); - struct usmUser *usm_get_user(u_char * engineID, size_t engineIDLen, - char *name); - struct usmUser *usm_get_user_from_list(u_char * engineID, - size_t engineIDLen, char *name, - struct usmUser *userList, - int use_default); - struct usmUser *usm_add_user(struct usmUser *user); - struct usmUser *usm_add_user_to_list(struct usmUser *user, - struct usmUser *userList); - struct usmUser *usm_free_user(struct usmUser *user); - struct usmUser *usm_create_user(void); - struct usmUser *usm_create_initial_user(const char *name, - const oid * authProtocol, - size_t authProtocolLen, - const oid * privProtocol, - size_t privProtocolLen); - struct usmUser *usm_cloneFrom_user(struct usmUser *from, - struct usmUser *to); - struct usmUser *usm_remove_user(struct usmUser *user); - struct usmUser *usm_remove_user_from_list(struct usmUser *user, - struct usmUser **userList); - char *get_objid(char *line, oid ** optr, size_t * len); - void usm_save_users(const char *token, const char *type); - void usm_save_users_from_list(struct usmUser *user, - const char *token, - const char *type); - void usm_save_user(struct usmUser *user, const char *token, - const char *type); - SNMPCallback usm_store_users; - struct usmUser *usm_read_user(char *line); - void usm_parse_config_usmUser(const char *token, - char *line); - - void usm_set_password(const char *token, char *line); - void usm_set_user_password(struct usmUser *user, - const char *token, char *line); - void init_usm(void); - void init_usm_conf(const char *app); - int init_usm_post_config(int majorid, int minorid, - void *serverarg, void *clientarg); - int deinit_usm_post_config(int majorid, int minorid, void *serverarg, - void *clientarg); - void clear_user_list(void); - -#ifdef __cplusplus -} -#endif -#endif /* SNMPUSM_H */ diff --git a/utils/net-snmp/library/snmpv3-security-includes.h b/utils/net-snmp/library/snmpv3-security-includes.h deleted file mode 100644 index 5dd2a4507..000000000 --- a/utils/net-snmp/library/snmpv3-security-includes.h +++ /dev/null @@ -1,2 +0,0 @@ -/* This file is automatically generated by configure. Do not modify by hand. */ -#include diff --git a/utils/net-snmp/library/snmpv3.h b/utils/net-snmp/library/snmpv3.h deleted file mode 100644 index 1a26ca170..000000000 --- a/utils/net-snmp/library/snmpv3.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * snmpv3.h - */ - -#ifndef SNMPV3_H -#define SNMPV3_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define MAX_ENGINEID_LENGTH 128 - -#define ENGINEID_TYPE_IPV4 1 -#define ENGINEID_TYPE_IPV6 2 -#define ENGINEID_TYPE_MACADDR 3 -#define ENGINEID_TYPE_TEXT 4 -#define ENGINEID_TYPE_NETSNMP_RND 128 - -#define DEFAULT_NIC "eth0" - - int setup_engineID(u_char ** eidp, const char *text); - void engineID_conf(const char *word, char *cptr); - void engineBoots_conf(const char *, char *); - void engineIDType_conf(const char *, char *); - void engineIDNic_conf(const char *, char *); - void snmpv3_authtype_conf(const char *word, char *cptr); - void snmpv3_privtype_conf(const char *word, char *cptr); - void usm_parse_create_usmUser(const char *token, - char *line); - void init_snmpv3(const char *); - int init_snmpv3_post_config(int majorid, int minorid, - void *serverarg, - void *clientarg); - int init_snmpv3_post_premib_config(int majorid, - int minorid, - void *serverarg, - void *clientarg); - void shutdown_snmpv3(const char *type); - int snmpv3_store(int majorID, int minorID, void *serverarg, - void *clientarg); - u_long snmpv3_local_snmpEngineBoots(void); - int snmpv3_clone_engineID(u_char **, size_t *, u_char *, - size_t); - size_t snmpv3_get_engineID(u_char * buf, size_t buflen); - u_char *snmpv3_generate_engineID(size_t *); - u_long snmpv3_local_snmpEngineTime(void); - int get_default_secLevel(void); - const oid *get_default_authtype(size_t *); - const oid *get_default_privtype(size_t *); - void snmpv3_set_engineBootsAndTime(int boots, int ttime); - int free_engineID(int majorid, int minorid, void *serverarg, - void *clientarg); - -#ifdef __cplusplus -} -#endif -#endif /* SNMPV3_H */ diff --git a/utils/net-snmp/library/system.h b/utils/net-snmp/library/system.h deleted file mode 100644 index 787bd056d..000000000 --- a/utils/net-snmp/library/system.h +++ /dev/null @@ -1,153 +0,0 @@ -#ifndef SNMP_SYSTEM_H -#define SNMP_SYSTEM_H - -#ifndef NET_SNMP_CONFIG_H -#error "Please include before this file" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Portions of this file are subject to the following copyrights. See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/*********************************************************** - Copyright 1993 by Carnegie Mellon University - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of CMU not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -******************************************************************/ -/* - * portions Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ - - - /* - * function to create a daemon. Will fork and call setsid(). - * - * Returns: -1 : fork failed - * 0 : No errors - */ - int netsnmp_daemonize(int quit_immediately, int stderr_log); - - /* - * Definitions for the system dependent library file - */ -#ifndef MSVC_PERL -#ifdef WIN32 - -#ifndef HAVE_DIRENT_H /* MingGW has dirent.h but also defines WIN32 */ - /* - * structure of a directory entry - */ - typedef struct direct { - long d_ino; /* inode number (not used by MS-DOS) */ - int d_namlen; /* Name length */ - char d_name[257]; /* file name */ - } _DIRECT; - - /* - * structure for dir operations - */ - typedef struct _dir_struc { - char *start; /* Starting position */ - char *curr; /* Current position */ - long size; /* Size of string table */ - long nfiles; /* number if filenames in table */ - struct direct dirstr; /* Directory structure to return */ - } DIR; - - DIR *opendir(const char *filename); - struct direct *readdir(DIR * dirp); - int closedir(DIR * dirp); -#endif /* HAVE_DIRENT_H */ - -#ifndef HAVE_GETTIMEOFDAY - int gettimeofday(struct timeval *, struct timezone *tz); -#endif -#ifndef HAVE_STRCASECMP - int strcasecmp(const char *s1, const char *s2); -#endif -#ifndef HAVE_STRNCASECMP - int strncasecmp(const char *s1, const char *s2, size_t n); -#endif - - char *winsock_startup(void); - void winsock_cleanup(void); - -#define SOCK_STARTUP winsock_startup() -#define SOCK_CLEANUP winsock_cleanup() - -#else /* !WIN32 */ - -#define SOCK_STARTUP -#define SOCK_CLEANUP - -#endif /* WIN32 */ -#endif /* MSVC_PERL */ - -#include /* For definition of in_addr_t */ - - in_addr_t get_myaddr(void); - long get_uptime(void); - -#ifndef HAVE_STRDUP - char *strdup(const char *); -#endif -#ifndef HAVE_SETENV - int setenv(const char *, const char *, int); -#endif - - int calculate_time_diff(struct timeval *, - struct timeval *); - u_int calculate_sectime_diff(struct timeval *now, - struct timeval *then); - -#ifndef HAVE_STRCASESTR - char *strcasestr(const char *, const char *); -#endif -#ifndef HAVE_STRTOL - long strtol(const char *, char **, int); -#endif -#ifndef HAVE_STRTOUL - unsigned long strtoul(const char *, char **, int); -#endif -#ifndef HAVE_STRTOK_R - char *strtok_r(char *, const char *, char **); -#endif -#ifndef HAVE_SNPRINTF - int snprintf(char *, size_t, const char *, ...); -#endif - - int mkdirhier(const char *pathname, mode_t mode, - int skiplast); -#ifndef HAVE_STRLCPY - size_t strlcpy(char *, const char *, size_t); -#endif - - int netsnmp_os_prematch(const char *ospmname, - const char *ospmrelprefix); - -#ifdef __cplusplus -} -#endif -#endif /* SNMP_SYSTEM_H */ diff --git a/utils/net-snmp/library/tools.h b/utils/net-snmp/library/tools.h deleted file mode 100644 index e501594e7..000000000 --- a/utils/net-snmp/library/tools.h +++ /dev/null @@ -1,206 +0,0 @@ -/** - * @file tools.h - * @defgroup util Memory Utility Routines - * @ingroup library - * @{ - */ - -#ifndef _TOOLS_H -#define _TOOLS_H - -#ifdef __cplusplus -extern "C" { -#endif - - - - /* - * General acros and constants. - */ -#ifdef WIN32 -# define SNMP_MAXPATH MAX_PATH -#else -# ifdef PATH_MAX -# define SNMP_MAXPATH PATH_MAX -# else -# ifdef MAXPATHLEN -# define SNMP_MAXPATH MAXPATHLEN -# else -# define SNMP_MAXPATH 1024 /* Should be safe enough */ -# endif -# endif -#endif - -#define SNMP_MAXBUF (1024 * 4) -#define SNMP_MAXBUF_MEDIUM 1024 -#define SNMP_MAXBUF_SMALL 512 - -#define SNMP_MAXBUF_MESSAGE 1500 - -#define SNMP_MAXOID 64 -#define SNMP_MAX_CMDLINE_OIDS 128 - -#define SNMP_FILEMODE_CLOSED 0600 -#define SNMP_FILEMODE_OPEN 0644 - -#define BYTESIZE(bitsize) ((bitsize + 7) >> 3) -#define ROUNDUP8(x) ( ( (x+7) >> 3 ) * 8 ) - - - -/** @def SNMP_FREE(s) - Frees a pointer only if it is !NULL and sets its value to NULL */ -#define SNMP_FREE(s) do { if (s) { free((void *)s); s=NULL; } } while(0) - -/** @def SNMP_SWIPE_MEM(n, s) - Frees pointer n only if it is !NULL, sets n to s and sets s to NULL */ -#define SNMP_SWIPE_MEM(n,s) do { if (n) free((void *)n); n = s; s=NULL; } while(0) - - /* - * XXX Not optimal everywhere. - */ -/** @def SNMP_MALLOC_STRUCT(s) - Mallocs memory of sizeof(struct s), zeros it and returns a pointer to it. */ -#define SNMP_MALLOC_STRUCT(s) (struct s *) calloc(1, sizeof(struct s)) - -/** @def SNMP_MALLOC_TYPEDEF(t) - Mallocs memory of sizeof(t), zeros it and returns a pointer to it. */ -#define SNMP_MALLOC_TYPEDEF(td) (td *) calloc(1, sizeof(td)) - -/** @def SNMP_ZERO(s,l) - Zeros l bytes of memory starting at s. */ -#define SNMP_ZERO(s,l) do { if (s) memset(s, 0, l); } while(0) - - -#define TOUPPER(c) (c >= 'a' && c <= 'z' ? c - ('a' - 'A') : c) -#define TOLOWER(c) (c >= 'A' && c <= 'Z' ? c + ('a' - 'A') : c) - -#define HEX2VAL(s) \ - ((isalpha(s) ? (TOLOWER(s)-'a'+10) : (TOLOWER(s)-'0')) & 0xf) -#define VAL2HEX(s) ( (s) + (((s) >= 10) ? ('a'-10) : '0') ) - - -/** @def SNMP_MAX(a, b) - Computers the maximum of a and b. */ -#define SNMP_MAX(a,b) ((a) > (b) ? (a) : (b)) - -/** @def SNMP_MIN(a, b) - Computers the minimum of a and b. */ -#define SNMP_MIN(a,b) ((a) > (b) ? (b) : (a)) - -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - - /* - * QUIT the FUNction: - * e Error code variable - * l Label to goto to cleanup and get out of the function. - * - * XXX It would be nice if the label could be constructed by the - * preprocessor in context. Limited to a single error return value. - * Temporary hack at best. - */ -#define QUITFUN(e, l) \ - if ( (e) != SNMPERR_SUCCESS) { \ - rval = SNMPERR_GENERR; \ - goto l ; \ - } - - /* - * DIFFTIMEVAL - * Set to the difference between (current) and (past). - * - * ASSUMES that all inputs are (struct timeval)'s. - * Cf. system.c:calculate_time_diff(). - */ -#define DIFFTIMEVAL(now, then, diff) \ -{ \ - now.tv_sec--; \ - now.tv_usec += 1000000L; \ - diff.tv_sec = now.tv_sec - then.tv_sec; \ - diff.tv_usec = now.tv_usec - then.tv_usec; \ - if (diff.tv_usec > 1000000L){ \ - diff.tv_usec -= 1000000L; \ - diff.tv_sec++; \ - } \ -} - - - /* - * ISTRANSFORM - * ASSUMES the minimum length for ttype and toid. - */ -#define USM_LENGTH_OID_TRANSFORM 10 - -#define ISTRANSFORM(ttype, toid) \ - !snmp_oid_compare(ttype, USM_LENGTH_OID_TRANSFORM, \ - usm ## toid ## Protocol, USM_LENGTH_OID_TRANSFORM) - -#define ENGINETIME_MAX 2147483647 /* ((2^31)-1) */ -#define ENGINEBOOT_MAX 2147483647 /* ((2^31)-1) */ - - - - - /* - * Prototypes. - */ - - int snmp_realloc(u_char ** buf, size_t * buf_len); - - void free_zero(void *buf, size_t size); - - u_char *malloc_random(size_t * size); - u_char *malloc_zero(size_t size); - int memdup(u_char ** to, const u_char * from, size_t size); - - u_int binary_to_hex(const u_char * input, size_t len, - char **output); - /* preferred */ - int netsnmp_hex_to_binary(u_char ** buf, size_t * buf_len, - size_t * out_len, int allow_realloc, - const char *hex, const char *delim); - /* calls netsnmp_hex_to_binary w/delim of " " */ - int snmp_hex_to_binary(u_char ** buf, size_t * buf_len, - size_t * out_len, int allow_realloc, - const char *hex); - /* handles odd lengths */ - int hex_to_binary2(const u_char * input, size_t len, - char **output); - - int snmp_decimal_to_binary(u_char ** buf, size_t * buf_len, - size_t * out_len, - int allow_realloc, - const char *decimal); - int snmp_strcat(u_char ** buf, size_t * buf_len, - size_t * out_len, int allow_realloc, - const u_char * s); - char *netsnmp_strdup_and_null(const u_char * from, - size_t from_len); - - void dump_chunk(const char *debugtoken, const char *title, - const u_char * buf, int size); - char *dump_snmpEngineID(const u_char * buf, size_t * buflen); - - typedef void *marker_t; - marker_t atime_newMarker(void); - void atime_setMarker(marker_t pm); - long atime_diff(marker_t first, marker_t second); - u_long uatime_diff(marker_t first, marker_t second); /* 1/1000th sec */ - u_long uatime_hdiff(marker_t first, marker_t second); /* 1/100th sec */ - int atime_ready(marker_t pm, int deltaT); - int uatime_ready(marker_t pm, unsigned int deltaT); - - int marker_tticks(marker_t pm); - int timeval_tticks(struct timeval *tv); - char *netsnmp_getenv(const char *name); - -#ifdef __cplusplus -} -#endif -#endif /* _TOOLS_H */ -/* @} */ diff --git a/utils/net-snmp/library/transform_oids.h b/utils/net-snmp/library/transform_oids.h deleted file mode 100644 index 7af99da7a..000000000 --- a/utils/net-snmp/library/transform_oids.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef _net_snmp_transform_oids_h -#define _net_snmp_transform_oids_h - -#ifdef __cplusplus -extern "C" { -#endif -/* - * transform_oids.h - * - * Numeric MIB names for auth and priv transforms. - */ - -extern oid usmNoAuthProtocol[10]; /* == { 1,3,6,1,6,3,10,1,1,1 }; */ -#ifndef DISABLE_MD5 -extern oid usmHMACMD5AuthProtocol[10]; /* == { 1,3,6,1,6,3,10,1,1,2 }; */ -#endif -extern oid usmHMACSHA1AuthProtocol[10]; /* == { 1,3,6,1,6,3,10,1,1,3 }; */ -extern oid usmNoPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,1 }; */ -#ifndef DISABLE_DES -extern oid usmDESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,2 }; */ -#endif - -/* XXX: OIDs not defined yet */ -extern oid usmAESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,4 }; */ -extern oid *usmAES128PrivProtocol; /* backwards compat */ - -#define USM_AUTH_PROTO_NOAUTH_LEN 10 -#define USM_AUTH_PROTO_MD5_LEN 10 -#define USM_AUTH_PROTO_SHA_LEN 10 -#define USM_PRIV_PROTO_NOPRIV_LEN 10 -#define USM_PRIV_PROTO_DES_LEN 10 - -#define USM_PRIV_PROTO_AES_LEN 10 -#define USM_PRIV_PROTO_AES128_LEN 10 /* backwards compat */ - -#ifdef __cplusplus -} -#endif -#endif diff --git a/utils/net-snmp/library/ucd_compat.h b/utils/net-snmp/library/ucd_compat.h deleted file mode 100644 index 73979d314..000000000 --- a/utils/net-snmp/library/ucd_compat.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * UCD compatability definitions & declarations - * - */ - -#ifndef NET_SNMP_UCD_COMPAT_H -#define NET_SNMP_UCD_COMPAT_H - -#ifdef __cplusplus -extern "C" { -#endif - - /* - * from snmp_api.h - */ -void snmp_set_dump_packet(int); -int snmp_get_dump_packet(void); -void snmp_set_quick_print(int); -int snmp_get_quick_print(void); -void snmp_set_suffix_only(int); -int snmp_get_suffix_only(void); -void snmp_set_full_objid(int); -int snmp_get_full_objid(void); -void snmp_set_random_access(int); -int snmp_get_random_access(void); - - /* - * from parse.h - */ -void snmp_set_mib_warnings(int); -void snmp_set_mib_errors(int); -void snmp_set_save_descriptions(int); -void snmp_set_mib_comment_term(int); -void snmp_set_mib_parse_label(int); - -#ifdef __cplusplus -} -#endif -#endif /* NET_SNMP_UCD_COMPAT_H */ diff --git a/utils/net-snmp/library/vacm.h b/utils/net-snmp/library/vacm.h deleted file mode 100644 index ebd5fe3bc..000000000 --- a/utils/net-snmp/library/vacm.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * vacm.h - * - * SNMPv3 View-based Access Control Model - */ - -#ifndef VACM_H -#define VACM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define VACM_SUCCESS 0 -#define VACM_NOSECNAME 1 -#define VACM_NOGROUP 2 -#define VACM_NOACCESS 3 -#define VACM_NOVIEW 4 -#define VACM_NOTINVIEW 5 -#define VACM_NOSUCHCONTEXT 6 -#define VACM_SUBTREE_UNKNOWN 7 - -#define SECURITYMODEL 1 -#define SECURITYNAME 2 -#define SECURITYGROUP 3 -#define SECURITYSTORAGE 4 -#define SECURITYSTATUS 5 - -#define ACCESSPREFIX 1 -#define ACCESSMODEL 2 -#define ACCESSLEVEL 3 -#define ACCESSMATCH 4 -#define ACCESSREAD 5 -#define ACCESSWRITE 6 -#define ACCESSNOTIFY 7 -#define ACCESSSTORAGE 8 -#define ACCESSSTATUS 9 - -#define VACMVIEWSPINLOCK 1 -#define VIEWNAME 2 -#define VIEWSUBTREE 3 -#define VIEWMASK 4 -#define VIEWTYPE 5 -#define VIEWSTORAGE 6 -#define VIEWSTATUS 7 - -#define VACM_MAX_STRING 32 -#define VACMSTRINGLEN 34 /* VACM_MAX_STRING + 2 */ - - struct vacm_groupEntry { - int securityModel; - char securityName[VACMSTRINGLEN]; - char groupName[VACMSTRINGLEN]; - int storageType; - int status; - - u_long bitMask; - struct vacm_groupEntry *reserved; - struct vacm_groupEntry *next; - }; - -#define CONTEXT_MATCH_EXACT 1 -#define CONTEXT_MATCH_PREFIX 2 - struct vacm_accessEntry { - char groupName[VACMSTRINGLEN]; - char contextPrefix[VACMSTRINGLEN]; - int securityModel; - int securityLevel; - int contextMatch; - char readView[VACMSTRINGLEN]; - char writeView[VACMSTRINGLEN]; - char notifyView[VACMSTRINGLEN]; - int storageType; - int status; - - u_long bitMask; - struct vacm_accessEntry *reserved; - struct vacm_accessEntry *next; - }; - - struct vacm_viewEntry { - char viewName[VACMSTRINGLEN]; - oid viewSubtree[MAX_OID_LEN]; - size_t viewSubtreeLen; - u_char viewMask[VACMSTRINGLEN]; - size_t viewMaskLen; - int viewType; - int viewStorageType; - int viewStatus; - - u_long bitMask; - - struct vacm_viewEntry *reserved; - struct vacm_viewEntry *next; - }; - - void vacm_destroyViewEntry(const char *, oid *, size_t); - void vacm_destroyAllViewEntries(void); - -#define VACM_MODE_FIND 0 -#define VACM_MODE_IGNORE_MASK 1 -#define VACM_MODE_CHECK_SUBTREE 2 - struct vacm_viewEntry *vacm_getViewEntry(const char *, oid *, size_t, - int); - /* - * Returns a pointer to the viewEntry with the - * same viewName and viewSubtree - * Returns NULL if that entry does not exist. - */ - - int vacm_checkSubtree(const char *, oid *, size_t); - - /* - * Check to see if everything within a subtree is in view, not in view, - * or possibly both. - * - * Returns: - * VACM_SUCCESS The OID is included in the view. - * VACM_NOTINVIEW If no entry in the view list includes the - * provided OID, or the OID is explicitly excluded - * from the view. - * VACM_SUBTREE_UNKNOWN The entire subtree has both allowed and - * disallowed portions. - */ - - void - vacm_scanViewInit(void); - /* - * Initialized the scan routines so that they will begin at the - * beginning of the list of viewEntries. - * - */ - - - struct vacm_viewEntry *vacm_scanViewNext(void); - /* - * Returns a pointer to the next viewEntry. - * These entries are returned in no particular order, - * but if N entries exist, N calls to view_scanNext() will - * return all N entries once. - * Returns NULL if all entries have been returned. - * view_scanInit() starts the scan over. - */ - - struct vacm_viewEntry *vacm_createViewEntry(const char *, oid *, - size_t); - /* - * Creates a viewEntry with the given index - * and returns a pointer to it. - * The status of this entry is created as invalid. - */ - - void vacm_destroyGroupEntry(int, const char *); - void vacm_destroyAllGroupEntries(void); - struct vacm_groupEntry *vacm_createGroupEntry(int, const char *); - struct vacm_groupEntry *vacm_getGroupEntry(int, const char *); - void vacm_scanGroupInit(void); - struct vacm_groupEntry *vacm_scanGroupNext(void); - - void vacm_destroyAccessEntry(const char *, const char *, - int, int); - void vacm_destroyAllAccessEntries(void); - struct vacm_accessEntry *vacm_createAccessEntry(const char *, - const char *, int, - int); - struct vacm_accessEntry *vacm_getAccessEntry(const char *, - const char *, int, int); - void vacm_scanAccessInit(void); - struct vacm_accessEntry *vacm_scanAccessNext(void); - - void vacm_destroySecurityEntry(const char *); - struct vacm_securityEntry *vacm_createSecurityEntry(const char *); - struct vacm_securityEntry *vacm_getSecurityEntry(const char *); - void vacm_scanSecurityInit(void); - struct vacm_securityEntry *vacm_scanSecurityEntry(void); - int vacm_is_configured(void); - - void vacm_save(const char *token, const char *type); - void vacm_save_view(struct vacm_viewEntry *view, - const char *token, const char *type); - void vacm_save_access(struct vacm_accessEntry *access_entry, - const char *token, const char *type); - void vacm_save_group(struct vacm_groupEntry *group_entry, - const char *token, const char *type); - - void vacm_parse_config_view(const char *token, char *line); - void vacm_parse_config_group(const char *token, char *line); - void vacm_parse_config_access(const char *token, - char *line); - - int store_vacm(int majorID, int minorID, void *serverarg, - void *clientarg); - - -#ifdef __cplusplus -} -#endif -#endif /* VACM_H */ diff --git a/utils/net-snmp/library/winpipe.h b/utils/net-snmp/library/winpipe.h deleted file mode 100644 index c1dd93fee..000000000 --- a/utils/net-snmp/library/winpipe.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (c) Fabasoft R&D Software GmbH & Co KG, 2003 - oss@fabasoft.com - Author: Bernhard Penz - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * The name of Fabasoft R&D Software GmbH & Co KG or any of its subsidiaries, - brand or product names may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifdef WIN32 - -#ifndef WINPIPE_H -#define WINPIPE_H - -int create_winpipe_transport(int *pipefds); - -#endif - -#endif - diff --git a/utils/net-snmp/library/winservice.h b/utils/net-snmp/library/winservice.h deleted file mode 100644 index 170e6b6f0..000000000 --- a/utils/net-snmp/library/winservice.h +++ /dev/null @@ -1,170 +0,0 @@ -#ifndef WINSERVICE_H -#define WINSERVICE_H - - /* - * - * Windows Service related functions declaration - * By Raju Krishanppa(raju_krishnappa@yahoo.com) - * - */ - -#ifdef __cplusplus -extern "C" -{ - -#endif /* */ - - /* - * Define Constants for Register, De-register , Run As service or Console mode - */ -#define REGISTER_SERVICE 0 -#define UN_REGISTER_SERVICE 1 -#define RUN_AS_SERVICE 2 -#define RUN_AS_CONSOLE 3 - - - /* - * Error levels returned when registering or unregistering the service - */ -#define SERVICE_ERROR_NONE 0 -#define SERVICE_ERROR_SCM_OPEN 1 /* Can not open SCM */ -#define SERVICE_ERROR_CREATE_SERVICE 2 /* Can not create service */ -#define SERVICE_ERROR_CREATE_REGISTRY_ENTRIES 3 /* Can not create registry entries */ -#define SERVICE_ERROR_OPEN_SERVICE 4 /* Can not open service (service does not exist) */ - - /* - * Define Message catalog ID - * MessageId: DISPLAY_MSG - * MessageText: %1. - */ -#define DISPLAY_MSG 0x00000064L - - /* - * Hint Value to SCM to wait before sending successive commands to service - */ -#define SCM_WAIT_INTERVAL 7000 - - /* - * Define Generic String Size, to hold Error or Information - */ -#define MAX_STR_SIZE 1024 - - /* - * Delcare Global variables, which are visible to other modules - */ - extern BOOL g_fRunningAsService; - - /* - * Input parameter structure to thread - */ - typedef struct _InputParams - { - DWORD Argc; - LPTSTR *Argv; - } InputParams; - - /* - * Define Service Related functions - */ - - /* - * To register application as windows service with SCM - */ - int RegisterService (LPCTSTR lpszServiceName, - LPCTSTR lpszServiceDisplayName, - LPCTSTR lpszServiceDescription, InputParams * StartUpArg, int quiet); - - /* - * To unregister service - */ - int UnregisterService (LPCSTR lpszServiceName, int quiet); - - /* - * To parse command line for startup option - */ - INT ParseCmdLineForServiceOption (INT argc, TCHAR * argv[], int *quiet); - - /* - * To write to windows event log - */ - VOID WriteToEventLog (WORD wType, LPCTSTR pszFormat, ...); - - /* - * To display generic windows error - */ - VOID DisplayError (LPCTSTR pszTitle, int quite); - - /* - * To update windows service status to SCM - */ - static BOOL UpdateServiceStatus (DWORD dwStatus, DWORD dwErrorCode, - DWORD dwWaitHint); - - /* - * To Report current service status to SCM - */ - static BOOL ReportCurrentServiceStatus (VOID); - - /* - * Service Main function, Which will spawn a thread, and calls the - * Service run part - */ - VOID WINAPI ServiceMain (DWORD argc, LPTSTR argv[]); - - /* - * To start Service - */ - - BOOL RunAsService (INT (*ServiceFunction) (INT, LPTSTR *)); - - /* - * Call back function to process SCM Requests - */ - VOID WINAPI ControlHandler (DWORD dwControl); - - /* - * To Stop the service - */ - VOID ProcessServiceStop (VOID); - - /* - * To Pause service - */ - VOID ProcessServicePause (VOID); - - /* - * To Continue paused service - */ - VOID ProcessServiceContinue (VOID); - - /* - * To send Current Service status to SCM when INTERROGATE command is sent - */ - VOID ProcessServiceInterrogate (VOID); - - /* - * To allocate and Set security descriptor - */ - BOOL SetSimpleSecurityAttributes (SECURITY_ATTRIBUTES * pSecurityAttr); - - /* - * To free Security Descriptor - */ - VOID FreeSecurityAttributes (SECURITY_ATTRIBUTES * pSecurityAttr); - - /* - * TheadFunction - To spawan as thread - Invokes registered service function - */ - DWORD WINAPI ThreadFunction (LPVOID lpParam); - - /* - * Service STOP function registration with this framewrok - * * this function must be invoked before calling RunAsService - */ - VOID RegisterStopFunction (VOID (*StopFunc) (VOID)); - -#ifdef __cplusplus -} -#endif /* */ -#endif /* WINSERVICE_H */ - diff --git a/utils/net-snmp/machine/generic.h b/utils/net-snmp/machine/generic.h deleted file mode 100644 index ddfbe3a9d..000000000 --- a/utils/net-snmp/machine/generic.h +++ /dev/null @@ -1,3 +0,0 @@ -/* - * chip specific definitions go here - */ diff --git a/utils/net-snmp/mib_api.h b/utils/net-snmp/mib_api.h deleted file mode 100644 index 1da0c36da..000000000 --- a/utils/net-snmp/mib_api.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef NET_SNMP_MIB_API_H -#define NET_SNMP_MIB_API_H - - /** - * Library API routines concerned with MIB files and objects, and OIDs - */ - -#include - - /* - * For the initial release, this will just refer to the - * relevant UCD header files. - * In due course, the routines relevant to this area of the - * API will be identified, and listed here directly. - * - * But for the time being, this header file is a placeholder, - * to allow application writers to adopt the new header file names. - */ - -#include - -#include -#ifndef DISABLE_MIB_LOADING -#include -#endif -#include -#include -#include - -#endif /* NET_SNMP_MIB_API_H */ diff --git a/utils/net-snmp/net-snmp-config.h b/utils/net-snmp/net-snmp-config.h deleted file mode 100644 index 89c97e630..000000000 --- a/utils/net-snmp/net-snmp-config.h +++ /dev/null @@ -1,1576 +0,0 @@ -/* include/net-snmp/net-snmp-config.h. Generated by configure. */ -/* include/net-snmp/net-snmp-config.h.in. Generated from configure.in by autoheader. */ -/* Portions of this file are subject to the following copyright(s). See - * the Net-SNMP's COPYING file for more details and other copyrights - * that may apply: - */ -/* - * Portions of this file are copyrighted by: - * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ - -#ifndef NET_SNMP_CONFIG_H -#define NET_SNMP_CONFIG_H - -/* config.h: a general config file */ - -/* Default (SNMP) version number for the tools to use */ -#define DEFAULT_SNMP_VERSION 3 - -/* don't change these values! */ -#define SNMPV1 0xAAAA /* readable by anyone */ -#define SNMPV2ANY 0xA000 /* V2 Any type (includes NoAuth) */ -#define SNMPV2AUTH 0x8000 /* V2 Authenticated requests only */ - -/* default list of mibs to load */ - -#define DEFAULT_MIBS "IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:HOST-RESOURCES-MIB:SNMPv2-MIB:RFC1213-MIB:NOTIFICATION-LOG-MIB:UCD-SNMP-MIB:UCD-DEMO-MIB:SNMP-TARGET-MIB:NET-SNMP-AGENT-MIB:DISMAN-EVENT-MIB:SNMP-VIEW-BASED-ACM-MIB:SNMP-COMMUNITY-MIB:NET-SNMP-EXTEND-MIB:UCD-DLMOD-MIB:SNMP-FRAMEWORK-MIB:SNMP-MPD-MIB:SNMP-USER-BASED-SM-MIB:SNMP-NOTIFICATION-MIB:SNMPv2-TM" - -/* default location to look for mibs to load using the above tokens - and/or those in the MIBS envrionment variable*/ -#define DEFAULT_MIBDIRS "$HOME/.snmp/mibs:/usr/local/mariadb/columnstore/share/snmp/mibs" - -/* default mib files to load, specified by path. */ -/* #undef DEFAULT_MIBFILES */ - -/* should we compile to use special opaque types: float, double, - counter64, i64, ui64, union? */ -#define OPAQUE_SPECIAL_TYPES 1 - -/* comment the next line if you are compiling with libsnmp.h - and are not using the UC-Davis SNMP library. */ -#define UCD_SNMP_LIBRARY 1 - -/* define if you want to compile support for both authentication and - privacy support. */ -#define SCAPI_AUTHPRIV 1 - -/* define if you are using the MD5 code ...*/ -/* #undef USE_INTERNAL_MD5 */ - -/* define if you are using the codeS11 library ...*/ -/* #undef USE_PKCS */ - -/* add in recent CMU library extensions (not complete) */ -/* #undef CMU_COMPATIBLE */ - -/* add in recent resource lock functions (not complete) */ -/* #undef _REENTRANT */ - -/* debugging stuff */ -/* if defined, we optimize the code to exclude all debugging calls. */ -/* #undef SNMP_NO_DEBUGGING */ -/* ignore the -D flag and always print debugging information */ -#define SNMP_ALWAYS_DEBUG 0 - -/* reverse encoding BER packets is both faster and more efficient in space. */ -#define USE_REVERSE_ASNENCODING 1 -#define DEFAULT_ASNENCODING_DIRECTION 1 /* 1 = reverse, 0 = forwards */ - -/* PERSISTENT_DIRECTORY: If defined, the library is capabile of saving - persisant information to this directory in the form of configuration - lines: PERSISTENT_DIRECTORY/NAME.persistent.conf */ -#define PERSISTENT_DIRECTORY "/var/net-snmp" - -/* PERSISTENT_MASK: the umask permissions to set up persistent files with */ -#define PERSISTENT_MASK 077 - -/* AGENT_DIRECTORY_MODE: the mode the agents should use to create - directories with. Since the data stored here is probably sensitive, it - probably should be read-only by root/administrator. */ -#define AGENT_DIRECTORY_MODE 0700 - -/* MAX_PERSISTENT_BACKUPS: - * The maximum number of persistent backups the library will try to - * read from the persistent cache directory. If an application fails to - * close down successfully more than this number of times, data will be lost. - */ -#define MAX_PERSISTENT_BACKUPS 10 - - -/* define if you are embedding perl in the main agent */ -/* #undef NETSNMP_EMBEDDED_PERL */ - -/* define the system type include file here */ -#define SYSTEM_INCLUDE_FILE "net-snmp/system/linux.h" - -/* define the machine (cpu) type include file here */ -#define MACHINE_INCLUDE_FILE "net-snmp/machine/generic.h" - -/* define the UDP buffer defaults undefined means use the OS buffers - * by default */ -/* #undef DEFAULT_SERVER_SEND_BUF */ -/* #undef DEFAULT_SERVER_RECV_BUF */ -/* #undef DEFAULT_CLIENT_SEND_BUF */ -/* #undef DEFAULT_CLIENT_RECV_BUF */ - -/* SNMPLIBDIR contains important files */ -#define SNMPLIBPATH "/usr/local/mariadb/columnstore/lib/snmp" -#define SNMPSHAREPATH "/usr/local/mariadb/columnstore/share/snmp" -#define SNMPCONFPATH "/usr/local/mariadb/columnstore/etc/snmp" -#define SNMPDLMODPATH "/usr/local/mariadb/columnstore/lib/snmp/dlmod" - -/* LOGFILE: If defined it closes stdout/err/in and opens this in out/err's - place. (stdin is closed so that sh scripts won't wait for it) */ -#define LOGFILE "/var/log/snmpd.log" - -/* default system contact */ -#define SYS_CONTACT "zzhu@calpont.com" - -/* system location */ -#define SYS_LOC "Frisco, TX 75032" - -/* Use libwrap to handle allow/deny hosts? */ -/* #undef USE_LIBWRAP */ - -/* Use dmalloc to do malloc debugging? */ -/* #undef HAVE_DMALLOC_H */ - -/* location of UNIX kernel */ -#define KERNEL_LOC "unknown" - -/* location of mount table list */ -#define ETC_MNTTAB "/etc/mtab" - -/* location of swap device (ok if not found) */ -/* #undef DMEM_LOC */ - -/* Command to generate ps output, the final column must be the process - name withOUT arguments */ -#define PSCMD "/bin/ps -e" - -/* Where is the uname command */ -#define UNAMEPROG "/bin/uname" - -/* pattern for temporary file names */ -#define NETSNMP_TEMP_FILE_PATTERN "/tmp/snmpdXXXXXX" - -/* testing code sections. */ -/* #undef SNMP_TESTING_CODE */ - -/* If you don't have root access don't exit upon kmem errors */ -/* #undef NO_ROOT_ACCESS */ - -/* If we don't want to use kmem. */ -/* #undef NO_KMEM_USAGE */ - -/* If you don't want the agent to report on variables it doesn't have data for */ -#define NO_DUMMY_VALUES 1 - -/* Define if statfs takes 2 args and the second argument has - type struct fs_data. [Ultrix] */ -/* #undef STAT_STATFS_FS_DATA */ - -/* Define if the TCP timer constants in - depend on the integer variable `hz'. [FreeBSD 4.x] */ -/* #undef TCPTV_NEEDS_HZ */ - - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define if DES encryption should not be supported */ -/* #undef DISABLE_DES */ - -/* Define if MD5 authentication should not be supported */ -/* #undef DISABLE_MD5 */ - -/* Define if mib loading and parsing code should not be included */ -/* #undef DISABLE_MIB_LOADING */ - -/* Define if SNMPv1 code should not be included */ -/* #undef DISABLE_SNMPV1 */ - -/* Define if SNMPv2c code should not be included */ -/* #undef DISABLE_SNMPV2C */ - -/* Define to 1 if you have the `AES_cfb128_encrypt' function. */ -#define HAVE_AES_CFB128_ENCRYPT 1 - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ASM_PAGE_H 1 - -/* Define to 1 if you have the `bcopy' function. */ -#define HAVE_BCOPY 1 - -/* Define to 1 if you have the `cgetnext' function. */ -/* #undef HAVE_CGETNEXT */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#define HAVE_DIRENT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERR_H 1 - -/* Define to 1 if you have the `eval_pv' function. */ -/* #undef HAVE_EVAL_PV */ - -/* Define to 1 if you have the `execv' function. */ -#define HAVE_EXECV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `fork' function. */ -#define HAVE_FORK 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FSTAB_H 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getdtablesize' function. */ -#define HAVE_GETDTABLESIZE 1 - -/* Define to 1 if you have the `getfsstat' function. */ -/* #undef HAVE_GETFSSTAT */ - -/* Define to 1 if you have the `getgrnam' function. */ -#define HAVE_GETGRNAM 1 - -/* Define to 1 if you have the `gethostname' function. */ -#define HAVE_GETHOSTNAME 1 - -/* Define to 1 if you have the `getipnodebyname' function. */ -/* #undef HAVE_GETIPNODEBYNAME */ - -/* Define to 1 if you have the `getloadavg' function. */ -#define HAVE_GETLOADAVG 1 - -/* Define to 1 if you have the `getmntent' function. */ -#define HAVE_GETMNTENT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_GETOPT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getpid' function. */ -#define HAVE_GETPID 1 - -/* Define to 1 if you have the `getpwnam' function. */ -#define HAVE_GETPWNAM 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_GRP_H 1 - -/* Define to 1 if you have the `if_freenameindex' function. */ -#define HAVE_IF_FREENAMEINDEX 1 - -/* Define to 1 if you have the `if_nameindex' function. */ -#define HAVE_IF_NAMEINDEX 1 - -/* Define to 1 if you have the `if_nametoindex' function. */ -#define HAVE_IF_NAMETOINDEX 1 - -/* Define to 1 if you have the `index' function. */ -#define HAVE_INDEX 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INET_MIB2_H */ - -/* Define to 1 if the system has the type `int32_t'. */ -#define HAVE_INT32_T 1 - -/* Define to 1 if the system has the type `int64_t'. */ -#define HAVE_INT64_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IOCTLS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IO_H */ - -/* Define to 1 if you have the `knlist' function. */ -/* #undef HAVE_KNLIST */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_KSTAT_H */ - -/* Define to 1 if you have the `kvm_getprocs' function. */ -/* #undef HAVE_KVM_GETPROCS */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_KVM_H */ - -/* Define to 1 if you have the `kvm_openfiles' function. */ -/* #undef HAVE_KVM_OPENFILES */ - -/* Define to 1 if you have the `crypto' library (-lcrypto). */ -#define HAVE_LIBCRYPTO 1 - -/* Define to 1 if you have the `dl' library (-ldl). */ -#define HAVE_LIBDL 1 - -/* Define to 1 if you have the `efence' library (-lefence). */ -/* #undef HAVE_LIBEFENCE */ - -/* Define to 1 if you have the `elf' library (-lelf). */ -/* #undef HAVE_LIBELF */ - -/* Define to 1 if you have the `kstat' library (-lkstat). */ -/* #undef HAVE_LIBKSTAT */ - -/* Define to 1 if you have the `kvm' library (-lkvm). */ -/* #undef HAVE_LIBKVM */ - -/* Define to 1 if you have the `m' library (-lm). */ -#define HAVE_LIBM 1 - -/* Define to 1 if you have the `mld' library (-lmld). */ -/* #undef HAVE_LIBMLD */ - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -/* #undef HAVE_LIBNSL */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBPERFSTAT_H */ - -/* Define to 1 if you have the `pkcs11' library (-lpkcs11). */ -/* #undef HAVE_LIBPKCS11 */ - -/* Define to 1 if you have the `RSAglue' library (-lRSAglue). */ -/* #undef HAVE_LIBRSAGLUE */ - -/* Define to 1 if you have the `rsaref' library (-lrsaref). */ -/* #undef HAVE_LIBRSAREF */ - -/* Define to 1 if you have the `z' library (-lz). */ -/* #undef HAVE_LIBZ */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LINUX_HDREG_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LINUX_TASKS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if you have the `lrand48' function. */ -#define HAVE_LRAND48 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_PTE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_TYPES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the `memcpy' function. */ -#define HAVE_MEMCPY 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mkstemp' function. */ -#define HAVE_MKSTEMP 1 - -/* Define to 1 if you have the `mktime' function. */ -#define HAVE_MKTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MNTENT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MTAB_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_IN6_PCB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_IN6_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_IP6_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_ND6_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_TCP6_FSM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_TCP6_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_TCP6_TIMER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_TCP6_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_ICMP_VAR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IF_ETHER_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_SYSTM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_VAR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IP6_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IP_ICMP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IP_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_TCPIP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_TCP_FSM_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_TCP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_TCP_TIMER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_TCP_VAR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_UDP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_UDP_VAR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETIPX_IPX_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_ARP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NET_IF_DL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NET_IF_MIB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NET_IF_TYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NET_IF_VAR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_ROUTE_H 1 - -/* Define to 1 if you have the `nlist' function. */ -/* #undef HAVE_NLIST */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NLIST_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_AES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_DES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_DH_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_EVP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_HMAC_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OSRELDATE_H */ - -/* Define to 1 if you have the `perl_eval_pv' function. */ -/* #undef HAVE_PERL_EVAL_PV */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PICL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PKGINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PKGLOCS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_PTHREAD_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PWD_H 1 - -/* Define to 1 if you have the `rand' function. */ -#define HAVE_RAND 1 - -/* Define to 1 if you have the `random' function. */ -#define HAVE_RANDOM 1 - -/* Define to 1 if you have the `regcomp' function. */ -#define HAVE_REGCOMP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_REGEX_H 1 - -/* Define to 1 if you have the `rpmGetPath' function. */ -/* #undef HAVE_RPMGETPATH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RPM_RPMDB_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SECURITY_CRYPTOKI_H */ - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the `setenv' function. */ -#define HAVE_SETENV 1 - -/* Define to 1 if you have the `setgid' function. */ -#define HAVE_SETGID 1 - -/* Define to 1 if you have the `setgroups' function. */ -#define HAVE_SETGROUPS 1 - -/* Define to 1 if you have the `setitimer' function. */ -#define HAVE_SETITIMER 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the `setmntent' function. */ -#define HAVE_SETMNTENT 1 - -/* Define to 1 if you have the `setsid' function. */ -#define HAVE_SETSID 1 - -/* Define to 1 if you have the `setuid' function. */ -#define HAVE_SETUID 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SGTTY_H 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigalrm' function. */ -/* #undef HAVE_SIGALRM */ - -/* Define to 1 if you have the `sigblock' function. */ -#define HAVE_SIGBLOCK 1 - -/* Define to 1 if you have the `sighold' function. */ -#define HAVE_SIGHOLD 1 - -/* Define to 1 if you have the `signal' function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the `sigset' function. */ -#define HAVE_SIGSET 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if you have the `statfs' function. */ -#define HAVE_STATFS 1 - -/* Define to 1 if you have the `statvfs' function. */ -#define HAVE_STATVFS 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stime' function. */ -#define HAVE_STIME 1 - -/* Define to 1 if you have the `strcasestr' function. */ -#define HAVE_STRCASESTR 1 - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - -/* Define to 1 if you have the `strncasecmp' function. */ -#define HAVE_STRNCASECMP 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYSLOG_H 1 - -/* Define to 1 if you have the `system' function. */ -#define HAVE_SYSTEM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_CDEFS_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CONF_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_DISKIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_DKIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_DMAP_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_FILE_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_FILIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_FIXPOINT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_FS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_HASHING_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_LOADAVG_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MBUF_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MNTENT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MNTTAB_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MOUNT_H 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_POOL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROC_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROTOSW_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_QUEUE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKETVAR_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKIO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STATFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STATVFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STREAM_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SWAP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSMP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TCPIPSTATS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_USER_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UTSNAME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_VFS_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VMMAC_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VMMETER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VMPARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VMSYSTM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VNODE_H */ - -/* Define to 1 if you have that is POSIX.1 compatible. */ -#define HAVE_SYS_WAIT_H 1 - -/* Define to 1 if you have the `tcgetattr' function. */ -#define HAVE_TCGETATTR 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UFS_FFS_FS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UFS_FS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UFS_UFS_DINODE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UFS_UFS_INODE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UFS_UFS_QUOTA_H */ - -/* Define to 1 if the system has the type `uint32_t'. */ -#define HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint64_t'. */ -#define HAVE_UINT64_T 1 - -/* Define to 1 if you have the `uname' function. */ -#define HAVE_UNAME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `usleep' function. */ -#define HAVE_USLEEP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UTMPX_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UTSNAME_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UVM_UVM_EXTERN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UVM_UVM_PARAM_H */ - -/* Define to 1 if the system has the type `u_int32_t'. */ -#define HAVE_U_INT32_T 1 - -/* Define to 1 if the system has the type `u_int64_t'. */ -#define HAVE_U_INT64_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VM_SWAP_PAGER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VM_VM_EXTERN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VM_VM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VM_VM_PARAM_H */ - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINSOCK_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_XTI_H */ - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "net-snmp-coders@lists.sourceforge.net" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "Net-SNMP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Net-SNMP 5.2.1.2" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "net-snmp" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.2.1.2" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of a `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of a `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - -/* The size of a `long long', as computed by sizeof. */ -#define SIZEOF_LONG_LONG 8 - -/* The size of a `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* Define to 1 if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ -#endif - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `long' if does not define. */ -/* #undef off_t */ - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -/* define if you have type int32_t */ -#define HAVE_INT32_T 1 - -/* define if you have type uint32_t */ -#define HAVE_UINT32_T 1 - -/* define if you have type u_int32_t */ -#define HAVE_U_INT32_T 1 - -/* define if you have type int64_t */ -#define HAVE_INT64_T 1 - -/* define if you have type uint64_t */ -#define HAVE_UINT64_T 1 - -/* define if you have type u_int64_t */ -#define HAVE_U_INT64_T 1 - -/* define if you have getdevs() */ -/* #undef HAVE_GETDEVS */ - -/* define if you have devstat_getdevs() */ -/* #undef HAVE_DEVSTAT_GETDEVS */ - -/* define if you have */ -/* #undef HAVE_NETINET_IN_PCB_H */ - -/* define if you have */ -/* #undef HAVE_SYS_DISKLABEL_H */ - -/* define if you are using linux and /proc/net/dev has the compressed - field, which exists in linux kernels 2.2 and greater. */ -/* #undef PROC_NET_DEV_HAS_COMPRESSED */ - -/* define rtentry to ortentry on SYSV machines (alphas) */ -#define RTENTRY struct rtentry - -/* Use BSD 4.4 routing table entries? */ -/* #undef RTENTRY_4_4 */ - -/* Does struct sigaction have a sa_sigaction field? */ -#define STRUCT_SIGACTION_HAS_SA_SIGACTION 1 - -/* Does struct tm have a tm_gmtoff field? */ -/* #undef STRUCT_TM_HAS_TM_GMTOFFF */ - -/* Does struct sockaddr have a sa_len field? */ -/* #undef STRUCT_SOCKADDR_HAS_SA_LEN */ - -/* Does struct sockaddr have a sa_family2 field? */ -/* #undef STRUCT_SOCKADDR_HAS_SA_UNION_SA_GENERIC_SA_FAMILY2 */ - -/* Does struct in6_addr have a s6_un.sa6_ladd field? */ -/* #undef STRUCT_IN6_ADDR_HAS_S6_UN_SA6_LADDR */ - -/* rtentry structure tests */ -/* #undef RTENTRY_RT_NEXT */ -#define STRUCT_RTENTRY_HAS_RT_DST 1 -/* #undef STRUCT_RTENTRY_HAS_RT_UNIT */ -/* #undef STRUCT_RTENTRY_HAS_RT_USE */ -/* #undef STRUCT_RTENTRY_HAS_RT_REFCNT */ -/* #undef STRUCT_RTENTRY_HAS_RT_HASH */ - -/* ifnet structure tests */ -/* #undef STRUCT_IFNET_HAS_IF_BAUDRATE */ -/* #undef STRUCT_IFNET_HAS_IF_BAUDRATE_IFS_VALUE */ -#define STRUCT_IFNET_HAS_IF_SPEED 1 -#define STRUCT_IFNET_HAS_IF_TYPE 1 -/* #undef STRUCT_IFNET_HAS_IF_IMCASTS */ -#define STRUCT_IFNET_HAS_IF_IQDROPS 1 -/* #undef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_SEC */ -/* #undef STRUCT_IFNET_HAS_IF_NOPROTO */ -/* #undef STRUCT_IFNET_HAS_IF_OMCASTS */ -/* #undef STRUCT_IFNET_HAS_IF_XNAME */ -#define STRUCT_IFNET_HAS_IF_OBYTES 1 -#define STRUCT_IFNET_HAS_IF_IBYTES 1 -/* #undef STRUCT_IFNET_HAS_IF_ADDRLIST */ - -/* tcpstat.tcps_rcvmemdrop */ -/* #undef STRUCT_TCPSTAT_HAS_TCPS_RCVMEMDROP */ - -/* udpstat.udps_discard */ -/* #undef STRUCT_UDPSTAT_HAS_UDPS_DISCARD */ - -/* udpstat.udps_discard */ -/* #undef STRUCT_UDPSTAT_HAS_UDPS_NOPORT */ - -/* udpstat.udps_discard */ -/* #undef STRUCT_UDPSTAT_HAS_UDPS_NOPORTBCAST */ - -/* udpstat.udps_discard */ -/* #undef STRUCT_UDPSTAT_HAS_UDPS_FULLSOCK */ - -/* arphd.at_next */ -/* #undef STRUCT_ARPHD_HAS_AT_NEXT */ - -/* ifaddr.ifa_next */ -#define STRUCT_IFADDR_HAS_IFA_NEXT 1 - -/* ifnet.if_mtu */ -/* #undef STRUCT_IFNET_HAS_IF_MTU */ - -/* swdevt.sw_nblksenabled */ -/* #undef STRUCT_SWDEVT_HAS_SW_NBLKSENABLED */ - -/* nlist.n_value */ -/* #undef STRUCT_NLIST_HAS_N_VALUE */ - -/* ipstat structure tests */ -/* #undef STRUCT_IPSTAT_HAS_IPS_CANTFORWARD */ -/* #undef STRUCT_IPSTAT_HAS_IPS_CANTFRAG */ -/* #undef STRUCT_IPSTAT_HAS_IPS_DELIVERED */ -/* #undef STRUCT_IPSTAT_HAS_IPS_FRAGDROPPED */ -/* #undef STRUCT_IPSTAT_HAS_IPS_FRAGTIMEOUT */ -/* #undef STRUCT_IPSTAT_HAS_IPS_LOCALOUT */ -/* #undef STRUCT_IPSTAT_HAS_IPS_NOPROTO */ -/* #undef STRUCT_IPSTAT_HAS_IPS_NOROUTE */ -/* #undef STRUCT_IPSTAT_HAS_IPS_ODROPPED */ -/* #undef STRUCT_IPSTAT_HAS_IPS_OFRAGMENTS */ -/* #undef STRUCT_IPSTAT_HAS_IPS_REASSEMBLED */ - -/* vfsstat.f_frsize */ -#define STRUCT_STATVFS_HAS_F_FRSIZE 1 - -/* vfsstat.f_files */ -#define STRUCT_STATVFS_HAS_F_FILES 1 - -/* statfs inode structure tests*/ -#define STRUCT_STATFS_HAS_F_FILES 1 -#define STRUCT_STATFS_HAS_F_FFREE 1 -/* #undef STRUCT_STATFS_HAS_F_FAVAIL */ - -/* des_ks_struct.weak_key */ -/* #undef STRUCT_DES_KS_STRUCT_HAS_WEAK_KEY */ - -/* ifnet needs to have _KERNEL defined */ -/* #undef IFNET_NEEDS_KERNEL */ - -/* sysctl works to get boottime, etc... */ -/* #undef CAN_USE_SYSCTL */ - -/* type check for in_addr_t */ -/* #undef in_addr_t */ - -/* define if SIOCGIFADDR exists in sys/ioctl.h */ -#define SYS_IOCTL_H_HAS_SIOCGIFADDR 1 - -/* define if your compiler (processor) defines __FUNCTION__ for you */ -#define HAVE_CPP_UNDERBAR_FUNCTION_DEFINED 1 - -/* Mib-2 tree Info */ -/* These are the system information variables. */ - -#define VERS_DESC "unknown" /* overridden at run time */ -#define SYS_NAME "unknown" /* overridden at run time */ - -/* comment out the second define to turn off functionality for any of - these: (See README for details) */ - -/* proc PROCESSNAME [MAX] [MIN] */ -#define PROCMIBNUM 2 - -/* exec/shell NAME COMMAND */ -#define SHELLMIBNUM 8 - -/* swap MIN */ -#define MEMMIBNUM 4 - -/* disk DISK MINSIZE */ -#define DISKMIBNUM 9 - -/* load 1 5 15 */ -#define LOADAVEMIBNUM 10 - -/* which version are you using? This mibloc will tell you */ -#define VERSIONMIBNUM 100 - -/* Reports errors the agent runs into */ -/* (typically its "can't fork, no mem" problems) */ -#define ERRORMIBNUM 101 - -/* The sub id of EXTENSIBLEMIB returned to queries of - .iso.org.dod.internet.mgmt.mib-2.system.sysObjectID.0 */ -#define AGENTID 250 - -/* This ID is returned after the AGENTID above. IE, the resulting - value returned by a query to sysObjectID is - EXTENSIBLEMIB.AGENTID.???, where ??? is defined below by OSTYPE */ - -#define HPUX9ID 1 -#define SUNOS4ID 2 -#define SOLARISID 3 -#define OSFID 4 -#define ULTRIXID 5 -#define HPUX10ID 6 -#define NETBSD1ID 7 -#define FREEBSDID 8 -#define IRIXID 9 -#define LINUXID 10 -#define BSDIID 11 -#define OPENBSDID 12 -#define WIN32ID 13 -#define HPUX11ID 14 -#define UNKNOWNID 255 - -#ifdef hpux9 -#define OSTYPE HPUX9ID -#endif -#ifdef hpux10 -#define OSTYPE HPUX10ID -#endif -#ifdef hpux11 -#define OSTYPE HPUX11ID -#endif -#ifdef sunos4 -#define OSTYPE SUNOS4ID -#endif -#ifdef solaris2 -#define OSTYPE SOLARISID -#endif -#if defined(osf3) || defined(osf4) || defined(osf5) -#define OSTYPE OSFID -#endif -#ifdef ultrix4 -#define OSTYPE ULTRIXID -#endif -#ifdef netbsd1 -#define OSTYPE NETBSD1ID -#endif -#if defined(__FreeBSD__) -#define OSTYPE FREEBSDID -#endif -#if defined(irix6) || defined(irix5) -#define OSTYPE IRIXID -#endif -#ifdef linux -#define OSTYPE LINUXID -#endif -#if defined(bsdi2) || defined(bsdi3) || defined(bsdi4) -#define OSTYPE BSDIID -#endif -#ifdef openbsd2 -#define OSTYPE OPENBSDID -#endif -#ifdef WIN32 -#define OSTYPE WIN32ID -#endif -/* unknown */ -#ifndef OSTYPE -#define OSTYPE UNKNOWNID -#endif - -/* The enterprise number has been assigned by the IANA group. */ -/* Optionally, this may point to the location in the tree your */ -/* company/organization has been allocated. */ -/* The assigned enterprise number for the NET_SNMP MIB modules. */ -#define ENTERPRISE_OID 8072 -#define ENTERPRISE_MIB 1,3,6,1,4,1,8072 -#define ENTERPRISE_DOT_MIB 1.3.6.1.4.1.8072 -#define ENTERPRISE_DOT_MIB_LENGTH 7 - -/* The assigned enterprise number for sysObjectID. */ -#define SYSTEM_MIB 1,3,6,1,4,1,8072,3,2,OSTYPE -#define SYSTEM_DOT_MIB 1.3.6.1.4.1.8072.3.2.OSTYPE -#define SYSTEM_DOT_MIB_LENGTH 10 - -/* The assigned enterprise number for notifications. */ -#define NOTIFICATION_MIB 1,3,6,1,4,1,8072,4 -#define NOTIFICATION_DOT_MIB 1.3.6.1.4.1.8072.4 -#define NOTIFICATION_DOT_MIB_LENGTH 8 - -/* this is the location of the ucdavis mib tree. It shouldn't be - changed, as the places it is used are expected to be constant - values or are directly tied to the UCD-SNMP-MIB. */ -#define UCDAVIS_OID 2021 -#define UCDAVIS_MIB 1,3,6,1,4,1,2021 -#define UCDAVIS_DOT_MIB 1.3.6.1.4.1.2021 -#define UCDAVIS_DOT_MIB_LENGTH 7 - -/* this is the location of the net-snmp mib tree. It shouldn't be - changed, as the places it is used are expected to be constant - values or are directly tied to the UCD-SNMP-MIB. */ -#define NETSNMP_OID 8072 -#define NETSNMP_MIB 1,3,6,1,4,1,8072 -#define NETSNMP_DOT_MIB 1.3.6.1.4.1.8072 -#define NETSNMP_DOT_MIB_LENGTH 7 - -/* how long to wait (seconds) for error querys before reseting the error trap.*/ -#define ERRORTIMELENGTH 600 - -/* Exec command to fix PROC problems */ -/* %s will be replaced by the process name in error */ - -/* #define PROCFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */ - -/* Exec command to fix EXEC problems */ -/* %s will be replaced by the exec/script name in error */ - -/* #define EXECFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */ - -/* Should exec output Cashing be used (speeds up things greatly), and - if so, After how many seconds should the cache re-newed? Note: - Don't define CASHETIME to disable cashing completely */ - -#define EXCACHETIME 30 -#define CACHEFILE ".snmp-exec-cache" -#define MAXCACHESIZE (200*80) /* roughly 200 lines max */ - -#define MAXDISKS 50 /* can't scan more than this number */ - -/* misc defaults */ - -/* default of 100 meg minimum if the minimum size is not specified in - the config file */ -#define DEFDISKMINIMUMSPACE 100000 - -#define DEFMAXLOADAVE 12.0 /* default maximum load average before error */ - -/* Because of sleep(1)s, this will also be time to wait (in seconds) for exec - to finish */ -#define MAXREADCOUNT 100 /* max times to loop reading output from execs. */ - -/* The original CMU code had this hardcoded as = 1 */ -#define SNMPBLOCK 1 /* Set if snmpgets should block and never timeout */ - -/* How long to wait before restarting the agent after a snmpset to - EXTENSIBLEMIB.VERSIONMIBNUM.VERRESTARTAGENT. This is - necessary to finish the snmpset reply before restarting. */ -#define RESTARTSLEEP 5 - -/* Number of community strings to store */ -#define NUM_COMMUNITIES 5 - -/* UNdefine to allow specifying zero-length community string */ -/* #define NO_ZEROLENGTH_COMMUNITY 1 */ - -/* #define EXIT_ON_BAD_KLREAD */ -/* define to exit the agent on a bad kernel read */ - -#define LASTFIELD -1 /* internal define */ - -/* configure options specified */ -#define CONFIGURE_OPTIONS "\"'--prefix=/usr/local/mariadb/columnstore' '--with-mib-modules=disman/event-mib' '--with-cc=gcc'\"" - -/* got socklen_t? */ -#define HAVE_SOCKLEN_T 1 - -/* got in_addr_t? */ -#define HAVE_IN_ADDR_T 1 - -/* got ssize_t? */ -#define HAVE_SSIZE_T 1 - -#ifndef HAVE_STRCHR -#ifdef HAVE_INDEX -# define strchr index -# define strrchr rindex -#endif -#endif - -#ifndef HAVE_INDEX -#ifdef HAVE_STRCHR -# define index strchr -# define rindex strrchr -#endif -#endif - -#ifndef HAVE_MEMCPY -#ifdef HAVE_BCOPY -# define memcpy(d, s, n) bcopy ((s), (d), (n)) -# define memmove(d, s, n) bcopy ((s), (d), (n)) -# define memcmp bcmp -#endif -#endif - -#ifndef HAVE_MEMMOVE -#ifdef HAVE_MEMCPY -# define memmove memcpy -#endif -#endif - -#ifndef HAVE_BCOPY -#ifdef HAVE_MEMCPY -# define bcopy(s, d, n) memcpy ((d), (s), (n)) -# define bzero(p,n) memset((p),(0),(n)) -# define bcmp memcmp -#endif -#endif - -/* If you have openssl 0.9.7 or above, you likely have AES support. */ -#define USE_OPENSSL 1 -#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT) -#define HAVE_AES 1 -#endif - -/* define random functions */ - -#ifndef HAVE_RANDOM -#ifdef HAVE_LRAND48 -#define random lrand48 -#define srandom(s) srand48(s) -#else -#ifdef HAVE_RAND -#define random rand -#define srandom(s) srand(s) -#endif -#endif -#endif - -/* define signal if DNE */ - -#ifndef HAVE_SIGNAL -#ifdef HAVE_SIGSET -#define signal(a,b) sigset(a,b) -#endif -#endif - -/* define if you have librpm and libdb */ -/* #undef HAVE_LIBDB */ -/* #undef HAVE_LIBRPM */ - -/* define if you have pkginfo */ -/* #undef HAVE_PKGINFO */ - -/* define if you have gethostbyname */ -#define HAVE_GETHOSTBYNAME 1 - -/* define if you have getservbyname */ -#define HAVE_GETSERVBYNAME 1 - -/* printing system */ -#define HAVE_LPSTAT 1 -#define LPSTAT_PATH "/usr/bin/lpstat" -#define HAVE_PRINTCAP 1 - -/* Pluggable transports. */ - -/* This is defined if support for the UDP/IP transport domain is - available. */ -#define SNMP_TRANSPORT_UDP_DOMAIN 1 - -/* This is defined if support for the "callback" transport domain is - available. */ -#define SNMP_TRANSPORT_CALLBACK_DOMAIN 1 - -/* This is defined if support for the TCP/IP transport domain is - available. */ -#define SNMP_TRANSPORT_TCP_DOMAIN 1 - -/* This is defined if support for the Unix transport domain - (a.k.a. "local IPC") is available. */ -#define SNMP_TRANSPORT_UNIX_DOMAIN 1 - -/* This is defined if support for the AAL5 PVC transport domain is - available. */ -/* #undef SNMP_TRANSPORT_AAL5PVC_DOMAIN */ - -/* This is defined if support for the IPX transport domain is - available. */ -/* #undef SNMP_TRANSPORT_IPX_DOMAIN */ - -/* This is defined if support for the UDP/IPv6 transport domain is - available. */ -/* #undef SNMP_TRANSPORT_UDPIPV6_DOMAIN */ - -/* This is defined if support for the TCP/IPv6 transport domain is - available. */ -/* #undef SNMP_TRANSPORT_TCPIPV6_DOMAIN */ - -/* define this if the USM security module is available */ -#define SNMP_SECMOD_USM 1 - -/* define this if the KSM (kerberos based snmp) security module is available */ -/* #undef SNMP_SECMOD_KSM */ - -/* define this if we're using the new MIT crypto API */ -/* #undef MIT_NEW_CRYPTO */ - -/* define if you want to build with reentrant/threaded code (incomplete)*/ -/* #undef NS_REENTRANT */ - -/* define if you want to build MFD module rewrites*/ -/* #undef NETSNMP_ENABLE_MFD_REWRITES */ - -/* on aix, if you have perfstat */ -/* #undef HAVE_PERFSTAT */ - -/* Not-to-be-compiled macros for use by configure only */ -#define config_require(x) -#define config_exclude(x) -#define config_arch_require(x,y) -#define config_parse_dot_conf(w,x,y,z) -#define config_add_mib(x) -#define config_belongs_in(x) - -#if defined (WIN32) || defined (mingw32) || defined (cygwin) -#define ENV_SEPARATOR ";" -#define ENV_SEPARATOR_CHAR ';' -#else -#define ENV_SEPARATOR ":" -#define ENV_SEPARATOR_CHAR ':' -#endif - -/* - * this must be before the system/machine includes, to allow them to - * override and turn off inlining. To do so, they should do the - * following: - * - * #undef NETSNMP_ENABLE_INLINE - * #define NETSNMP_ENABLE_INLINE 0 - * - * A user having problems with their compiler can also turn off - * the use of inline by defining NETSNMP_NO_INLINE via their cflags: - * - * -DNETSNMP_NO_INLINE - * - * Header and source files should only test against NETSNMP_USE_INLINE: - * - * #ifdef NETSNMP_USE_INLINE - * NETSNMP_INLINE function(int parm) { return parm -1; } - * #endif - * - * Functions which should be static, regardless of whether or not inline - * is available or enabled should use the NETSNMP_STATIC_INLINE macro, - * like so: - * - * NETSNMP_STATIC_INLINE function(int parm) { return parm -1; } - * - * NOT like this: - * - * static NETSNMP_INLINE function(int parm) { return parm -1; } - * - */ -#define NETSNMP_BROKEN_INLINE 1 -#ifdef NETSNMP_BROKEN_INLINE -# define NETSNMP_ENABLE_INLINE 0 -#else -# define NETSNMP_ENABLE_INLINE 1 -#endif - -#include SYSTEM_INCLUDE_FILE -#include MACHINE_INCLUDE_FILE - -#if NETSNMP_ENABLE_INLINE && !defined(NETSNMP_NO_INLINE) -# define NETSNMP_USE_INLINE 1 -# ifndef NETSNMP_INLINE -# define NETSNMP_INLINE inline -# endif -# ifndef NETSNMP_STATIC_INLINE -# define NETSNMP_STATIC_INLINE static inline -# endif -#else -# define NETSNMP_INLINE -# define NETSNMP_STATIC_INLINE static -#endif - -#ifndef NETSNMP_IMPORT -# define NETSNMP_IMPORT extern -#endif - -#if defined(HAVE_NLIST) && defined(STRUCT_NLIST_HAS_N_VALUE) && !defined(DONT_USE_NLIST) && !defined(NO_KMEM_USAGE) -#define CAN_USE_NLIST -#endif - -#if HAVE_DMALLOC_H -#define DMALLOC_FUNC_CHECK -#endif - -/* #undef INET6 */ -/* #undef LOCAL_SMUX */ - -/* define if agentx transport is to use domain sockets only */ -/* #undef AGENTX_DOM_SOCK_ONLY */ - -/* #undef HEIMDAL */ - -#endif /* NET_SNMP_CONFIG_H */ diff --git a/utils/net-snmp/net-snmp-includes.h b/utils/net-snmp/net-snmp-includes.h deleted file mode 100644 index acf33f07b..000000000 --- a/utils/net-snmp/net-snmp-includes.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef NET_SNMP_INCLUDES_H -#define NET_SNMP_INCLUDES_H - - /** - * Convenience header file to pull in the full - * Net-SNMP library API in one go, together with - * certain commonly-required system header files. - */ - - - /* - * Common system header requirements - */ -#include -#include -#ifdef HAVE_STDINT_H -#include -#endif - -#ifndef NET_SNMP_CONFIG_H -#error "Please include before this file" -#endif - -#if HAVE_STRING_H -#include -#else -#include -#endif - -#if HAVE_STDLIB_H -#include -#endif -#if HAVE_NETINET_IN_H -#include -#endif - -#if TIME_WITH_SYS_TIME -# ifdef WIN32 -# include -# else -# include -# endif -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -/* - * Must be right after system headers, but before library code for best usage - */ -#if HAVE_DMALLOC_H -#include -#endif - - /* - * The check for missing 'in_addr_t' is handled - * within the main net-snmp-config.h file - */ - - - /* - * The full Net-SNMP API - */ -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CMU_COMPATIBLE -#include -#endif - -#endif /* NET_SNMP_INCLUDES_H */ diff --git a/utils/net-snmp/output_api.h b/utils/net-snmp/output_api.h deleted file mode 100644 index be2ce0cf4..000000000 --- a/utils/net-snmp/output_api.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef NET_SNMP_LOGGING_API_H -#define NET_SNMP_LOGGING_API_H - - /** - * Library API routines concerned with logging and message output - * (including error handling and debugging). - */ - -#include - - /* - * For the initial release, this will just refer to the - * relevant UCD header files. - * In due course, the routines relevant to this area of the - * API will be identified, and listed here directly. - * - * But for the time being, this header file is a placeholder, - * to allow application writers to adopt the new header file names. - */ - -#include -#include -#include - -#ifndef ERROR_MSG -#define ERROR_MSG(string) snmp_set_detail(string) -#endif - -#endif /* NET_SNMP_LOGGING_API_H */ diff --git a/utils/net-snmp/pdu_api.h b/utils/net-snmp/pdu_api.h deleted file mode 100644 index a3a1dd623..000000000 --- a/utils/net-snmp/pdu_api.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef NET_SNMP_PDU_API_H -#define NET_SNMP_PDU_API_H - - /** - * Library API routines concerned with SNMP PDUs. - */ - -#include - - /* - * For the initial release, this will just refer to the - * relevant UCD header files. - * In due course, the routines relevant to this area of the - * API will be identified, and listed here directly. - * - * But for the time being, this header file is a placeholder, - * to allow application writers to adopt the new header file names. - */ - -#include -#include -#include - -#endif /* NET_SNMP_PDU_API_H */ diff --git a/utils/net-snmp/session_api.h b/utils/net-snmp/session_api.h deleted file mode 100644 index 9d46e6846..000000000 --- a/utils/net-snmp/session_api.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef NET_SNMP_SESSION_API_H -#define NET_SNMP_SESSION_API_H - - /** - * Library API routines concerned with specifying and using SNMP "sessions" - * including sending and receiving requests. - */ - -#include - - /* - * For the initial release, this will just refer to the - * relevant UCD header files. - * In due course, the routines relevant to this area of the - * API will be identified, and listed here directly. - * - * But for the time being, this header file is a placeholder, - * to allow application writers to adopt the new header file names. - */ - -#include -#include -#include -#include - -#include -#include -#ifdef SNMP_TRANSPORT_UNIX_DOMAIN -#include -#endif -#ifdef SNMP_TRANSPORT_UDP_DOMAIN -#include -#endif -#ifdef SNMP_TRANSPORT_TCP_DOMAIN -#include -#endif -#ifdef SNMP_TRANSPORT_UDPIPV6_DOMAIN -#include -#endif -#ifdef SNMP_TRANSPORT_TCPIPV6_DOMAIN -#include -#endif -#ifdef SNMP_TRANSPORT_IPX_DOMAIN -#include -#endif -#ifdef SNMP_TRANSPORT_AAL5PVC_DOMAIN -#include -#endif - -#include - -#endif /* NET_SNMP_SESSION_API_H */ diff --git a/utils/net-snmp/snmpv3_api.h b/utils/net-snmp/snmpv3_api.h deleted file mode 100644 index 5f89e7fde..000000000 --- a/utils/net-snmp/snmpv3_api.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef NET_SNMP_SNMPV3_H -#define NET_SNMP_SNMPV3_H - - /** - * Library API routines concerned with SNMPv3 handling. - * - * Most of these would typically not be used directly, - * but be invoked via version-independent API routines. - */ - -#include - - /* - * For the initial release, this will just refer to the - * relevant UCD header files. - * In due course, the routines relevant to this area of the - * API will be identified, and listed here directly. - * - * But for the time being, this header file is a placeholder, - * to allow application writers to adopt the new header file names. - */ - -#include - -#include -#include -#include -#include -#include -#include -#ifdef USE_INTERNAL_MD5 -#include -#endif - -#include -#include - -#endif /* NET_SNMP_SNMPV3_H */ diff --git a/utils/net-snmp/system/aix.h b/utils/net-snmp/system/aix.h deleted file mode 100644 index 955aeba6e..000000000 --- a/utils/net-snmp/system/aix.h +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -#undef TOTAL_MEMORY_SYMBOL - -#ifndef __GNUC__ -# undef NETSNMP_ENABLE_INLINE -# define NETSNMP_ENABLE_INLINE 0 -#endif diff --git a/utils/net-snmp/system/bsd.h b/utils/net-snmp/system/bsd.h deleted file mode 100644 index 2739c3c72..000000000 --- a/utils/net-snmp/system/bsd.h +++ /dev/null @@ -1,20 +0,0 @@ -#include - -/* - * the bsd route symbol adds an 's' at the end to this symbol name - */ -#undef RTTABLES_SYMBOL -#define RTTABLES_SYMBOL "rt_tables" - -/* - * BSD systems use a different method of looking up sockaddr_in values - */ -#define NEED_KLGETSA 1 - -/* - * ARP_Scan_Next needs a 4th ifIndex argument - */ -#define ARP_SCAN_FOUR_ARGUMENTS 1 - -#define UTMP_HAS_NO_TYPE 1 -#define UTMP_HAS_NO_PID 1 diff --git a/utils/net-snmp/system/bsdi.h b/utils/net-snmp/system/bsdi.h deleted file mode 100644 index b3387fc5d..000000000 --- a/utils/net-snmp/system/bsdi.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "bsd.h" - -#define CHECK_RT_FLAGS 1 diff --git a/utils/net-snmp/system/bsdi3.h b/utils/net-snmp/system/bsdi3.h deleted file mode 100644 index 2079541f2..000000000 --- a/utils/net-snmp/system/bsdi3.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "bsdi.h" -#define bsdi2 1 /* bsdi3 is a superset of bsdi2 */ diff --git a/utils/net-snmp/system/bsdi4.h b/utils/net-snmp/system/bsdi4.h deleted file mode 100644 index 7ff29e9d0..000000000 --- a/utils/net-snmp/system/bsdi4.h +++ /dev/null @@ -1,11 +0,0 @@ -#include "bsdi.h" -#define bsdi2 1 /* bsdi4 is a superset of bsdi2 */ -#undef NPROC_SYMBOL -#undef PROC_SYMBOL - -#define MNTTYPE_UFS "ufs" -#define BerkelyFS 1 -#define MNTTYPE_MSDOS "msdos" -#define MNTTYPE_ISO9660 "cd9660" -#define MNTTYPE_NFS "nfs" -#define MNTTYPE_MFS "mfs" diff --git a/utils/net-snmp/system/cygwin.h b/utils/net-snmp/system/cygwin.h deleted file mode 100644 index 14ae8ae56..000000000 --- a/utils/net-snmp/system/cygwin.h +++ /dev/null @@ -1,13 +0,0 @@ -#include - -/* got socklen_t? */ -#define HAVE_SOCKLEN_T 1 - -#ifdef HAVE_STDINT_H -#include /* uint32_t */ -#endif - -#undef HAVE_WINSOCK_H -#undef bsdlike -#undef MBSTAT_SYMBOL -#undef TOTAL_MEMORY_SYMBOL diff --git a/utils/net-snmp/system/darwin.h b/utils/net-snmp/system/darwin.h deleted file mode 100644 index 4bb9f945d..000000000 --- a/utils/net-snmp/system/darwin.h +++ /dev/null @@ -1,7 +0,0 @@ -#include "freebsd4.h" -#define darwin 1 -/* - * Although Darwin does have an fstab.h file, getfsfile etc. always return null. - * At least, as of 5.3. - */ -#undef HAVE_FSTAB_H diff --git a/utils/net-snmp/system/darwin7.h b/utils/net-snmp/system/darwin7.h deleted file mode 100644 index 7b2d1c699..000000000 --- a/utils/net-snmp/system/darwin7.h +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include "freebsd4.h" -#define darwin 1 -/* - * Although Darwin does have an fstab.h file, getfsfile etc. always return null. - * At least, as of 5.3. - */ -#undef HAVE_FSTAB_H diff --git a/utils/net-snmp/system/dynix.h b/utils/net-snmp/system/dynix.h deleted file mode 100644 index 0d8b28fec..000000000 --- a/utils/net-snmp/system/dynix.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * dynix.h - * - * Date Created: Sat Jan 12 10:50:50 BST 2002 - * Author: Patrick Hess - */ - -#include - -/* - * from s/sysv.h - */ -#define SYSV 1 - -/* - * to make these changes work... - */ -/* - * maybe I should have used _SEQUENT_ in all this code.. dunno - */ -#define dynix 1 - -#undef TOTAL_MEMORY_SYMBOL -#undef MBSTAT_SYMBOL - -/* - * Not enough alcohool in bloodstream [fmc] - */ -#ifdef NPROC_SYMBOL -#undef NPROC_SYMBOL -#endif -/* - * there might be a way to get NPROC... this might work.. might not - */ -/* - * #define NPROC_SYMBOL "procNPROC" - */ -#ifdef PROC_SYMBOL -#undef PROC_SYMBOL -#endif - -/* - * stole these from Solaris... - */ -#ifndef TCPTV_MIN -#define TCPTV_MIN (1*PR_SLOWHZ) /* minimum allowable value */ -#endif -#ifndef TCPTV_REXMTMAX -#define TCPTV_REXMTMAX (64*PR_SLOWHZ) /* max allowable REXMT value */ -#endif - -/* - * some of the system headers wanna include asm code... let's not - */ -#define __NO_ASM_MACRO 1 - -/* - * Dynix doesn't seem to set this. Guess I'll set it here - */ -#ifndef L_SET -#define L_SET SEEK_SET -#endif - - -/* - * configure fails to detect these properly - */ -/* - * lives in libnsl.so - */ -#define HAVE_GETHOSTNAME 1 - -/* - * outta place... lives in /usr/include/sys - */ -#define HAVE_NET_IF_DL_H 1 - -/* - * got this library... dunno why configure didn't find it - */ -#define HAVE_LIBNSL 1 - -/* - * My Dynix box has nearly 400 filesystems and well over 50 disks - */ -/* - * #define MAXDISKS 500 - */ - -/* - * lives in libsocket.so - */ -#define HAVE_GETHOSTBYNAME 1 - -/* - * lives in libsocket.so - */ -#define HAVE_GETSERVBYNAME 1 - -/* - * Might as well include this here, since a significant - * number of files seem to need it. DTS - */ -#if HAVE_SYS_SELECT_H -#include -#endif diff --git a/utils/net-snmp/system/freebsd.h b/utils/net-snmp/system/freebsd.h deleted file mode 100644 index 55044d7b0..000000000 --- a/utils/net-snmp/system/freebsd.h +++ /dev/null @@ -1,21 +0,0 @@ -#include "bsd.h" - -#define CHECK_RT_FLAGS 1 - -/* - * udp_inpcb list symbol - */ -#undef INP_NEXT_SYMBOL -#define INP_NEXT_SYMBOL inp_list.le_next - -#undef INP_PREV_SYMBOL -#define INP_PREV_SYMBOL inp_list.le_prev - -#undef TCP_TTL_SYMBOL -#define TCP_TTL_SYMBOL "ip_defttl" - -#ifdef _PATH_UTMP -#define UTMP_FILE _PATH_UTMP -#else -#define UTMP_FILE "/var/run/utmp" -#endif diff --git a/utils/net-snmp/system/freebsd2.h b/utils/net-snmp/system/freebsd2.h deleted file mode 100644 index a2673ac6a..000000000 --- a/utils/net-snmp/system/freebsd2.h +++ /dev/null @@ -1,10 +0,0 @@ -#include "freebsd.h" - -/* - * this is not good enough before freebsd3! - */ -#undef HAVE_NET_IF_MIB_H -#undef PROC_SYMBOL -#undef NPROC_SYMBOL -#undef LOADAVE_SYMBOL -#undef TOTAL_MEMORY_SYMBOL diff --git a/utils/net-snmp/system/freebsd3.h b/utils/net-snmp/system/freebsd3.h deleted file mode 100644 index 8aae3e760..000000000 --- a/utils/net-snmp/system/freebsd3.h +++ /dev/null @@ -1,11 +0,0 @@ -#include "freebsd.h" - -#define freebsd2 1 /* freebsd3 is a superset of freebsd2 */ - -#undef IFADDR_SYMBOL -#define IFADDR_SYMBOL "in_ifaddrhead" - -#undef PROC_SYMBOL -#undef NPROC_SYMBOL - -#undef TOTAL_MEMORY_SYMBOL diff --git a/utils/net-snmp/system/freebsd4.h b/utils/net-snmp/system/freebsd4.h deleted file mode 100644 index 33a09f060..000000000 --- a/utils/net-snmp/system/freebsd4.h +++ /dev/null @@ -1,23 +0,0 @@ -#include "freebsd.h" - -/* - * freebsd4 is a superset of freebsd2 and freebsd3 - */ -#define freebsd2 1 -#define freebsd3 1 - -#undef IFADDR_SYMBOL -#define IFADDR_SYMBOL "in_ifaddrhead" - -#undef PROC_SYMBOL -#define PROC_SYMBOL "allproc" - -#undef NPROC_SYMBOL -#define NPROC_SYMBOL "nprocs" - -#undef TOTAL_MEMORY_SYMBOL - -#undef MBSTAT_SYMBOL - -#undef INP_NEXT_SYMBOL -#define INP_NEXT_SYMBOL inp_next diff --git a/utils/net-snmp/system/freebsd5.h b/utils/net-snmp/system/freebsd5.h deleted file mode 100644 index 257dd7950..000000000 --- a/utils/net-snmp/system/freebsd5.h +++ /dev/null @@ -1,25 +0,0 @@ -#include "freebsd.h" - -/* - * freebsd4 is a superset of freebsd2 and freebsd3 - */ -#define freebsd2 1 -#define freebsd3 1 -/* freebsd5 is a superset of freebsd4 */ -#define freebsd4 1 - -#undef IFADDR_SYMBOL -#define IFADDR_SYMBOL "in_ifaddrhead" - -#undef PROC_SYMBOL -#define PROC_SYMBOL "allproc" - -#undef NPROC_SYMBOL -#define NPROC_SYMBOL "nprocs" - -#undef TOTAL_MEMORY_SYMBOL - -#undef MBSTAT_SYMBOL - -#undef INP_NEXT_SYMBOL -#define INP_NEXT_SYMBOL inp_next diff --git a/utils/net-snmp/system/freebsd6.h b/utils/net-snmp/system/freebsd6.h deleted file mode 100644 index 8479b7058..000000000 --- a/utils/net-snmp/system/freebsd6.h +++ /dev/null @@ -1,25 +0,0 @@ -#include "freebsd.h" - -/* - * freebsd6 is a superset of all since freebsd2 - */ -#define freebsd2 1 -#define freebsd3 1 -#define freebsd4 1 -#define freebsd5 1 - -#undef IFADDR_SYMBOL -#define IFADDR_SYMBOL "in_ifaddrhead" - -#undef PROC_SYMBOL -#define PROC_SYMBOL "allproc" - -#undef NPROC_SYMBOL -#define NPROC_SYMBOL "nprocs" - -#undef TOTAL_MEMORY_SYMBOL - -#undef MBSTAT_SYMBOL - -#undef INP_NEXT_SYMBOL -#define INP_NEXT_SYMBOL inp_next diff --git a/utils/net-snmp/system/generic.h b/utils/net-snmp/system/generic.h deleted file mode 100644 index c792b18b2..000000000 --- a/utils/net-snmp/system/generic.h +++ /dev/null @@ -1,74 +0,0 @@ - -#define bsdlike 1 - -/* - * nlist symbols in ip.c - */ -#define IPSTAT_SYMBOL "ipstat" -#define IP_FORWARDING_SYMBOL "ipforwarding" -#define TCP_TTL_SYMBOL "tcpDefaultTTL" - -/* - * nlist symbols in interfaces.c - */ -#define IFNET_SYMBOL "ifnet" -#define IFADDR_SYMBOL "in_ifaddr" - -/* - * nlist symbols in at.c - */ -#define ARPTAB_SYMBOL "arptab" -#define ARPTAB_SIZE_SYMBOL "arptab_size" - -/* - * load average lookup symbol - */ -#define LOADAVE_SYMBOL "avenrun" - -/* - * nlist symbols in hr_proc.c and memory.c - */ -#define PHYSMEM_SYMBOL "physmem" -#define TOTAL_MEMORY_SYMBOL "total" -#define MBSTAT_SYMBOL "mbstat" -#define SWDEVT_SYMBOL "swdevt" -#define FSWDEVT_SYMBOL "fswdevt" -#define NSWAPFS_SYMBOL "nswapfs" -#define NSWAPDEV_SYMBOL "nswapdev" - -/* - * process nlist symbols. - */ -#define NPROC_SYMBOL "nproc" -#define PROC_SYMBOL "proc" - -/* - * icmp.c nlist symbols - */ -#define ICMPSTAT_SYMBOL "icmpstat" - -/* - * tcp.c nlist symbols - */ -#define TCPSTAT_SYMBOL "tcpstat" -#define TCP_SYMBOL "tcb" - -/* - * upd.c nlist symbols - */ -#define UDPSTAT_SYMBOL "udpstat" -#define UDB_SYMBOL "udb" - -/* - * var_route.c nlist symbols - */ -#define RTTABLES_SYMBOL "rt_table" -#define RTHASHSIZE_SYMBOL "rthashsize" -#define RTHOST_SYMBOL "rthost" -#define RTNET_SYMBOL "rtnet" - -/* - * udp_inpcb list symbol - */ -#define INP_NEXT_SYMBOL inp_next -#define INP_PREV_SYMBOL inp_prev diff --git a/utils/net-snmp/system/hpux.h b/utils/net-snmp/system/hpux.h deleted file mode 100644 index e5b7cf294..000000000 --- a/utils/net-snmp/system/hpux.h +++ /dev/null @@ -1,73 +0,0 @@ -#include "sysv.h" - -#ifdef hpux11 -#define DONT_USE_NLIST 1 -#endif - -#undef TCP_TTL_SYMBOL -#ifndef hpux11 -#define TCP_TTL_SYMBOL "ipDefaultTTL" -#endif - -#ifndef hpux11 -/* - * hpux specific - */ -#define MIB_IPCOUNTER_SYMBOL "MIB_ipcounter" -#define MIB_TCPCOUNTER_SYMBOL "MIB_tcpcounter" -#define MIB_UDPCOUNTER_SYMBOL "MIB_udpcounter" -#endif - -#undef ARPTAB_SYMBOL -#ifndef hpux11 -#define ARPTAB_SYMBOL "arphd" -#endif -#undef ARPTAB_SIZE_SYMBOL -#ifndef hpux11 -#define ARPTAB_SIZE_SYMBOL "arptab_nb" -#endif - -#if defined(hpux10) || defined(hpux11) -#undef SWDEVT_SYMBOL -#undef FSWDEVT_SYMBOL -#undef NSWAPFS_SYMBOL -#undef NSWAPDEV_SYMBOL -#undef LOADAVE_SYMBOL -#undef PROC_SYMBOL -#undef NPROC_SYMBOL -#undef TOTAL_MEMORY_SYMBOL -#undef MBSTAT_SYMBOL -#endif - -#ifdef hpux11 -#undef IPSTAT_SYMBOL -#undef TCP_SYMBOL -#undef TCPSTAT_SYMBOL -#undef UDB_SYMBOL -#undef UDPSTAT_SYMBOL -#undef ICMPSTAT_SYMBOL -#undef IP_FORWARDING_SYMBOL -#undef RTTABLES_SYMBOL -#undef RTHASHSIZE_SYMBOL -#undef RTHOST_SYMBOL -#undef RTNET_SYMBOL - -#undef PHYSMEM_SYMBOL -#endif - -/* - * ARP_Scan_Next needs a 4th ifIndex argument - */ -#define ARP_SCAN_FOUR_ARGUMENTS - -#define rt_pad1 rt_refcnt - -#define hpux 1 - -/* - * disable inline for non-gcc compiler - */ -#ifndef __GNUC__ -# undef NETSNMP_ENABLE_INLINE -# define NETSNMP_ENABLE_INLINE 0 -#endif diff --git a/utils/net-snmp/system/irix.h b/utils/net-snmp/system/irix.h deleted file mode 100644 index 4f4c42678..000000000 --- a/utils/net-snmp/system/irix.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * irix.h - * - * Date Created: Mon Feb 16 22:19:39 1998 - * Author: Simon Leinen - */ - -#include - -#undef TCP_TTL_SYMBOL -#define TCP_TTL_SYMBOL "tcp_ttl" - -#undef IPSTAT_SYMBOL -#define NO_DOUBLE_ICMPSTAT -#undef ICMPSTAT_SYMBOL -#undef TCPSTAT_SYMBOL -#undef UDPSTAT_SYMBOL - -#define _KMEMUSER 1 - -/* - * don't define _KERNEL before including sys/unistd.h - */ -#define IFNET_NEEDS_KERNEL_LATE 1 - -/* - * configure fails to detect these properly because they're broken headers - */ -#define HAVE_NETINET_TCP_H 1 -#define HAVE_NETINET_IP_H 1 - -/* - * don't use this on irix - * it has a prototype of inet_addr() which conflicts - * with - */ -#undef HAVE_ARPA_INET_H - -/* - * We need a prototype of inet_ntoa() then. - */ -extern const char *inet_ntoa(); - -#define STREAM_NEEDS_KERNEL_ISLANDS - -#ifndef __GNUC__ -# undef NETSNMP_ENABLE_INLINE -# define NETSNMP_ENABLE_INLINE 0 -#endif diff --git a/utils/net-snmp/system/linux.h b/utils/net-snmp/system/linux.h deleted file mode 100644 index c7f55549c..000000000 --- a/utils/net-snmp/system/linux.h +++ /dev/null @@ -1,19 +0,0 @@ -#include "sysv.h" - -#define DONT_USE_NLIST 1 - -#undef NPROC_SYMBOL - -#undef bsdlike - -#define ARP_SCAN_FOUR_ARGUMENTS - -/* uncomment this to read process names from /proc/X/cmdline (like <= 5.0) */ -/* #define USE_PROC_CMDLINE */ - -/* - * red hat >= 5.0 doesn't have this - */ -#ifndef MNTTYPE_PROC -#define MNTTYPE_PROC "proc" -#endif diff --git a/utils/net-snmp/system/mingw32.h b/utils/net-snmp/system/mingw32.h deleted file mode 100644 index 1482aeaf9..000000000 --- a/utils/net-snmp/system/mingw32.h +++ /dev/null @@ -1,71 +0,0 @@ -#include - -#ifdef HAVE_STDINT_H -#include /* uint32_t */ -#endif - -#undef bsdlike -#undef MBSTAT_SYMBOL -#undef TOTAL_MEMORY_SYMBOL -#undef HAVE_GETOPT_H -#undef HAVE_SOCKET -#undef HAVE_SIGNAL - -/* Define if you have the gettimeofday function. */ -/* Only when compiling Perl module */ -#ifdef MINGW_PERL -#define HAVE_GETTIMEOFDAY 1 -#endif - -/* Define if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define if you have the gethostname function. */ -#define HAVE_GETHOSTNAME 1 - -/* Define if you have the getservbyname function. */ -#define HAVE_GETSERVBYNAME 1 - -/* Define if you have raise() instead of alarm() */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `execv' function. */ -#undef HAVE_EXECV - -/* Define to 1 if you have the `fork' function. */ -#undef HAVE_FORK - -/* - * I'm sure there is a cleaner way to do this. - * Probably should be in net_snmp_config.h and - * set during config. - */ -#ifndef LOG_DAEMON -#define LOG_DAEMON (3<<3) /* System daemons */ -#endif - -/* got socklen_t? */ -#define HAVE_SOCKLEN_T 1 - -/* This was taken from the win32 config file. */ -#define EADDRINUSE WSAEADDRINUSE - -/* - * File io stuff. Odd that this is not defined by MinGW. - * Maybe there is an M$ish way to do it. - */ -#define F_SETFL 4 -#define O_NONBLOCK 0x4000 /* non blocking I/O (POSIX style) */ - -/* - * I dunno why. It's just not there. Define struct timezone. - * If other systems need this it could be moved to system.h - * and the proper checking done at config time. Right now I have - * just put it here to keep the MinGW out of the main tree as much - * as possible. - */ -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; - diff --git a/utils/net-snmp/system/mips.h b/utils/net-snmp/system/mips.h deleted file mode 100644 index a4fa7fa84..000000000 --- a/utils/net-snmp/system/mips.h +++ /dev/null @@ -1,4 +0,0 @@ - -#define DONT_USE_NLIST 1 - -#undef bsdlike diff --git a/utils/net-snmp/system/netbsd.h b/utils/net-snmp/system/netbsd.h deleted file mode 100644 index 71d3741ad..000000000 --- a/utils/net-snmp/system/netbsd.h +++ /dev/null @@ -1,52 +0,0 @@ -#include "bsd.h" - -#define PCB_TABLE 1 -#undef TCP_SYMBOL -#define TCP_SYMBOL "tcbtable" -#undef TCP_TTL_SYMBOL -#define TCP_TTL_SYMBOL "ip_defttl" -#undef UDB_SYMBOL -#define UDB_SYMBOL "udbtable" -#undef NPROC_SYMBOL -#undef PROC_SYMBOL - -#define MBPOOL_SYMBOL "mbpool" -#define MCLPOOL_SYMBOL "mclpool" - -/* - * inp_next symbol - */ -#undef INP_NEXT_SYMBOL -#define INP_NEXT_SYMBOL inp_queue.cqe_next -#undef INP_PREV_SYMBOL -#define INP_PREV_SYMBOL inp_queue.cqe_prev -#define HAVE_INPCBTABLE 1 - -#define UTMP_FILE _PATH_UTMP - -#ifndef netbsd1 -# define netbsd1 1 -#endif - -/* - * fixups for broken AC_CHECK_IFNET_FOR() - */ -/* - * XXX - Remove when fixed in configure.in - */ -#undef STRUCT_IFNET_HAS_IF_BAUDRATE -#define STRUCT_IFNET_HAS_IF_BAUDRATE 1 -#undef STRUCT_IFNET_HAS_IF_TYPE -#define STRUCT_IFNET_HAS_IF_TYPE 1 -#undef STRUCT_IFNET_HAS_IF_IMCASTS -#define STRUCT_IFNET_HAS_IF_IMCASTS 1 -#undef STRUCT_IFNET_HAS_IF_IQDROPS -#define STRUCT_IFNET_HAS_IF_IQDROPS 1 -#undef STRUCT_IFNET_HAS_IF_NOPROTO -#define STRUCT_IFNET_HAS_IF_NOPROTO 1 -#undef STRUCT_IFNET_HAS_IF_OMCASTS -#define STRUCT_IFNET_HAS_IF_OMCASTS 1 -#undef STRUCT_IFNET_HAS_IF_IBYTES -#define STRUCT_IFNET_HAS_IF_IBYTES 1 -#undef STRUCT_IFNET_HAS_IF_OBYTES -#define STRUCT_IFNET_HAS_IF_OBYTES 1 diff --git a/utils/net-snmp/system/openbsd.h b/utils/net-snmp/system/openbsd.h deleted file mode 100644 index d02c5e673..000000000 --- a/utils/net-snmp/system/openbsd.h +++ /dev/null @@ -1,8 +0,0 @@ -#include "netbsd.h" - -#define netbsd1 1 /* we're really close to this */ -#define UVM - -#undef MBPOOL_SYMBOL -#undef MCLPOOL_SYMBOL -#undef TOTAL_MEMORY_SYMBOL diff --git a/utils/net-snmp/system/osf5.h b/utils/net-snmp/system/osf5.h deleted file mode 100644 index 63fc9c630..000000000 --- a/utils/net-snmp/system/osf5.h +++ /dev/null @@ -1,22 +0,0 @@ -#include - -#define osf4 - -/* Needed by to give us the correct sockaddr structures */ -#ifndef _SOCKADDR_LEN -#define _SOCKADDR_LEN -#endif - -#undef TCP_TTL_SYMBOL -#define TCP_TTL_SYMBOL "tcp_ttl" - -/* var_route.c nlist symbols */ -#undef RTTABLES_SYMBOL -#define RTTABLES_SYMBOL "rtable" -#undef RTHASHSIZE_SYMBOL -#define RTHASHSIZE_SYMBOL "rhash_size" - -#ifndef __GNUC__ -# undef NETSNMP_ENABLE_INLINE -# define NETSNMP_ENABLE_INLINE 0 -#endif diff --git a/utils/net-snmp/system/solaris.h b/utils/net-snmp/system/solaris.h deleted file mode 100644 index 03dca10fd..000000000 --- a/utils/net-snmp/system/solaris.h +++ /dev/null @@ -1,22 +0,0 @@ -#include "sysv.h" - -#undef bsdlike -#undef IP_FORWARDING_SYMBOL -#undef ARPTAB_SYMBOL -#define ARPTAB_SYMBOL "arptab_nb" -#undef ARPTAB_SIZE_SYMBOL -#define ARPTAB_SIZE_SYMBOL "arphd" -#undef ICMPSTAT_SYMBOL -#undef TCPSTAT_SYMBOL -#undef TCP_SYMBOL -#undef UDPSTAT_SYMBOL -#undef UDB_SYMBOL -#undef RTTABLES_SYMBOL -#undef RTHASHSIZE_SYMBOL -#undef RTHOST_SYMBOL -#undef RTNET_SYMBOL -#undef IPSTAT_SYMBOL -#undef TCP_TTL_SYMBOL -#undef PROC_SYMBOL -#undef TOTAL_MEMORY_SYMBOL -#undef MBSTAT_SYMBOL diff --git a/utils/net-snmp/system/solaris2.6.h b/utils/net-snmp/system/solaris2.6.h deleted file mode 100644 index b53ff58c2..000000000 --- a/utils/net-snmp/system/solaris2.6.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "solaris.h" -#define _SLASH_PROC_METHOD_ 1 diff --git a/utils/net-snmp/system/solaris2.7.h b/utils/net-snmp/system/solaris2.7.h deleted file mode 100644 index 2f6c972a4..000000000 --- a/utils/net-snmp/system/solaris2.7.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "solaris.h" -#define _SLASH_PROC_METHOD_ 1 -#define DONT_USE_NLIST 1 diff --git a/utils/net-snmp/system/solaris2.8.h b/utils/net-snmp/system/solaris2.8.h deleted file mode 100644 index 2f6c972a4..000000000 --- a/utils/net-snmp/system/solaris2.8.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "solaris.h" -#define _SLASH_PROC_METHOD_ 1 -#define DONT_USE_NLIST 1 diff --git a/utils/net-snmp/system/solaris2.9.h b/utils/net-snmp/system/solaris2.9.h deleted file mode 100644 index 2f6c972a4..000000000 --- a/utils/net-snmp/system/solaris2.9.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "solaris.h" -#define _SLASH_PROC_METHOD_ 1 -#define DONT_USE_NLIST 1 diff --git a/utils/net-snmp/system/sunos.h b/utils/net-snmp/system/sunos.h deleted file mode 100644 index 48eef00d2..000000000 --- a/utils/net-snmp/system/sunos.h +++ /dev/null @@ -1,12 +0,0 @@ -#include - -typedef int ssize_t; - -#undef IP_FORWARDING_SYMBOL -#define IP_FORWARDING_SYMBOL "ip_forwarding" - -#undef TCP_TTL_SYMBOL -#define TCP_TTL_SYMBOL "tcp_ttl" - -#define UTMP_HAS_NO_TYPE 1 -#define UTMP_FILE "/etc/utmp" diff --git a/utils/net-snmp/system/svr5.h b/utils/net-snmp/system/svr5.h deleted file mode 100644 index c4a9f9a96..000000000 --- a/utils/net-snmp/system/svr5.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * used to minimally build SCO UnixWare 7.1.0 using CCS 3.2 compiler - YMMV - */ - -#include - -/* - * using CCS "cc", "configure" does not find this item - */ -#define HAVE_MEMCPY 1 -/* - * so, undo the damage done earlier in config.h - */ -#undef memcpy -#undef memmove -#define HAVE_GETHOSTBYNAME 1 - -/* - * lie about this next define to avoid sa_len and sa_family MACROS !! - */ -#define STRUCT_SOCKADDR_HAS_SA_UNION_SA_GENERIC_SA_FAMILY2 1 - -/* - * this header requires queue_t, not easily done without kernel headers - */ -#undef HAVE_NETINET_IN_PCB_H diff --git a/utils/net-snmp/system/sysv.h b/utils/net-snmp/system/sysv.h deleted file mode 100644 index 45d6a39a0..000000000 --- a/utils/net-snmp/system/sysv.h +++ /dev/null @@ -1,2 +0,0 @@ -#include -#define SYSV 1 diff --git a/utils/net-snmp/system/ultrix4.h b/utils/net-snmp/system/ultrix4.h deleted file mode 100644 index 4efc3dba6..000000000 --- a/utils/net-snmp/system/ultrix4.h +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include - -typedef int ssize_t; - -#undef TCP_TTL_SYMBOL -#define TCP_TTL_SYMBOL "tcp_ttl" - -#undef RTTABLES_SYMBOL diff --git a/utils/net-snmp/types.h b/utils/net-snmp/types.h deleted file mode 100644 index 610a5d8ec..000000000 --- a/utils/net-snmp/types.h +++ /dev/null @@ -1,187 +0,0 @@ -#ifndef NET_SNMP_TYPES_H -#define NET_SNMP_TYPES_H - - /** - * Definitions of data structures, used within the library API. - */ - -#include - -#ifndef NET_SNMP_CONFIG_H -#error "Please include before this file" -#endif - - /* - * For 'timeval' - */ -#if TIME_WITH_SYS_TIME -# ifdef WIN32 -# include -# else -# include -# endif -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -#ifdef HAVE_INTTYPES_H -#include -#endif -#include -#ifdef HAVE_WINSOCK_H -#include -#endif - -#if HAVE_NETINET_IN_H -#include /* For definition of in_addr_t */ -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef MAX_SUBID /* temporary - duplicate definition protection */ -#ifndef EIGHTBIT_SUBIDS -typedef u_long oid; -#define MAX_SUBID 0xFFFFFFFF -#else -typedef u_char oid; -#define MAX_SUBID 0xFF -#endif -#endif - -#ifndef HAVE_SOCKLEN_T -typedef u_int socklen_t; -#endif - -#ifndef HAVE_IN_ADDR_T -typedef u_int in_addr_t; -#endif - -#ifndef HAVE_SSIZE_T -#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647 -typedef int ssize_t; -#else -typedef long ssize_t; -#endif -#endif - - /* - * Try to ensure we have 32-bit (and hopefully 64-bit) - * integer types available. - */ -#ifndef HAVE_INT32_T -#if SIZEOF_INT == 4 -typedef int int32_t -#elif SIZEOF_LONG == 4 -typedef long int32_t -#elif SIZEOF_SHORT == 4 -typedef short int32_t -#else -typedef int int32_t -#define _INT32_IS_NOT_32BIT -#endif -#endif - -#ifndef HAVE_UINT32_T -#ifdef HAVE_U_INT32_T -typedef uint32_t uint32_t -#else -typedef unsigned int32_t uint32_t -#endif -#endif - -#ifndef HAVE_INT64_T -#if SIZEOF_LONG == 8 -typedef long int64_t -#elif SIZEOF_LONG_LONG == 8 -typedef long long int64_t -#elif SIZEOF_INT == 8 -typedef int int64_t -#elif SIZEOF_LONG >= 8 -typedef long int64_t -#define _INT64_IS_NOT_64BIT -#else -#define _NO_64BIT_TYPE 1 -#endif -#endif - -#ifndef HAVE_UINT64_T -#ifdef HAVE_U_INT64_T -typedef u_int64_t uint64_t -#elif !defined(_NO_64BIT_TYPE) -typedef unsigned int64_t uint64_t -#endif -#endif - - /* - * For the initial release, this will just refer to the - * relevant UCD header files. - * In due course, the types and structures relevant to the - * Net-SNMP API will be identified, and defined here directly. - * - * But for the time being, this header file is primarily a placeholder, - * to allow application writers to adopt the new header file names. - */ - - -#include -#include -/* - * #include - */ - - typedef struct netsnmp_index_s { - int len; - oid *oids; - } netsnmp_index; - - - typedef struct netsnmp_void_array_s { - size_t size; - void * *array; - } netsnmp_void_array; - - /* - * references to various types - */ - typedef struct netsnmp_ref_void { - void * val; - } netsnmp_ref_void; - -#if 0 - typedef struct netsnmp_ref_u_char { - u_char * val; - } netsnmp_ref_U_char; - - typedef struct netsnmp_ref_char { - char * val; - } netsnmp_ref_void; - - typedef struct netsnmp_ref_int_s { - int val; - } netsnmp_ref_int; - - typedef struct netsnmp_ref_u_int_s { - u_int val; - } netsnmp_ref_int; - - typedef struct netsnmp_ref_uint32_t_s { - uint32_t val; - } netsnmp_ref_uint32_t; -#endif - - typedef struct netsnmp_ref_size_t_s { - size_t val; - } * netsnmp_ref_size_t; - -#ifdef __cplusplus -} -#endif - -#endif /* NET_SNMP_TYPES_H */ diff --git a/utils/net-snmp/utilities.h b/utils/net-snmp/utilities.h deleted file mode 100644 index 55aed5f94..000000000 --- a/utils/net-snmp/utilities.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef NET_SNMP_UTILITIES_H -#define NET_SNMP_UTILITIES_H - - /** - * Library API routines not specifically concerned with SNMP directly, - * but used more generally within the library, agent and other applications. - * - * This also includes "standard" system routines, which are missing on - * particular O/S distributiones. - */ - -#ifndef NET_SNMP_CONFIG_H -#error "Please include before this file" -#endif - -#include - - /* - * For the initial release, this will just refer to the - * relevant UCD header files. - * In due course, the routines relevant to this area of the - * API will be identified, and listed here directly. - * - * But for the time being, this header file is a placeholder, - * to allow application writers to adopt the new header file names. - */ - -#include -#include -#if HAVE_GETOPT_H -#include -#else -#include -#endif - -#ifdef HAVE_NETINET_IN_H -#include /* for in_addr_t */ -#endif -#include -#include -#include /* for counter64 */ -#include - -#include -/* #include */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#endif /* NET_SNMP_UTILITIES_H */ diff --git a/utils/net-snmp/varbind_api.h b/utils/net-snmp/varbind_api.h deleted file mode 100644 index ed5748bbe..000000000 --- a/utils/net-snmp/varbind_api.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef NET_SNMP_VARBIND_API_H -#define NET_SNMP_VARBIND_API_H - - /** - * Library API routines concerned with variable bindings and values. - */ - -#include - - /* - * For the initial release, this will just refer to the - * relevant UCD header files. - * In due course, the routines relevant to this area of the - * API will be identified, and listed here directly. - * - * But for the time being, this header file is a placeholder, - * to allow application writers to adopt the new header file names. - */ - -#include -#include -#include - -#endif /* NET_SNMP_VARBIND_API_H */ diff --git a/utils/net-snmp/version.h b/utils/net-snmp/version.h deleted file mode 100644 index 17b2e4559..000000000 --- a/utils/net-snmp/version.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef NET_SNMP_VERSION_H -#define NET_SNMP_VERSION_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef UCD_COMPATIBLE - extern const char *NetSnmpVersionInfo; -#endif - - const char *netsnmp_get_version(void); - -#ifdef __cplusplus -} -#endif -#endif /* NET_SNMP_VERSION_H */